Home   Help Search Login Register  

Author Topic: Pass a string of text to a dialog class  (Read 3144 times)

0 Members and 1 Guest are viewing this topic.

Offline Iceman77

  • Members
  • *
Pass a string of text to a dialog class
« on: 11 Jan 2013, 03:55:59 »
I would like to pass a string of text to a dialog class (or w/e its called). I see that 0 = ["some text"] createdialog "RscIceDialog" isn't even an option apparently.

Description.ext Snippet
Code: [Select]
    class ICE_ObjDesc: RscText
                {
                     idc = 1000;
                     text = "some text"; // Would like to be _this select 0
                     x = 0.40238 * safezoneW + safezoneX;
                     y = 0.430476 * safezoneH + safezoneY;
                     w = 0.191666 * safezoneW;
                     h = 0.0280952 * safezoneH;
                };

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Pass a string of text to a dialog class
« Reply #1 on: 11 Jan 2013, 17:52:57 »
I guess there's more elegant way of doing this but you could try if set/getVariable works :dunno:
Code: [Select]
missionNamespace setVariable ["myvaribname","string to the dialog"]
Code: [Select]
    class ICE_ObjDesc: RscText
                {
                     idc = 1000;
                     text = missionNamespace getVariable "myvaribname";
                     x = 0.40238 * safezoneW + safezoneX;
                     y = 0.430476 * safezoneH + safezoneY;
                     w = 0.191666 * safezoneW;
                     h = 0.0280952 * safezoneH;
                };

Possible though that the text property actually expects a string instead of code..  :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline ModestNovice

  • Members
  • *
Re: Pass a string of text to a dialog class
« Reply #2 on: 04 Feb 2013, 22:24:03 »
Code: [Select]
createDialog "RceIceDialog";
((findDisplay YOUR_DLG_IDD) displayCtrl 1000) ctrlSetText (_this select 0);
"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