Jump to content
Adam Kadmon

I'm stuck with RcsPicture.

Recommended Posts

Aight so here we go.

 

I am trying to make a script that pops up a dialog with some buttons to press in order to paint an object.

 

This is how my Picture part of it looks like.

 

class RscPaintPicture
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = 0;
	idc = -1;
	style = 48;
	colorBackground[] ={0,0,0,0};
	colorText[] ={1,1,1,1};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	fixedWidth = 0;
	shadow = 0;
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
	tooltipColorText[] ={1,1,1,1};
	tooltipColorBox[] ={1,1,1,1};
	tooltipColorShade[] ={0,0,0,0.65};
};
class Paintdialog
{
 class controls
 {
		class RscPicture_White: RscPaintButton
		{
			idc = 1200;
			text = "";
			colorBackground[] ={1,1,1,1};
			colorFocused[] ={1,1,1,1};
			colorBackgroundActive[] ={1,1,1,0.6};
			x = -1 * GUI_GRID_W + GUI_GRID_X;
			y = 8 * GUI_GRID_H + GUI_GRID_Y;
			w = 6 * GUI_GRID_W;
			h = 5 * GUI_GRID_H;
			tooltip = "White";
			action = "['White'] spawn GG_fnc_BasePaint_onButtonClick";
};

And up until here everything looks good.

 

When I started this script, all I was doing was painting with regular colors: White, Blue, Red, etc.

 

Then I decided to change my colors with textures so I simply changed my code to:

 

FROM

switch (_colorPaint) do { 
	case "White" : { 
		_smokeClass = "SmokeShell"; 			
		_texture = "\A3\Data_F\Flags\flag_white_co.paa";

TO


switch (_colorPaint) do { 
	case "White" : { 
		_smokeClass = "SmokeShell"; 			
		_texture = "BasePaint\images\afghancamo.paa";
	};	

After all this, I wanted to actually change the picture from a plain color to a text, so I moved afghancamo.paa to the mission file and redid my function as it follows:

class RscPaintPicture
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = 0;
	idc = -1;
	style = 48;
	colorBackground[] ={0,0,0,0};
	colorText[] ={1,1,1,1};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	fixedWidth = 0;
	shadow = 0;
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
	tooltipColorText[] ={1,1,1,1};
	tooltipColorBox[] ={1,1,1,1};
	tooltipColorShade[] ={0,0,0,0.65};
};
class Paintdialog
{
 class controls
 {
		class RscPicture_White: RscPaintButton
		{
			idc = 1200;
			text = "afghancamo.paa";
			x = -1 * GUI_GRID_W + GUI_GRID_X;
			y = 8 * GUI_GRID_H + GUI_GRID_Y;
			w = 6 * GUI_GRID_W;
			h = 5 * GUI_GRID_H;
			tooltip = "White";
			action = "['White'] spawn GG_fnc_BasePaint_onButtonClick";
};

But apparently no success.

I tried to change both my style and type various times, using  ST_PICTURE ,  ST_TILE_PICTURE , CT_ANIMATED_TEXTURE, a mix and match of everything but at the end of the day this is always my result:

 

uomu3RL.jpg

 

Either this, or the text is not even showing.

 

Does anyone have any idea how I can solve this?

Share this post


Link to post
Share on other sites

As far as I know, the only way to make a button with a texture file is using active text.

 

class RscActiveText
{
	idc = -1;
	type = CT_ACTIVETEXT;
	style = ST_PICTURE;
	x = 0.75; 
	y = 0.5;
	w = 0.2; 
	h = 0.035;
	font = PuristaMedium;
	sizeEx = 0.024;
	color[] = { 1, 1, 1, 1 };
	colorActive[] = { 1, 0.2, 0.2, 1 };
	colorDisabled[] = {1,1,1,1};
	soundEnter[] = { "", 0, 1 };   // no sound
	soundPush[] = { "", 0, 1 };
	soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; // basic button sound
	soundEscape[] = { "", 0, 1 };
	action = "";
	tooltip = "";
	text = "";  // texture location
	default = true;
};

 

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, soolie said:

As far as I know, the only way to make a button with a texture file is using active text.

 

So given the fact that the other function besides the RcsPicture are those:

 

class RscPaintText
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] ={0,0,0,0};
	colorText[] ={1,1,1,1};
	text = "";
	fixedWidth = 0;
	x = 0;
	y = 0;
	h = 0.037;
	w = 0.3;
	style = 0;
	shadow = 0;
	colorShadow[] ={0,0,0,0.5};
	font = "RobotoCondensed";
	SizeEx = "(((((safezoneW / safezoneH) min 0.9) / 1.2) / 25) * 1)";
	linespacing = 1;
	tooltipColorText[] ={1,1,1,1};
	tooltipColorBox[] ={1,1,1,1};
	tooltipColorShade[] ={0,0,0,0.65};
};
class RscPaintStructuredText
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = 13;
	idc = -1;
	style = 0;
	colorText[] ={1,1,1,1};
	class Attributes
	{
		font = "RobotoCondensed";
		color = "#ffffff";
		colorLink = "#D09B43";
		align = "left";
		shadow = 1;
	};
	x = 0;
	y = 0;
	h = 0.035;
	w = 0.1;
	text = "";
	size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
	shadow = 1;

Should I just change the RCSPicture to active text or something else?

Share this post


Link to post
Share on other sites
class RscPicture_White: RscPaintButton

RscPaintButton should be RscActiveText and RscActiveText needs to be defined somewhere using what I gave you. 

 

Feel free to check out my GUI Tutorial

 

  • Like 1

Share this post


Link to post
Share on other sites
On 1/28/2017 at 11:09 AM, soolie said:

class RscPicture_White: RscPaintButton

RscPaintButton should be RscActiveText and RscActiveText needs to be defined somewhere using what I gave you. 

 

Feel free to check out my GUI Tutorial

 

Btw forgot to thank you,

 

That was it! :)

  • Like 1

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

×