Gui module

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Thinking about drop down lists in for the next version of my Gui Module
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,845
Sadly I never looked into your module. So please excuse my questions:
  1. Is it skinnable? If yes, with graphics and/oder colors?
  2. I noticed a tabbed interface in your font editor. It that the main way to build an UI with your module, that you need a tabbed widget as a base?
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Sadly I never looked into your module. So please excuse my questions:
  1. Is it skinnable? If yes, with graphics and/oder colors?
  2. I noticed a tabbed interface in your font editor. It that the main way to build an UI with your module, that you need a tabbed widget as a base?
1) Yes for both. The format for each skin file could do wih a revamp into json or something and you can quickly recolor each skin using Gui.SetColor(r,g,b). The demo on itch.io does both. Also the module comes with 2 themes.
2) I supose it is. Each "gui" can be a series of tabs. You can have more than one gui on the screen at once. A gui doesnt have to have tabs. these can be turned off. Thinking back, a "gui" is a window that could have mulitple tabs, but i didnt want to call it a Window as that suggests dragging and minimising etc
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,845
A few things I noticed so far:

1) Line 519 should look like this, or?

code_language.cerberus:
Method AddCheckbox:GuiCheckbox(x:int,y:Int,w:Int,h:Int,[B]selected[/B]:Bool)

2) I have attached a modified help file, yours gave some errors.

3) I think the example misses some graphics regarding the neon theme.
 

Attachments

  • cerberusdoc.zip
    3.2 KB · Views: 76

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Looks like I rushed the Checkbox code out. Silly mistakes.
and thank you for fixing the capitalisation in the docs too, I didnt realise that had to match CX.

Regarding the neon theme, I dont think ive populated all the gfx and it falls back on the previouly loaded theme if files cannot be loaded.
I might make an effort and finish it off.

This backlog of mine is getting larger... ;-)
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
@MikeHart oh and as you can see, I had good intentions for converting it all to mojo1 but never got round to it.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,845
Regarding the neon theme, I dont think ive populated all the gfx and it falls back on the previouly loaded theme if files cannot be loaded.
In the version i downloaded it doesn't fall back but crashes
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
ok . I might have a look tonight
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,845
Downloaded it again, and it works, in Release mode. In Debug mode it crashes on HTML5

Code:
Error - Unable to load image frames: neon-theme/../gui_default_slider.png
Error - Unable to load image: neon-theme/../gui_default_slider_back.png
slider image not available
slier back image not available
Cerberus Runtime Error : Error loading theme. Check log
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules_ext/gui/m2.cxs<173>
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules_ext/examples/gui_m2.cxs<144>
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules/mojo/app.cxs<113>
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Downloaded it again, and it works, in Release mode. In Debug mode it crashes on HTML5

Code:
Error - Unable to load image frames: neon-theme/../gui_default_slider.png
Error - Unable to load image: neon-theme/../gui_default_slider_back.png
slider image not available
slier back image not available
Cerberus Runtime Error : Error loading theme. Check log
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules_ext/gui/m2.cxs<173>
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules_ext/examples/gui_m2.cxs<144>
C:/Users/MikeHart/Desktop/CerberusX/Cerberus/modules/mojo/app.cxs<113>
Interesting. I'll check
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
lol - it errors because Ive put error checking in
code_language.cerberus:
#If CONFIG="debug"
        If CheckTheme() = False Then Error("Error loading theme. Check log")
#End
the theme needs fixing though as its a demo theme. I'll crack on with that
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Getting there...
font6.gif
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
0.6.0 has now been released with Pulldown option boxes.
Code:
Local menu:GuiOption = tab.AddOptions(100,100,200,20)
menu.SetOptions(["Option 1","Option 2","Option 3","Option 4"])

This will be expanded soon to allow for multi-select options.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,845
Will check it out asap. Also will try to create my own theme.
 
Top Bottom