Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Making GUI Controls invisible (https://forums.graalonline.com/forums/showthread.php?t=134260882)

Cubical 10-20-2010 02:06 AM

Making GUI Controls invisible
 
Is it possible to make GUI controls invisible but still be able to click them? I assume all you have to do is use a transparent image and custom profile.

Mark Sir Link 10-20-2010 02:10 AM

If you want to make a control invisible, you can just set the GUI Control to use own profile and set profile transparency to 0.

PHP Code:

new GuiWindowCtrl("Window"){
  
profile = GuiBlueWindowCtrl;
  
useownprofile = true;
  
profile.transparency = 0;
} 


fowlplay4 10-20-2010 02:10 AM

You could just use a generic GuiControl.

PHP Code:

new GuiControl("Example") {
  
x = 0;
  
y = 0;
  
width = screenwidth;
  
height = screenheight;
} 

I used something like that to prevent people from respawning when default heart systems were used.

Cubical 10-20-2010 02:18 AM

Quote:

Originally Posted by fowlplay4 (Post 1607472)
You could just use a generic GuiControl.

PHP Code:

new GuiControl("Example") {
  
x = 0;
  
y = 0;
  
width = screenwidth;
  
height = screenheight;
} 

I used something like that to prevent people from respawning when default heart systems were used.


so just dont define a profile?

fowlplay4 10-20-2010 02:24 AM

Quote:

Originally Posted by Cubical (Post 1607477)
so just dont define a profile?

Well GuiControl is the base container for all GuiObjects, it's got all the functionality you want and is 'invisible' on-screen by default.

http://wiki.graal.net/index.php/Crea...ent/GuiControl

Mark Sir Link 10-20-2010 02:24 AM

Quote:

Originally Posted by Cubical (Post 1607477)
so just dont define a profile?

a GUI Control on it's own doesn't have any real definition to how it looks. One created like that will just be a giant transparent field.

If you're wanting to create buttons and such using the existing GuiControls, i.e: GuiWindowCtrl, GuiButtonCtrl, then you'd want to use the approach I posted.

Cubical 10-20-2010 02:27 AM

Quote:

Originally Posted by fowlplay4 (Post 1607479)
Well GuiControl is the base container for all GuiObjects, it's got all the functionality you want and is 'invisible' on-screen by default.

http://wiki.graal.net/index.php/Crea...ent/GuiControl

Oh, I misread what you said. I didn't think about that, thanks.

MrOmega 10-20-2010 07:11 AM

Could just do GraalControl.onMouseMove() and check the mousescreenx/mousescreeny with params 1 and params 2.


All times are GMT +2. The time now is 11:05 PM.

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