Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Changing Images for GUI (buttons)? (https://forums.graalonline.com/forums/showthread.php?t=77924)

Knightmare1 12-14-2007 02:24 AM

Changing Images for GUI (buttons)?
 
1 Attachment(s)
well, i am trying to make different GUIs for my server, like Events and Chatrooms, but i dont like the blue images. so how would i change them? i have a script test, what would change?
PHP Code:

new GuiWindowCtrl("window")
{
  
profile GuiBlueWindowProfile;
  
extent = {300,500};
  
position = {55};
  
text "This is the title";
  
  new 
GuiButtonCtrl("mybutton")
  {
    
profile GuiBlueButtonProfile;
    
extent = {10025};
    
position = {5,5};
    
text "Push me!";
  }
}


function 
mybutton.onAction()
{
  
player.chat "I pushed the button!";


posted image

DustyPorViva 12-14-2007 03:51 AM

PHP Code:

profile GuiBlueWindowProfile;
useownprofile true;
bitmap="image.png"

This applies for any profile.

EDIT: there is a profile specifically for bitmap buttons... so you might want to look that up on the wiki.

Knightmare1 12-14-2007 02:34 PM

Quote:

Originally Posted by DustyPorViva (Post 1363697)
PHP Code:

profile GuiBlueWindowProfile;
useownprofile true;
bitmap="image.png"

This applies for any profile.

EDIT: there is a profile specifically for bitmap buttons... so you might want to look that up on the wiki.

its still not working
PHP Code:

//#CLIENTSIDE
new GuiWindowCtrl("window"

  
profile GuiBlueWindowProfile
  
extent = {300,500}; 
  
position = {55}; 
  
text "This is the title"
   
  new 
GuiButtonCtrl("mybutton"
  { 
    
profile GuiBlueButtonProfile;
    
useownprofile true;
    
bitmap="gui_final-button.png"
    
extent = {10025}; 
    
position = {5,5}; 
    
text "Push me!"
  } 



function 
mybutton.onAction() 

  
player.chat "I pushed the button!"



Admins 12-14-2007 06:17 PM

The preferred method is to use GUI styles, download one from the web and then set "style = "mystyle.wba;" The blue style will probably also be converted to wba sometime.

The error in your example is that you need to do profile.bitmap = "gui_final-button.png"

DustyPorViva 12-14-2007 09:14 PM

Oh damn, I forgot the profile.bitmap part, sorry!

Crow 12-14-2007 09:56 PM

Quote:

Originally Posted by Stefan (Post 1363778)
The preferred method is to use GUI styles, download one from the web and then set "style = "mystyle.wba;" The blue style will probably also be converted to wba sometime.

The error in your example is that you need to do profile.bitmap = "gui_final-button.png"

I prefer gui images over .wba styles. Couldnt you write a program that eats gui images and converts them to .wba?

cbk1994 12-14-2007 11:19 PM

Quote:

Originally Posted by Crow (Post 1363795)
I prefer gui images over .wba styles. Couldnt you write a program that eats gui images and converts them to .wba?

No, he's too busy working on the Graal for Mac client I would hope :)

Knightmare1 12-15-2007 12:08 AM

2 Attachment(s)
i did that, and now it ends up as red middle, what would i change with the window image to make the color the one that is on the top?


attached window image and windowbitamp.

cbk1994 12-15-2007 02:27 PM

Not sure what you're asking?

projectigi 12-15-2007 02:36 PM

try
PHP Code:

 profile.fillcolor = {red,green,blue,alpha}; // default background color
 
profile.fillcolorhl = {red,green,blue,alpha}; // background color when active
 
profile.fillcolorna = {red,green,blue,alpha}; // background color when disabled 

of ocurse you have to put the color values for the top one into it :p

Knightmare1 12-15-2007 03:06 PM

1 Attachment(s)
i edited it, and now it looks like this.

projectigi 12-15-2007 04:02 PM

PHP Code:

profile.transparency 1

maybe?

Knightmare1 12-15-2007 05:08 PM

Quote:

Originally Posted by projectigi (Post 1363924)
PHP Code:

profile.transparency 1

maybe?

is that how to make the damn transperancy go away?

projectigi 12-15-2007 05:16 PM

Quote:

Originally Posted by Knightmare1 (Post 1363931)
is that how to make the damn transperancy go away?

ya o.รด

cbk1994 12-16-2007 05:32 AM

Quote:

Originally Posted by projectigi (Post 1363924)
PHP Code:

profile.transparency 1

maybe?

Wow, that looks EXACTLY like the Vesporia/Syn/SoG GUIs ...

Crow 12-16-2007 12:22 PM

Quote:

Originally Posted by cbkbud (Post 1364051)
Wow, that looks EXACTLY like the Vesporia/Syn/SoG GUIs ...

So, err...what's your point? o.o

projectigi 12-16-2007 01:20 PM

Quote:

Originally Posted by cbkbud (Post 1364051)
Wow, that looks EXACTLY like the Vesporia/Syn/SoG GUIs ...

uh, what? lol

cbk1994 12-16-2007 03:59 PM

Quote:

Originally Posted by Crow (Post 1364075)
So, err...what's your point? o.o

Scaring the **** out of him.

No, just commenting. The GUIs are almost exactly the same as Sands of Glory's. Just suspicious because he worked on a SoG revival server (which was shut down).

projectigi 12-16-2007 06:26 PM

Quote:

Originally Posted by cbkbud (Post 1364088)
Scaring the **** out of him.

No, just commenting. The GUIs are almost exactly the same as Sands of Glory's. Just suspicious because he worked on a SoG revival server (which was shut down).

me? O_o

Knightmare1 12-17-2007 07:13 PM

i didnt make it like sogs... i'll admit 1 thing is like sogs, its the arrows.. but i am working on another type of arrow, but they all turned ***.


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

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