Jump to content
Sign in to follow this  
iceman77

Is it possible to make an UI image clickable?

Recommended Posts

Regarding dialogs, how is it possible to make a picture clickable? Or rather, how can I interact with one? When a player clicks the picture/.paa, I need for a script to happen. Or any sort of workaround. Any help is appreciated.

regards,

David

Edited by Iceman77

Share this post


Link to post
Share on other sites

I guess putting the picture in there as you normally would and then putting an invisible Button over it should do.

Share this post


Link to post
Share on other sites

i made this base class to make an invisible button

class RscInvisibleButton
{
   access = 0;
   type = 1;
   text = "";
   colorText[] = {0,0,0,0};
   colorDisabled[] = {0,0,0,0};
   colorBackground[] = {0,0,0,0};
   colorBackgroundDisabled[] = {0,0,0,0};
   colorBackgroundActive[] = {0,0,0,0};
   colorFocused[] = {0,0,0,0};
   colorShadow[] = {0,0,0,0};
   colorBorder[] = {0,0,0,0};
   soundEnter[] = {"",0.09,1};
   soundPush[] = {"",0.09,1};
   soundClick[] = {"\ca\ui\data\sound\new1",0.07,1};
   soundEscape[] = {"",0.09,1};
   style = 2;
   x = 0;
   y = 0;
   w = 0.095589;
   h = 0.039216;
   shadow = 2;
   font = "Bitstream";
   sizeEx = 0.03921;
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   borderSize = 0;
};

Share this post


Link to post
Share on other sites
i made this base class to make an invisible button

class RscInvisibleButton
{
   access = 0;
   type = 1;
   text = "";
   colorText[] = {0,0,0,0};
   colorDisabled[] = {0,0,0,0};
   colorBackground[] = {0,0,0,0};
   colorBackgroundDisabled[] = {0,0,0,0};
   colorBackgroundActive[] = {0,0,0,0};
   colorFocused[] = {0,0,0,0};
   colorShadow[] = {0,0,0,0};
   colorBorder[] = {0,0,0,0};
   soundEnter[] = {"",0.09,1};
   soundPush[] = {"",0.09,1};
   soundClick[] = {"\ca\ui\data\sound\new1",0.07,1};
   soundEscape[] = {"",0.09,1};
   style = 2;
   x = 0;
   y = 0;
   w = 0.095589;
   h = 0.039216;
   shadow = 2;
   font = "Bitstream";
   sizeEx = 0.03921;
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   borderSize = 0;
};

Sorry to bump the thread, but how would i use this for a diaglog picture (RscPicture) which looks like this:

	class ImageBTN: w_RscPicture
	{
		idc = -1;
		text = "menuIcons\image1.paa";

		x = 0.2745 * safezoneW + safezoneX;
		y = 0.166 * safezoneH + safezoneY;
		w = 0.600 * safezoneW;
		h = 0.650 * safezoneH;
	};

EDIT: Nvm, figured it out, thanks :)

Edited by Stapo

Share this post


Link to post
Share on other sites

You fancy writing what you did to fix it..

You should always write your fix..

Thanks

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  

×