GLBasic forum

Codesnippets => DD-GUI => Topic started by: Julian on 2012-Oct-16

Title: DDgui_set without DDgui_pushdialog
Post by: Julian on 2012-Oct-16
I am using DDGui only for some specific parts of my application. That means that I sometimes use DDgui_msg() without an actual Dialog. The problem is that I can't set the color scheme without one. When I try to call for example DDgui_set("","COL_NORM",RGB(0,0,0)) the program just crashes. I know I could "hardcode" the colors but thats not a nice solution. Is there another way?
Title: Re: DDgui_set without DDgui_pushdialog
Post by: MrTAToad on 2012-Oct-18
It will crash without a dialog window due to there being nothing on the stack that it uses.   Probably the only way to do overwrite it would be to call ddgui_init and use ddgui_set after it is called.

Or perhaps even easier - modify ddgui_msg to call the "COL_xxx" set of commands inside the function.
Title: DDgui_set without DDgui_pushdialog
Post by: Kitty Hello on 2012-Oct-18
The colxxx are global variables, no?
Title: Re: DDgui_set without DDgui_pushdialog
Post by: MrTAToad on 2012-Oct-19
They are in a TYPE, which is used by a global array!