Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gui stuff (https://forums.graalonline.com/forums/showthread.php?t=81587)

[email protected] 08-31-2008 06:58 PM

gui stuff
 
two things

i'm drawing text over the part of my guiwindowctrl so that it's stopping the dragging of that window. is there a way to make it even if i drag the text it'll drag the window?

how can i tell once a gui has been closed [by the x in the corner] [is there a function?]

Crow 08-31-2008 07:00 PM

Second issue:

Quote:

Originally Posted by wiki.graal.net
onCloseQuery() - is invoked when the user clicks on the close-button of a window and closequery=true; the script should then either hide or destroy the window; if closequery=false then the window is just hidden (not destroyed)


Chompy 08-31-2008 07:01 PM

onCloseQuery() is triggered when you have closequery=true; in the gui (You have to script the hiding/destroy of the gui then yourself)


And, adjust the window while you drag the text? Or is the window bickering then?

[email protected] 08-31-2008 07:04 PM

thanks ^^ ^^


well, on the guiwindowctrl i didn't use the 'text=stuff', instead i made my own text guitextctrl and re-positioned that over the part that allows dragging of the guiwindowctrl, i basically want to push that text back and so that the window is selected instead of the text for dragging

xXziroXx 08-31-2008 07:15 PM

Quote:

Originally Posted by [email protected] (Post 1419387)
well, on the guiwindowctrl i didn't use the 'text=stuff', instead i made my own text guitextctrl and re-positioned that over the part that allows dragging of the guiwindowctrl, i basically want to push that text back and so that the window is selected instead of the text for dragging

Just create the GuiTextCtrl as a child to GuiWindowCtrl and have it positioned up there? :confused:

[email protected] 08-31-2008 07:24 PM

well, the position of the GuiTextCtrl is still blocking it, unless you mean there is a command to do that...?

Basically, it goes:
HTML Code:

guiWindowCtrl() {
  //stuff
  guiTextCtrl() {
    position = {x, - 30}; //Will draw it on the guiWindowCtrl tab
  }
}


xXziroXx 08-31-2008 07:28 PM

Oh, you mean like that... well... I don't think there's a way around making it not stealing focus, you can manually script so that if you "select" the text control and move the pointer, it behaves the same as the GuiWindowCtrl would.

Inverness 08-31-2008 07:29 PM

In the text that's drawn over the window, set active = false;

xXziroXx 08-31-2008 07:34 PM

Quote:

Originally Posted by Inverness (Post 1419402)
In the text that's drawn over the window, set active = false;

Duh. :noob:

Inverness 08-31-2008 07:46 PM

Quote:

Originally Posted by xXziroXx (Post 1419403)
Duh. :noob:

I'll assume you were calling yourself a noob.

I mean its not like setting active to false in a GUI control makes it so it doesn't steal focus right? :rolleyes:

[email protected] 08-31-2008 08:17 PM

inverness you rock my world

xXziroXx 08-31-2008 10:43 PM

Quote:

Originally Posted by Inverness (Post 1419404)
I'll assume you were calling yourself a noob.

Good assumption there, Inverness-kun.


All times are GMT +2. The time now is 06:37 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.