Jump to content
7erra

ctrlSetTextSecondary and ctrlTextSecondary

Recommended Posts

Hello everyone,

 

I was messing around in the Poseidon sqf editor when autocompletion suggested me this command:

_ctrl ctrlSetTextSecondary "Text";
ctrlTextSecondary _ctrl;

When you enter this in the ArmA console autocompletion suggests it as well, but apparently there is no trace of this command anywhere on the internet (only on the All ArmA commands page). It is not explained anywhere. My tests with setting the text on several controls didn't do anything so the question is:

What does it do?

If someone knows please tell me since I am very interested in everything regarding dialogs. If not then it's also fine because I've survived this far without these commands.

 

Greetings,

 

Terra

 

  • Like 1

Share this post


Link to post
Share on other sites

Not sure what it does but I have seen it (textSecondary, fontSecondary etc) in the definition for RscShortcutButton (for example, the class definitions from BIS_fnc_exportGUIBaseClasses).


RscShortcutButton

Spoiler

class RscShortcutButton {
	type = CT_SHORTCUTBUTTON;
	x = 0.1;
	y = 0.1;
	class HitZone {
		left = 0;
		top = 0;
		right = 0;
		bottom = 0;
	};
	class ShortcutPos {
		left = 0;
		top = ((GUI_GRID_HAbs / 20) - GUI_TEXT_SIZE_MEDIUM) / 2;
		w = GUI_TEXT_SIZE_MEDIUM * (3/4);
		h = GUI_TEXT_SIZE_MEDIUM;
	};
	class TextPos {
		left = GUI_TEXT_SIZE_MEDIUM * (3/4);
		top = ((GUI_GRID_HAbs / 20) - GUI_TEXT_SIZE_MEDIUM) / 2;
		right = 0.005;
		bottom = 0;
	};
	textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";
	color[] = {1,1,1,1};
	colorFocused[] = {1,1,1,1};
	color2[] = {0.95,0.95,0.95,1};
	colorDisabled[] = {1,1,1,0.25};
	colorBackground[] =
	{
		"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
		1
	};
	colorBackgroundFocused[] = {
		"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
		1
	};
	colorBackground2[] = {1,1,1,1};
	soundEnter[] = {
		"\A3\ui_f\data\sound\RscButton\soundEnter",
		0.09,
		1
	};
	soundPush[] = {
		"\A3\ui_f\data\sound\RscButton\soundPush",
		0.09,
		1
	};
	soundClick[] = {
		"\A3\ui_f\data\sound\RscButton\soundClick",
		0.09,
		1
	};
	soundEscape[] = {
		"\A3\ui_f\data\sound\RscButton\soundEscape",
		0.09,
		1
	};
	class Attributes {
		font = "RobotoCondensed";
		color = "#E5E5E5";
		align = "left";
		shadow = "true";
	};
	idc = -1;
	style = ST_LEFT;
	default = 0;
	shadow = 1;
	w = 0.183825;
	h = (GUI_GRID_HAbs / 20);
	textSecondary = "";
	colorSecondary[] = {1,1,1,1};
	colorFocusedSecondary[] = {1,1,1,1};
	color2Secondary[] = {0.95,0.95,0.95,1};
	colorDisabledSecondary[] = {1,1,1,0.25};
	sizeExSecondary = GUI_TEXT_SIZE_MEDIUM;
	fontSecondary = "RobotoCondensed";
	animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
	animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
	animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
	animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";
	animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";
	animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";
	periodFocus = 1.2;
	periodOver = 0.8;
	period = 0.4;
	font = "RobotoCondensed";
	size = GUI_TEXT_SIZE_MEDIUM;
	sizeEx = GUI_TEXT_SIZE_MEDIUM;
	class AttributesImage {
		font = "RobotoCondensed";
		color = "#E5E5E5";
		align = "left";
	};
};

 

 

 

[] spawn {
	disableSerialization;

	_display = findDisplay 46 createDisplay "RscDisplayEmpty";
	
	_button = _display ctrlCreate ["RscShortcutButton", 1231];
	_button ctrlSetPosition [0,0, safezoneW * 0.3, safezoneH * 0.3];
	_button ctrlSetBackgroundColor [0,0,0,1];
	_button ctrlSetTextSecondary "TextSecondary";
	_button ctrlSetText "Text";
	_button ctrlCommit 0;
};

 

Edited by HallyG
  • Like 2

Share this post


Link to post
Share on other sites

Amazing find @HallyG! This command seems to serve only one purpose which is setting the  centered text on the RscShortcutButton:

 

E1FZTmM.jpg

Code from HallyG (above)

  • Like 2

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

×