Immediate Mode GUI

Previous topic - Next topic

MrTAToad

Sounds easy to expand then!

MrTAToad

I've been upgrading this routine to make it rather more user-friendly and more efficient to use.

I've kept the basic code (so far I've kept the original code for buttons and sliders), but aside from putting it in an extended type, I've added window Z ordering, static text, check boxes, radio buttons and hope to be adding icons, list boxes and multi-line edit boxes...

kanonet

Nice, but where can we find your updates, MrT?
Btw. did you make the code a bit clearer and faster? I played with it several months ago and as far as i remember there was quite a bit room for optimisation.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

MrTAToad

#18
This is what I have so far.  At the moment I'm having problems with text scrolling.  Need to add listboxes later on.

Radio buttons need to be optimised - at the moment they use tRadio, but it should be using tCheckbox...



[attachment deleted by admin]

MrTAToad

This one has Radio buttons and checkboxes using the same type.  In addition, I've finally got single line text editing working

[attachment deleted by admin]

Kitty Hello

looks pretty sophisticated. Very well organized code.

MrTAToad

Thats for that!  Its coming along :)

bigsofty

Doh, completely missed this, looks great!  :good:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

MrTAToad

#23
At the moment I'm changing the looks of the buttons to look more like the ones in Guichan...  So far the buttons have been changed and look list this now.

The next important thing to do is separate the different items into their own extended types...



[attachment deleted by admin]

Albert

#24
IMGUI update!
I've fixed and added a lot of stuff, now, you can use it on Touchscreen as well (iPhone and Android tested).
Also take a look at this thread for a nice skin: http://www.glbasic.com/forum/index.php?topic=8139.0

Download: https://dl.dropbox.com/u/292449/glbasic/imgui/imgui2.zip
Or download as attachment



[attachment deleted by admin]

MrTAToad

#25
Very nice - do you have an onscreen keyboard for typing on mobile devices ?

One thing that could be useful is a file dialog system...

bigsofty

Agreed, lovely stuff Albert! :D
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

TI-994A

Hi Albert! I've been playing around with the skeleton codes from your earlier states & skins threads, but this is truly inspiring. Once again, thanks for sharing!


Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!

Albert

Nice to hear. I have a feeling that nobody interested in my IMGUI or State Machine code, Which is a shame, 'cos these are really interesting stuffs and I'm disappointed a bit that there only few comments arrived about these.
Anyhow, I'm working on IMGUI ATM, making more modular, so you can use only the IMGUI.GBAS if you want, and then you get gui functionality with basic skin (already done). And then you can add imgui_white.gbas or imgui_wood.gbas and then you can acces these skins in your program like:
Code (glbasic) Select
LOCAL s AS UISkin
s = imgui_initwhiteskin( ... ) //parameters specifies that you want color attributes ignored or not and so on)
gui.changeskin(s)


Also I want a simple skineditor (you can configure some colors, and behavior), and a layout editor.

spicypixel

This is really cool and I hope you continue to develop it Albert. If you want some skins designed give me a shout by all means. I presume it will be possible to skin the window headers too at some point as that would be awesome :D
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.