hi,
I made some changes to the GUIEditBox for my IrrExtensions,
but I thought this could be of interest for Not-IrrExtension-Users too
1st was get/setCursorPosition, but this is a preatty old one...
now I made functions to set/get insert/overwrite mode for the edit box !!!
also the cursor changes depending on the mode (like it's usual for edit boxes)...
you can download the patch file and an example here !!!
the patch was made with the official 1.7.2 release version...
I hope it's of any use for you, and maybe it finds it's way into the next release !!!
GUIEditBox: insert/overwrite mode
GUIEditBox: insert/overwrite mode
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Nice, I'll take a look when I get to the editbox next time. There's also 3 patches from Mloren which I have on my todo for it (I think one was also for set cursor position) . I just have not found the time yet to write tests for those and also to check the editbox sources if there's any reason why setting position wasn't made public so far (always a problem figuring out such stuff if you didn't write it yourself...). I try if I can get to it this week. Hm, after I fix the bug with the spaces at the end for multiline-editboxes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Andres and I modified also the IGUIEditBox and used it as a code editor in our project. Would you like to have a look at it?
The scrolling was enhanced, we added color coding with terms, added a vertical scroller and linecount (hide/show) button...
The component started from the source (but we use it as a new gui component)
The scrolling was enhanced, we added color coding with terms, added a vertical scroller and linecount (hide/show) button...
The component started from the source (but we use it as a new gui component)
I guess it might be useful so if you put that in code-snippets people will like it. But with different colors and additional line-counting this already goes into the direction of a rich-edit which would rather be an own element already I guess.christianclavet wrote:Andres and I modified also the IGUIEditBox and used it as a code editor in our project. Would you like to have a look at it?
The scrolling was enhanced, we added color coding with terms, added a vertical scroller and linecount (hide/show) button...
The component started from the source (but we use it as a new gui component)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi, ok. I posted our code editor gui as a snippet here:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=44166
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=44166
Re: GUIEditBox: insert/overwrite mode
@Acki, please check my comments on this thread: http://irrlicht.sourceforge.net/forum/v ... =9&t=42429
It's basically the same problems as in the patch here and just some simple hints to improve patches in future.
It's basically the same problems as in the patch here and just some simple hints to improve patches in future.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: GUIEditBox: insert/overwrite mode
I see
is the new package better then ???
is the new package better then ???
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: GUIEditBox: insert/overwrite mode
Well, it still has the same bug (CursorPosition can't be text-length as it ignores newlines), but yes - this way patches are better.
Note: I'll probably rewrite textbreaking (or wrapping to use a more common name...) now first anyway, as this caused too many troubles and is copy-pasted in more than one class and needed in some further classes. And this might affect CursorPosition, although I probably keep the current system. I'm not sure yet if I should convert in some way between CursorPosition and TextPosition or how to handle that. Bascially if we add getCursorPosition then people would like to know where in the text this is probably.
Note: I'll probably rewrite textbreaking (or wrapping to use a more common name...) now first anyway, as this caused too many troubles and is copy-pasted in more than one class and needed in some further classes. And this might affect CursorPosition, although I probably keep the current system. I'm not sure yet if I should convert in some way between CursorPosition and TextPosition or how to handle that. Bascially if we add getCursorPosition then people would like to know where in the text this is probably.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm