Home   Help Search Login Register  

Author Topic: Structured Text  (Read 1287 times)

0 Members and 1 Guest are viewing this topic.

Offline Ext3rmin4tor

  • Members
  • *
Structured Text
« on: 03 Jun 2010, 13:09:15 »
I have two structured text inside a dialog:

Code: [Select]
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.
« Last Edit: 03 Jun 2010, 13:10:53 by Ext3rmin4tor »
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline ModestNovice

  • Members
  • *
Re: Structured Text
« Reply #1 on: 05 Jun 2010, 01:02:40 »
I'm not really sure what you are talking about. But I think to change text use this:
Code: [Select]
((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.
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Ext3rmin4tor

  • Members
  • *
Re: Structured Text
« Reply #2 on: 05 Jun 2010, 12:38:48 »
Thanks, That's exactly what I needed
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline ModestNovice

  • Members
  • *
Re: Structured Text
« Reply #3 on: 05 Jun 2010, 20:08:04 »
No problem, happy to help :).
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley