About Store Forum Documentation Contact



Post Reply 
Change img valor
Author Message
WiLLyRS Offline
Member

Post: #1
Change img valor
Hi guys, how can I change the image value of a button gui object for -obviously- changing its image? With the code, i mean!
(This post was last modified: 05-17-2011 08:34 AM by WiLLyRS.)
05-17-2011 08:24 AM
Find all posts by this user Quote this message in a reply
rndbit Offline
Member

Post: #2
RE: Change img valor
check style->image_back or something similar
05-17-2011 11:12 AM
Find all posts by this user Quote this message in a reply
WiLLyRS Offline
Member

Post: #3
RE: Change img valor
button->style doesn't exist
there is button->image with default "&Gui.imagebutton" but i can't understand how manipulate it. If I try

myButton->image = &Gui.imagebutton; it gives me errors :S
05-17-2011 01:26 PM
Find all posts by this user Quote this message in a reply
WiLLyRS Offline
Member

Post: #4
RE: Change img valor
I've tried

Image myHand0;
myHand0.Import(S + "gfx/mCards/" + card->name + ".gfx", -1, -1, -1);
my0->image=&myHand0;

but result is BadPtr :( it this the way to do it?
05-17-2011 09:24 PM
Find all posts by this user Quote this message in a reply
Morto Offline
Member

Post: #5
RE: Change img valor
Hi WiLLyRS,

first understand that i am a complete junnior to programing, still learning.

one solution to your problem is to look at the way Esenthel loads the SUN gfx.

for example try this.
Code:
my0->image=Images(S + "gfx/mCards/" + card->name + ".gfx");

this was just one solution i found trying to get a image loaded in to a button, again i am new to programing.
05-18-2011 11:00 AM
Find all posts by this user Quote this message in a reply
Post Reply