OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Ext3rmin4tor on 03 Jun 2010, 13:09:15
-
I have two structured text inside a dialog:
class StructuredText
{
idc = -1;
type = CT_STRUCTURED_TEXT; // defined constant
style = ST_LEFT; // defined constant
size = 0.018;
colorBackground[] = { 1, 1, 1, 1 };
class Attributes
{
font = FontM;
color = "#000000";
align = "center";
valign = "middle";
shadow = false;
shadowColor = "#ff0000";
size = "1";
};
};
// this two classes inherit the first one and are inside the main dialog control class
class Hint : StructuredText
{
idc = 300;
style = ST_CENTER;
x = 0.25;
y = 0.75;
w = 0.9;
h = 0.1;
text = "";
};
class Description : StructuredText
{
idc = 301;
style = ST_CENTER;
x = 0.25;
y = 0.47;
w = 0.7;
h = 0.4;
text = "";
};
(the code is not complete)
I want to set the text for both the control so i should use setStructuredText. The problem is that I usually use dialog control commands that use dialog idc to refer the dialog itself, but this one uses a new variable type introduce with ArmA called "Control".
How do I refer to my two structured text definitions in order to change their text with a Control variable type? Basically I want to change the text of those controls.
-
I'm not really sure what you are talking about. But I think to change text use this:
((findDisplay DLG_IDD) displayCtrl 300) ctrlSetStructuredText "This is my text.";
Obviously change DLG_IDD to the number you are using as the idd of your dialog.
-
Thanks, That's exactly what I needed
-
No problem, happy to help :).