Gui update problem
by University of Gotland (#0017) · in Game Design and Creative Issues · 04/13/2007 (1:39 am) · 2 replies
I have a gui that if you push a button the picture inside the gui will change, but when i push the button nothing happens, at first.. but if i go back to my main menyGui and then go back to my other gui the picture has change to the one i want, and i can't understand why
this is what i done..
this is the picture i want to exchange
new GuiBitmapCtrl(garageDisplay) {
canSaveDynamicFields = "0";
Profile = "GuiInspectorBackgroundProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "12 12";
Extent = "492 581";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
bitmap = "~/data/shapes/knappar/garage3.jpg";
wrap = "0";
};
i created a function
function bytaBild()
{
garageDisplay.bitmap = "DallesTestGui/data/shapes/knappar/alienConcept2.jpg";
echo("byta bild");
}
then i call the function in my button..
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "top";
position = "90 728";
Extent = "179 38";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "bytaBild();";
Accelerator = "X";
hovertime = "1000";
text = "Button";
groupNum = "1";
buttonType = "RadioButton";
bitmap = "~/data/shapes/knappar/kygu";
};
but it will not change untill i go out of the gui and back again..
and if i press F10 the picture that i change to will show..
i'm cluless
this is what i done..
this is the picture i want to exchange
new GuiBitmapCtrl(garageDisplay) {
canSaveDynamicFields = "0";
Profile = "GuiInspectorBackgroundProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "12 12";
Extent = "492 581";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
bitmap = "~/data/shapes/knappar/garage3.jpg";
wrap = "0";
};
i created a function
function bytaBild()
{
garageDisplay.bitmap = "DallesTestGui/data/shapes/knappar/alienConcept2.jpg";
echo("byta bild");
}
then i call the function in my button..
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "top";
position = "90 728";
Extent = "179 38";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "bytaBild();";
Accelerator = "X";
hovertime = "1000";
text = "Button";
groupNum = "1";
buttonType = "RadioButton";
bitmap = "~/data/shapes/knappar/kygu";
};
but it will not change untill i go out of the gui and back again..
and if i press F10 the picture that i change to will show..
i'm cluless
About the author
Torque Owner CdnGater
Duggan Software Studio
eg:
function bytaBild() { garageDisplay.setBitmap("DallesTestGui/data/shapes/knappar/alienConcept2.jpg"); echo("byta bild"); }