1991mirec
Member
|
GUI
hi
Is it able to create some gui window which would be dragable outside of main window and stil dysplaing it? for example in tutorials 5/04 the window menu is dragable but how could i make it so it is dragable outside of main window.
thank you
sorry this should be in gui page..can i move it somehow there??
(This post was last modified: 05-17-2014 11:41 AM by 1991mirec.)
|
|
05-17-2014 11:40 AM |
|
1991mirec
Member
|
RE: GUI
anybody??
is that even possible??
|
|
05-18-2014 02:13 PM |
|
TBJokers
Member
|
RE: GUI
"Main window?" Do you mean the actual application window? if so then no.
However other wise you could replace the window class with your own ->
struct ExtendedWindow : Window
{
virtual void update(GuiPC &gpc){}
virtual void draw(GuiPC &gpc)
{
D.clip(NULL);
super::draw(gpc);
D.clip(gpc->parent); // <-- something like that or D.clip(screenRect());
}
};
GuiObjs myguiobject;
//Must be called before load!
myguiobject.replaceWindow<ExtendedWindow>();
myguiobject.load("");
There's that.
|
|
05-18-2014 03:15 PM |
|
1991mirec
Member
|
RE: GUI
i knew that.. about extended window but I meant app window.. i hoped that i can.. anyway thank you
|
|
05-18-2014 04:33 PM |
|
Rubeus
Member
|
RE: GUI
For what reason do you want a separate window? For a debug console, you can use LogConsole() and Log(). If you want 2 windows as part of your game, it may be easiest to make 2 separate windows that interact with each other via a connection through 127.0.0.1(self).
|
|
05-18-2014 07:06 PM |
|
1991mirec
Member
|
RE: GUI
(05-18-2014 07:06 PM)Rubeus Wrote: For what reason do you want a separate window? For a debug console, you can use LogConsole() and Log(). If you want 2 windows as part of your game, it may be easiest to make 2 separate windows that interact with each other via a connection through 127.0.0.1(self).
thank you rubeus
do you remember about the sql window i wrote one thread before this one.. you guys convinced me that it would be the best to keep those informations in the application so i would like to have a button there that would open another gui in that window which would be dragable outside of that window and i can work in application while having the gui away of the app window so i can keep cheking positions and do something else while window would be open in separate window
so do you thing that s the only way how i can have the separate window in app
|
|
05-18-2014 07:44 PM |
|
Rubeus
Member
|
RE: GUI
In your app Init() function, write LogConsole();. Whenever you want to output information, use something like
if(Kb.bp(KB_O)) Log( S + "Position: " + T.pos() + "\n");
When LogConsole() has been called, any argument of Log(...) is printed to a separate console window(instead of to a log file).
LogConsole() is a lot easier than making a GUI to print debug intormation.
|
|
05-18-2014 08:14 PM |
|
1991mirec
Member
|
RE: GUI
thank you rubeus.. now i thing i got it.. thank you for your help guys
|
|
05-18-2014 09:04 PM |
|