PDA

View Full Version : Changing Images for GUI (buttons)?


Knightmare1
12-14-2007, 02:24 AM
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?
new GuiWindowCtrl("window")
{
profile = GuiBlueWindowProfile;
extent = {300,500};
position = {5, 5};
text = "This is the title";

new GuiButtonCtrl("mybutton")
{
profile = GuiBlueButtonProfile;
extent = {100, 25};
position = {5,5};
text = "Push me!";
}
}


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


posted image

DustyPorViva
12-14-2007, 03:51 AM
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
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
//#CLIENTSIDE
new GuiWindowCtrl("window")
{
profile = GuiBlueWindowProfile;
extent = {300,500};
position = {5, 5};
text = "This is the title";

new GuiButtonCtrl("mybutton")
{
profile = GuiBlueButtonProfile;
useownprofile = true;
bitmap="gui_final-button.png";
extent = {100, 25};
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
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
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
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

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
i edited it, and now it looks like this.

projectigi
12-15-2007, 04:02 PM
profile.transparency = 1;
maybe?

Knightmare1
12-15-2007, 05:08 PM
profile.transparency = 1;
maybe?

is that how to make the damn transperancy go away?

projectigi
12-15-2007, 05:16 PM
is that how to make the damn transperancy go away?

ya o.

cbk1994
12-16-2007, 05:32 AM
profile.transparency = 1;
maybe?

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

Crow
12-16-2007, 12:22 PM
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
Wow, that looks EXACTLY like the Vesporia/Syn/SoG GUIs ...

uh, what? lol

cbk1994
12-16-2007, 03:59 PM
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
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 ***.