Jump to content
Sign in to follow this  
Pennywise

Button image in description.ext

Recommended Posts

Hey guys, I'm trying to create a button that will allow you to set an image on it. I've tried everything in the descrption.ext. Here's what i currently have:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#define RAD_CT_BUTTON 1

#define RAD_ST_PICTURE 48

class CRscButtonPic {

type = RAD_CT_BUTTON;

idc = 211554;

x = 0.05;

y = 0.18;

w = 0.25;

h = 0.2;

sizeEx = 0.035;

style = RAD_ST_PICTURE;

font = RADFontTITLE;

colorBackground[] = {RAD_VB_BLACK, 0};

colorText[] = {1, 1, 1, 1};

};

When I set the text:

ctrlSetText [_idcPrimaryPicture, _primaryPic]

with a path to the picture, I get the actual text and not the picture displayed. This works for static resources, but I guess its not supported for buttons. If anybody has figured this out, please fill me in.

Share this post


Link to post
Share on other sites

You could use a blank button with a picture placed behind.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class RscPicture

{

access=3;

type=0;

idc=-1;

style=48;

colorBackground[]={0,0,0,0};

colorText[]={1,1,1,1};

font="tahomaB24";

sizeEx=0;

};

class RscButton

{

access=3;

type=1;

style=2;

w=0.16;

h=0.06;

colorText[]={0.08,0.08,0.12,1};

font="tahomaB24";

sizeEx=0.02;

default=0;

soundPush[]={"ui\ui_ok",0.2,1};

soundClick[]={"",0.2,1};

soundEscape[]={"ui\ui_cc",0.2,1};

};

class ButtonPic

{

idd=-1;

movingEnable=false;

controlsBackground[]={"Pic"};

controls[]={"Button"};

class Pic: RscPicture

{

idc=-1;

x=0.475;

y=0.475;

w=0.05;

h=0.05;

text="ismg.paa";

};

class Button: RscButton

{

idc=-1;

x=0.45;

y=0.45;

w=0.1;

h=0.1;

text="";

action="closeDialog 0";

};

};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×