memphisbelle 99 Posted March 21, 2009 Hello everybody, I´d like to ask about how can I realize a linebreak within a rsctext ressource? I already know that there´s a special define needed which has at first to be placed in the Description.ext and then in the subclass of the ressource, as shown in my example below. [b said: Quote[/b] ]#define CT_STATIC 0#define CT_LEFT 0 #define ST_CENTER 2 #define CT_STRUCTURED_TEXT  class RscText { type = CT_STATIC; idc = -1; style = ST_CENTER; h = 0.05; colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1}; font = "Zeppelin33Italic"; sizeEx = 0.050; }; class RscTitles{Titles[]={"Intro,...,..."}; class Intro { type = CT_STRUCTURED_TEXT Idd= -1; MovingEnable=False; Duration=5; FadeIn=1; Name="Intro"; Controls[]={"Intro"}; class Intro : RscText { I already know the Wiki source: Wiki Ressource description. I also located the linebreak desciption in the Wiki: _stxt3 = lineBreak (located at:http://community.bistudio.com/wiki/lineBreak). But I dont know how to handle that command like \n for titlecuts. Intro is the respective ressource which shall display the Text with linebreaks. But how can I define the break and what the hell does ArmA means with: [b said: Quote[/b] ]no entry/files/ArmA/missions/Missionname.Sara_dbe1/Intro.idd Thanks for any help Share this post Link to post Share on other sites
Przemek_kondor 14 Posted March 21, 2009 use http://community.bistudio.com/wiki/Dialog_Control#Structured_text with type = CT_STATIC; you can't do this Share this post Link to post Share on other sites
memphisbelle 99 Posted March 21, 2009 (Przemek_kondor @ Mar. 21 2009,20:29) said: with type = CT_STATIC; you can't do this Thanks for your reply. The thing is that I have a bunch of text ressources which are defined in one single line only, can I nevertheless change the define to type = CT_STRUCTURED_TEXT? (Przemek_kondor @ Mar. 21 2009,20:29) said: use http://community.bistudio.com/wiki/Dialog_Control#Structured_text What does it mean? Does it mean that I simply have to use <br/> within a line to break it into a second line? But how its ment while using a stringtable.csv. Can I use the same there as well? In the description: [b said: Quote[/b] ]text = "$STR_myText"; and in the stringtable: [b said: Quote[/b] ]STR_myText,"this line shall break<br/> right here","german translation", (Currently I am on work, otherwise I would just test it out before asking) Share this post Link to post Share on other sites
memphisbelle 99 Posted March 22, 2009 OK, I tried it out and it doesnt work. What do I have to do to define the structuredText Code within my Camscript? The Wiki is nice and it´s interesting to know what is possible to do, but HOW can I define the well described Commands within a camscript? The Wiki is not explaining that.... What do I mean? RSCText --> definition in a script:  titleRsc ["Text or $STR_string" , "Plain"] TitleText --> definition in a script: titlecut ["Text only String doesnt work" , "Plain"] Structured Text --> definition in a script: "?" Share this post Link to post Share on other sites
Przemek_kondor 14 Posted March 22, 2009 from wiki: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class MyRscStructuredText { idc = -1; type = CT_STRUCTURED_TEXT; // defined constant style = ST_LEFT; // defined constant colorBackground[] = { 1, 1, 1, 1 }; x = 0.1; y = 0.1; w = 0.3; h = 0.1; size = 0.018; text = ""; class Attributes { Â font = "TahomaB"; Â color = "#000000"; Â align = "center"; Â valign = "middle"; Â shadow = false; Â shadowColor = "#ff0000"; Â size = "1"; }; }; CT_STRUCTURED_TEXT constant should be defined earlier: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define CT_STRUCTURED_TEXT 13 when you call it, take somehow pointer to control, and you can write text with breaklines: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _control ctrlSetStructuredText (parseText "line1<br />line2"); for taking pointer to the control, you have to: -idc must be some number (not -1), for example 100 -add property to class which contains MyStructuredText class: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> onLoad = "myDisplay = _this select 0"; then _control variable will be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _control = myDisplay displayCtrl 100; example: description.ext: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define CT_STRUCTURED_TEXT 13 ... RscTitles { class My2Lines{ idd = 10; movingEnable = 1; duration = 10; fadein = 0; onLoad = "myDisplay = (_this select 0)"; name = "bla bla"; class controls { class DoubleLine { idc = 11; type = CT_STRUCTURED_TEXT; style = 0; size = 0.02; text = ""; font = "TahomaB"; ColorBackground[] = {0, 0, 0, 1}; x = 0.5; y = 0.5; w = 0.2; h = 0.3; class Attributes { font = "TahomaB"; color = "#00ff00"; align = "left"; valign = "middle"; shadow = true; shadowColor = "#000000"; size = "0.8"; };//attrib };//DoubleLine };//controls };//My2Lines };//RscTitle somewhere in mission: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> titleRsc["My2Lines", "PLAIN"]; _control = myDisplay displayCtrl 11; _control ctrlSetStructuredText (parseText "line1<br />line2"); Share this post Link to post Share on other sites
memphisbelle 99 Posted March 22, 2009 (Przemek_kondor @ Mar. 22 2009,14:54) said: when you call it, take somehow pointer to control,and you can write text with breaklines: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _control ctrlSetStructuredText (parseText "line1<br />line2"); Hmmm...and this is exactly what I dont get. Is it only possible to define the Text right within that syntax, or can I use a string instead of the text, but how would then the br tag behave to the string..... So my question is. Is a line break used in structured Text basically possible? From this point of view I would say no... Share this post Link to post Share on other sites
Przemek_kondor 14 Posted March 23, 2009 Sry, I don't understand what you mean text and string. When you write "text" do you mean text from stringtable.csv used directly in description.ext ? If you do, then I don't know how use it in that way (without additional script) Share this post Link to post Share on other sites