Menu

#275 CGUIEditBox replacement/overwrite mode using the "Insert" key

closed-accepted
5
2014-03-26
2013-11-17
Adam
No

In order for me to learn about some of the inner workings of IRRLicht, I decided to do something simple and modify the CGUIEditBox to allow replacement/overwrite functionality with the "Insert" key.

Features

  • The User can press the "Insert" key to switch between normal insert mode and replacement/overwrite mode.
  • In replacement/overwrite mode the cursor changes to a box which matches the width of the character it is over, because the default font is not monospaced. When not in replacement/overwrite mode the cursor is whatever character was set or the default one.
  • In multi-line mode when the end of a line is reached in replacement/overwrite mode characters are appended to that line. This matches the functionality of some of the text editors I use.

I have attached the patch file. Let me know what you think.

1 Attachments

Discussion

  • Adam

    Adam - 2013-11-17

    In order to test the patch run the User interface example.

     
  • Michael Zeilfelder

    • status: open --> closed-accepted
    • assigned_to: Michael Zeilfelder
     
  • Michael Zeilfelder

    Thanks - worked nicely in all tests I did think off. It's applied in Irrlicht svn r4736.

     

Log in to post a comment.