BASIC

Author Topic: Immediate Mode GUI  (Read 18349 times)

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #15 on: 2011-Jan-25 »
Sounds easy to expand then!

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #16 on: 2011-Dec-20 »
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...

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: Immediate Mode GUI
« Reply #17 on: 2011-Dec-20 »
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

  • Guest
Re: Immediate Mode GUI
« Reply #18 on: 2011-Dec-20 »
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]
« Last Edit: 2011-Dec-20 by MrTAToad »

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #19 on: 2011-Dec-21 »
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]

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Immediate Mode GUI
« Reply #20 on: 2011-Dec-21 »
looks pretty sophisticated. Very well organized code.

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #21 on: 2011-Dec-21 »
Thats for that!  Its coming along :)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2597
    • View Profile
Re: Immediate Mode GUI
« Reply #22 on: 2011-Dec-22 »
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

  • Guest
Re: Immediate Mode GUI
« Reply #23 on: 2011-Dec-22 »
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]
« Last Edit: 2011-Dec-22 by MrTAToad »

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Immediate Mode GUI
« Reply #24 on: 2012-Jun-19 »
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]
« Last Edit: 2012-Aug-06 by Albert »

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #25 on: 2012-Jun-19 »
Very nice - do you have an onscreen keyboard for typing on mobile devices ?

One thing that could be useful is a file dialog system...
« Last Edit: 2012-Jun-19 by MrTAToad »

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2597
    • View Profile
Re: Immediate Mode GUI
« Reply #26 on: 2012-Jun-19 »
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)

Offline TI-994A

  • Community Developer
  • Mr. Polyvector
  • ******
  • Posts: 112
  • You can do it in BASIC!
    • View Profile
Re: Immediate Mode GUI
« Reply #27 on: 2012-Jun-22 »
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!

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Immediate Mode GUI
« Reply #28 on: 2012-Jun-22 »
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.

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Re: Immediate Mode GUI
« Reply #29 on: 2012-Jun-22 »
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.