Jump to content
iceman77

Dialog Tutorial For Noobs [By A Noob]

Was this guide helpful  

120 members have voted

  1. 1. Was this guide helpful

    • Yes
      107
    • No
      3


Recommended Posts

I'm interested in making a small resource sometime in the future.

I need to be able to move while it's displayed so I'm interested in the above.

But what files would I need and how would I name them so I can get the example working.

Share this post


Link to post
Share on other sites

Thanks deadfast, that was immensely helpful. Cleared up all the confusion. Also thanks to Iceman, you both made this topic a one stop problem solver for us HUD/DIALOG coding newbs.

Share this post


Link to post
Share on other sites

Yeah that's awesome of deadfast to post some example code. I'll def need to use cutRsc / rscTitles soon.

Share this post


Link to post
Share on other sites

Hey. Glad it was of use to you. I may update it sometime.

Share this post


Link to post
Share on other sites
Hey. Glad it was of use to you. I may update it sometime.

I was always told that creating a dialog was a very difficult task, so I always put off learning how to make one.

I looked at your example and understood it immediately. Again, thanks! :)

This tutorial helped me make an iPhone that players can use on my Life server.

http://oi45.tinypic.com/24mte1z.jpg (423 kB)

This thread should be stickied.

Edited by zooloo75

Share this post


Link to post
Share on other sites

My "Forgive" team killer dialog appears for the victim when he/she is dead, but the scoreboard is in the way. I don't want to disable the scoreboard completely throughout the entire mission for all players, but if I could either temporarily hide the scoreboard until the victim chooses "forgive yes/no" or have my dialog appear in front of the score board, then I could solve the problem. I figured the easiest method would be to have the dialog appear in front of the scoreboard, but I don't know how to do this. Any ideas as to how I could do this?

---------- Post added at 04:00 PM ---------- Previous post was at 03:18 PM ----------

I guess I could simply move the dialog over to the right a little - out of the way of the scoreboard. But I would still like to know if there is a way to hide the scoreboard momentarily.

Share this post


Link to post
Share on other sites

That's a good question. You could make a fairly short respawn time, and have your dialog popup upon player respawn, using the normal respawn eh (not mprespawn). My 2c.

Share this post


Link to post
Share on other sites

I moved the dialog over to the right where a hint message would normally appear. It works fine. It's actually better this way since I do want the team killed victim to be able to see the scoreboard. I tested it at different resolutions and it looks good and does not get in the way of the scoreboard at all. I added a 20 sec countdown timer that can be seen in the dialog window and if players do not choose "Yes" or "No" the dialog will self-close after the 20 sec timer expires and default to "No".

When I first tried to create a dialog for a mission a while back, I struggled to get it to work. There were very few dialog tutorials out there, if any, and most did not make much of any sense. The only good tutorial I found was at the ofpec website and later that same day their site was put "under construction", so I got all of about an hour to view the tutorial, which wasn't long enough. Ever since then their dialog tutorial page still says "under construction".

I eventually figured out how to create a dialog and I made several in my mission that are exactly like the one in Iceman77's tutorial. For instance, in my mission, I added an action to all players that allows then for to deploy a static GPMG every ten minutes, but sometimes players will accidentally choose the action when they did not mean to and it suddenly deploys the static tripod machine gun in a place that is useless and then they cannot deploy it again for ten minutes. So I wanted to create a dialog that would appear if they choose the action that asks them "Deploy GMPG?" with a "Yes" & "No" buttons. This prevents players from accidentally deploying the GPMG in a useless place. I also added an image in the dialog for the players that do not know what a GPMG is, so they can actually see what it looks like in the image - letting them know exactly what it is that they would be deploying. I added additional checks in the script so players are warned that they cannot deploy the GPMG within 150 meters of base, or deploy the GPMG above ground level. And after the GMPG is deployed, if they try to deploy another GPMG before the 10 minutes has passed, they are given a hint message telling them something like... "00:08:23 remaining before you can deploy a new GPMG". Players in my mission also have the ability to "Request Vehicle Drop" every ten minutes and it also uses a Yes/No dialog with a picture of a vehicle dropping. The leader in my mission can deploy a Rally Point every 10 minutes that teammates can teleport to, which also uses a Yes/No dialog so the leader won't accidentally deploy the Rally Point.

The reason why I wanted to tell people about how I use the dialogs in my mission is because a lot of mission creators do add actions to players that allow them to be able to do special things - and most often players will accidentally choose an action when they did not wish to. So dialogs are very helpful - and it makes any mission seem more professional in design.

Anyway, I eventually learned how to make my first dialog by downloading Curry's View Distance script from Armaholic. I remembered that his view distance script used a simple dialog similar to what I wanted to create for my mission. But I had a lot of problems dissecting his script and trying to create my own. I later stumbled across the GUI Editor by Karel Moricky, which is the same GUI editor that Iceman77 suggested to use in this thread. It is really amazing how helpful the GUI editor can be. It saves hours of work, but it was never advertised to the public enough, and many mission creators don't even know that it exists.

This thread is extremely useful and Iceman77's tutorial and sample mission helps make creating dialogs much easier, especially for somebody trying to create a dialog for the first time. I wish this thread existed back when I was struggling to create my first dialog. To me, writing some script for a mission is completely different than creating a dialog - they just seem like tow totally different worlds. I think this thread should be sticky'd so it never gets buried.

I personally wish to thank Iceman77 and Karel Moricky for their efforts. Oh, and you too Curry :)

Share this post


Link to post
Share on other sites

Yeah no worries man. I made the tutorial, because I knew how difficult it is to start making a UI, especially, since most don't even know where to begin. But, once the ball is rolling, it's actually very simple.

Share this post


Link to post
Share on other sites

I surrender and ask the noob-question I can't answer... :)

How do I create a text dialog (a rather small window) in my dialog system where I can put in a large text and where the player can scroll down and up this text?

Thanks a lot for your help!

Share this post


Link to post
Share on other sites

Don't wanna steal precious space, but I need to thank for both IceMan77 and Deadfast for clarifying these issues. I've been fighting with them for like 2 years, (I could always made what I wanted, but never understood what I was really doing.) Now it is all clear.

Share this post


Link to post
Share on other sites
I surrender and ask the noob-question I can't answer... :)

How do I create a text dialog (a rather small window) in my dialog system where I can put in a large text and where the player can scroll down and up this text?

Thanks a lot for your help!

Sorry for bumping this - can anyone help me with this? Thanks a lot! :o

Share this post


Link to post
Share on other sites

Awesome! Can't wait to get some dialogs in my missions! Thanks for taking the time to help noobs like me ;)

Share this post


Link to post
Share on other sites

Can anyone tell me how to do this at the addon level and not the mission level?

In a config rather than a description.

Share this post


Link to post
Share on other sites

This has been a wonderful resource. Dialogs have always been forbidden ground for me until now. Thanks a lot for taking the time to demystify it for us.

Share this post


Link to post
Share on other sites

@Iceman77 i just want to say thank you for this post. For 1 year i have been wondering how to make dialogs and now i can make them :)

Share this post


Link to post
Share on other sites

This is NOT currently compatible with ArmA 3. :(

I tried to go ahead and play with it anyway, as this looks great to get started:

1. There is NO Desert Map in ArmA 3; only (beta) Stratis.

2. Tried GUI Editor. Get 'stra_gui' requires addon 'CAUI'

3. Went forward anyway. When testing to Call with Trigger - Crashes Game!

So never made it past pg16 on the .pdf Tutorial. Anyone know how to fix?

UPDATE:

I see its now built-in to the A3 Editor now. Cool. But still can't get the dialog to work.

So you can skip 1 & 2. I'm wondering if there is something simple I'm missing...

Edited by Goblin

Share this post


Link to post
Share on other sites

Thanks for the feedback. I've only just gotten A3 Beta today. I've Been away from Arma in general for many months. I can revise the tutorial as soon as I realize what changes need to be made. However the basic principles of this current tutorial should be valid to A3 dialogs, aside from the GUI editor & aside from a few (or many maybe) new defines, styles, fonts etc etc. Such as the transparent gradient style seen on the vanilla weapon HUD. Which can all be seen in the cfg viewer in the editor and / or the wiki.

This is Iceman77 btw, I don't have access to my normal BI Forum account atm due to my accounts email getting deactivated... lol. That's another story, but in any case I'll try to render an A3 version.

Edited by David77

Share this post


Link to post
Share on other sites

@David77 (Iceman77) - Is there a way to re-post the original tutorial so I can review the PDF to start to get an understanding of the variables of a dialog construction process? I am an ultra noob as it relates to Dialog and want to better understand the concepts so I can create more intuitive interfaces that don't look and feel so Armed Assault-ish :)

Share this post


Link to post
Share on other sites
@David77 (Iceman77) - Is there a way to re-post the original tutorial so I can review the PDF to start to get an understanding of the variables of a dialog construction process? I am an ultra noob as it relates to Dialog and want to better understand the concepts so I can create more intuitive interfaces that don't look and feel so Armed Assault-ish :)

yes i hadn't realized that it wasn't available.

---------- Post added at 05:43 ---------- Previous post was at 05:34 ----------

Okay, I've put the tutorial back into action. Just note it's for Arma2 and the GUI editor is built into Arma3.

Share this post


Link to post
Share on other sites

Thanks! great post!

---------- Post added at 10:16 ---------- Previous post was at 10:15 ----------

Hi there,

first, many thanks for this excellent tutorial!

I've followed your tutorial to the letter. but for some reason my BOX and FRAME are both completely transparent. Now I know that the last value is transparency. but changing the color/transparency doesn't seem to have any effect at all. Could someone please take a look?

dialogs.hpp

class SCX_DIALOG
{
idd = -1;
movingenable = true;
class controls
{
class SCX_BOX: RscFrame
{
idc = -1;
text = "";
x = 0.242188 * safezoneW + safezoneX;
y = 0.177733 * safezoneH + safezoneY;
w = 0.515625 * safezoneW;
h = 0.642774 * safezoneH;
};
class SCX_FRAME: RscFrame
{
idc = -1;
text = "Welcome ";
x = 0.242188 * safezoneW + safezoneX;
y = 0.177733 * safezoneH + safezoneY;
w = 0.515625 * safezoneW;
h = 0.642774 * safezoneH;
};
class SCX_BUTTONYES: RscButton
{
idc = -1;
text = "YES";
x = 0.513282 * safezoneW + safezoneX;
y = 0.740234 * safezoneH + safezoneY;
w = 0.079375 * safezoneW;
h = 0.0304688 * safezoneH;
};
class SCX_BUTTONNO: RscButton
{
idc = -1;
text = "NO";
x = 0.40625 * safezoneW + safezoneX;
y = 0.739258 * safezoneH + safezoneY;
w = 0.0825 * safezoneW;
h = 0.0314453 * safezoneH;
};
class SCX_PICTURE: RscPicture
{
idc = -1;
text = "#(argb,8,8,3)color(1,1,1,1)";
x = 0.363279 * safezoneW + safezoneX;
y = 0.19336 * safezoneH + safezoneY;
w = 0.284063 * safezoneW;
h = 0.296094 * safezoneH;
};
class SCX_TEXT1: RscText
{
idc = -1;
text = "Testing some Text allright!";
x = 0.279688 * safezoneW + safezoneX;
y = 0.525391 * safezoneH + safezoneY;
w = 0.443437 * safezoneW;
h = 0.199414 * safezoneH;
};
};
};

defines.hpp

// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_EDIT             2
#define CT_SLIDER           3
#define CT_COMBO            4
#define CT_LISTBOX          5
#define CT_TOOLBOX          6
#define CT_CHECKBOXES       7
#define CT_PROGRESS         8
#define CT_HTML             9
#define CT_STATIC_SKEW      10
#define CT_ACTIVETEXT       11
#define CT_TREE             12
#define CT_STRUCTURED_TEXT  13
#define CT_CONTEXT_MENU     14
#define CT_CONTROLS_GROUP   15
#define CT_SHORTCUTBUTTON   16
#define CT_XKEYDESC         40
#define CT_XBUTTON          41
#define CT_XLISTBOX         42
#define CT_XSLIDER          43
#define CT_XCOMBO           44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT           80
#define CT_OBJECT_ZOOM      81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK        98
#define CT_USER             99
#define CT_MAP              100
#define CT_MAP_MAIN         101
#define CT_LISTNBOX         102

// Static styles
#define ST_POS            0x0F
#define ST_HPOS           0x03
#define ST_VPOS           0x0C
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_VCENTER        0x0C
#define ST_GROUP_BOX       96
#define ST_GROUP_BOX2      112
#define ST_ROUNDED_CORNER  ST_GROUP_BOX + ST_CENTER
#define ST_ROUNDED_CORNER2 ST_GROUP_BOX2 + ST_CENTER

#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_BACKGROUND     0x50
#define ST_GROUP_BOX      0x60
#define ST_GROUP_BOX2     0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE   0x90
#define ST_WITH_RECT      0xA0
#define ST_LINE           0xB0

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles
#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// progress bar 
#define ST_VERTICAL       0x01
#define ST_HORIZONTAL     0

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

// Tree styles
#define TR_SHOWROOT       1
#define TR_AUTOCOLLAPSE   2

// MessageBox styles
#define MB_BUTTON_OK      1
#define MB_BUTTON_CANCEL  2
#define MB_BUTTON_USER    4


////////////////
//Base Classes//
////////////////

class RscText
{
   access = 0;
   idc = -1;
   type = CT_STATIC;
   style = ST_MULTI;
   linespacing = 1;
   colorBackground[] = {0,0,0,0};
   colorText[] = {1,1,1,.5};
   text = "";
   shadow = 2;
   font = "Bitstream";
   SizeEx = 0.02300;
   fixedWidth = 0;
   x = 0;
   y = 0;
   h = 0;
   w = 0;

};

class RscPicture
{
   access = 0;
   idc = -1;
   type = CT_STATIC;
   style = ST_PICTURE;
   colorBackground[] = {1,0,0,0};
   colorText[] = {1,1,1,1};
   font = "Bitstream";
   sizeEx = 0;
   lineSpacing = 0;
   text = "";
   fixedWidth = 0;
   shadow = 0;
   x = 0;
   y = 0;
   w = 0.2;
   h = 0.15;
};

class RscButton
{

  access = 0;
   type = CT_BUTTON;
   text = "";
   colorText[] = {1,1,1,.9};
   colorDisabled[] = {0.4,0.4,0.4,0};
   colorBackground[] = {0.75,0.75,0.75,0.8};
   colorBackgroundDisabled[] = {0,0.0,0};
   colorBackgroundActive[] = {0.75,0.75,0.75,1};
   colorFocused[] = {0.75,0.75,0.75,.5};
   colorShadow[] = {0.023529,0,0.0313725,1};
   colorBorder[] = {0.023529,0,0.0313725,1};
   soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};
   soundPush[] = {"\ca\ui\data\sound\new1",0,0};
   soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};
   soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};
   style = 2;
   x = 0;
   y = 0;
   w = 0.055589;
   h = 0.039216;
   shadow = 2;
   font = "Bitstream";
   sizeEx = 0.03921;
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   borderSize = 0;
};

class RscFrame
{
   type = CT_STATIC;
   idc = -1;
   style = ST_FRAME;
   shadow = 2;
   colorBackground[] = {0.5,1,1,0.5};
   colorText[] = {1,1,1,0.9};
   font = "Bitstream";
   sizeEx = 0.03;
   text = "";
};

class BOX
{ 
  type = CT_STATIC;
   idc = -1;
   style = ST_CENTER;
   shadow = 2;
   colorText[] = {1,1,1,1};
   font = "Bitstream";
   sizeEx = 0.02;
   colorBackground[] = {0.75,0.75,0.75,0.8}; 
   text = ""; 

};

image of the problem:

Share this post


Link to post
Share on other sites

You're defining the SCX_Box control with RscFrame. Use BOX instead, as defined in your defines.hpp.

class SCX_DIALOG
{
idd = -1;
movingenable = true;
class controls
{
class SCX_BOX: [color=#ff0000]BOX[/color]
{
   idc = -1;
   text = "";
   x = 0.242188 * safezoneW + safezoneX;
   y = 0.177733 * safezoneH + safezoneY;
   w = 0.515625 * safezoneW;
   h = 0.642774 * safezoneH;
};
class SCX_FRAME: RscFrame
{
   idc = -1;
   text = "Welcome ";
   x = 0.242188 * safezoneW + safezoneX;
   y = 0.177733 * safezoneH + safezoneY;
   w = 0.515625 * safezoneW;
   h = 0.642774 * safezoneH;
};
class SCX_BUTTONYES: RscButton
{
   idc = -1;
   text = "YES";
   x = 0.513282 * safezoneW + safezoneX;
   y = 0.740234 * safezoneH + safezoneY;
   w = 0.079375 * safezoneW;
   h = 0.0304688 * safezoneH;
};
class SCX_BUTTONNO: RscButton
{
   idc = -1;
   text = "NO";
   x = 0.40625 * safezoneW + safezoneX;
   y = 0.739258 * safezoneH + safezoneY;
   w = 0.0825 * safezoneW;
   h = 0.0314453 * safezoneH;
};
class SCX_PICTURE: RscPicture
{
   idc = -1;
   text = "#(argb,8,8,3)color(1,1,1,1)";
   x = 0.363279 * safezoneW + safezoneX;
   y = 0.19336 * safezoneH + safezoneY;
   w = 0.284063 * safezoneW;
   h = 0.296094 * safezoneH;
};
class SCX_TEXT1: RscText
{
   idc = -1;
   text = "Testing some Text allright!";
   x = 0.279688 * safezoneW + safezoneX;
   y = 0.525391 * safezoneH + safezoneY;
   w = 0.443437 * safezoneW;
   h = 0.199414 * safezoneH;
};
};
};

Also, I use a different style for the BG now. Take a look at the .hpp(s) below and here's an example mission. Follow the waypoint, and notice when the player knows enough about the tower, a dialog will popup. I'll redo the tutorial for Arma3 & simplify things even more. Atm it isn't a priority for me, so I hope this helps.

Defines.hpp

// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_STRUCTURED_TEXT  13
#define CT_LINEBREAK        98


// Static styles
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_ROUNDED1        128
#define ST_ROUNDED2        112
#define ST_ROUNDED3        96
#define ST_BACKGROUND      80
#define ST_ROUNDED4          ST_ROUNDED1 + ST_BACKGROUND

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

////////////////
//Base Classes//
////////////////


class IceText
{
   access = 0;
   type = CT_STATIC;
   linespacing = 1;
   idc = -1;
   colorBackground[] = {0,0,0,0.1};
   colorText[] = {1,0,0,0.7};
   text = "";
   fixedWidth = 0;
   x = 0;
   y = 0;
   h = 0;
   w = 0;
   style = ST_LEFT;
   shadow = 2;
   font = "puristaMedium";
   SizeEx = 0.02300;


};

class IceStructuredText
{
   access = 0;
   type = CT_STRUCTURED_TEXT;
   idc = -1;
   style = 0;
   colorText[] = {0,0,1,0.7};
   colorBackground[] = {0,0,0,0.1};

   class Attributes
   {
       font = "puristaMedium";
               color = "#111";
       align = "Left";
       shadow = 1;
   };

   x = 0;
   y = 0;
   h = 0.035;
   w = 0.1;
   text = "";
   size = 0.022;
   shadow = 2;
};


class IcePicture
{
   access = 0;
   type = CT_STATIC;
   idc = -1;
   style = ST_PICTURE;
   colorBackground[] = {0,0,0,1};
   colorText[] = {1,1,1,1};
   font = "puristaMedium";
   sizeEx = 0;
   lineSpacing = 0;
   text = "";
   fixedWidth = 0;
   shadow = 0;
   x = 0;
   y = 0;
   w = 0.2;
   h = 0.15;
};

class IceButton
{
   idc = -1;
   access = 0;
   type = CT_BUTTON;
   text = "";
   colorText[] = {1,1,1,.9};
   colorDisabled[] = {0.75,0.75,0.75,.5};
   colorBackground[] = {0.75,0.75,0.75,0.8};
   colorBackgroundDisabled[] = {0.75,0.75,0.75,0.5};
   colorBackgroundActive[] = {1,1,1,.9};
   colorFocused[] = {0.75,0.75,0.75,.7};
   colorShadow[] = {0.023529,0,0.0313725,1};
   colorBorder[] = {0.023529,0,0.0313725,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};
   style = 2;
   x = 0;
   y = 0;
   w = 0;
   h = 0;
   shadow = 2;
   font = "puristaMedium";
   sizeEx = 0.023;
   offsetX = 0;
   offsetY = 0;
   offsetPressedX = 0.001;
   offsetPressedY = 0.001;
   borderSize = 0;
   moving = 1;
};

class IceIGUIBack
{
   type = 0;
   idc = -1;
   style = 80;
   text = "";
   colorText[] = {0,0,0,0};
   font = "PuristaMedium";
   sizeEx = 0;
   shadow = 0;
   x = 0.1;
   y = 0.1;
   w = 0.1;
   h = 0.1;
   colorBackground[] = {0,0,0,0.8};
};

Dialog.hpp

class SecOpsDialog
{
   idd = 3000;
   movingenable = true;
   onLoad = "uiNamespace setVariable ['myDisplay', (_this select 0)]"; 

   class Controls
   {
     class ICE_BG: IceIGUIBack
     {
   idc = 2200;
   x = 0.36875 * safezoneW + safezoneX;
   y = 0.276 * safezoneH + safezoneY;
   w = 0.247917 * safezoneW;
   h = 0.462 * safezoneH;
     };
     class ICE_Accept_Button: IceButton
     {
   idc = 1600;
   text = "Accept"; 
   x = 0.419792 * safezoneW + safezoneX;
   y = 0.668 * safezoneH + safezoneY;
   w = 0.0583333 * safezoneW;
   h = 0.042 * safezoneH;
     };
     class ICE_Decline_Button: IceButton
     {
   idc = 1601;
   text = "Decline"; 
   x = 0.5 * safezoneW + safezoneX;
   y = 0.668 * safezoneH + safezoneY;
   w = 0.0583333 * safezoneW;
   h = 0.042 * safezoneH;
     };
     class ICE_Picture: IcePicture
     {
   idc = 1200;
   text = "#(argb,8,8,3)color(1,1,1,1)";
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.2956 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.21 * safezoneH;
     };
     class ICE_Header: IceText
     {
   idc = 1000;
   text = "Side Objective:"; 
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.52 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.022 * safezoneH;
     };
     class ICE_Overview_Text: IceStructuredText
     {
   idc = 1100;
   text = ""; 
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.542 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.12 * safezoneH;
     };

   };

};

Edited by Iceman77

Share this post


Link to post
Share on other sites
You're defining the SCX_Box control with RscFrame. Use BOX instead, as defined in your defines.hpp.

class SCX_DIALOG
{
idd = -1;
movingenable = true;
class controls
{
class SCX_BOX: [color=#ff0000]BOX[/color]
{
   idc = -1;
   text = "";
   x = 0.242188 * safezoneW + safezoneX;
   y = 0.177733 * safezoneH + safezoneY;
   w = 0.515625 * safezoneW;
   h = 0.642774 * safezoneH;
};
class SCX_FRAME: RscFrame
{
   idc = -1;
   text = "Welcome ";
   x = 0.242188 * safezoneW + safezoneX;
   y = 0.177733 * safezoneH + safezoneY;
   w = 0.515625 * safezoneW;
   h = 0.642774 * safezoneH;
};
class SCX_BUTTONYES: RscButton
{
   idc = -1;
   text = "YES";
   x = 0.513282 * safezoneW + safezoneX;
   y = 0.740234 * safezoneH + safezoneY;
   w = 0.079375 * safezoneW;
   h = 0.0304688 * safezoneH;
};
class SCX_BUTTONNO: RscButton
{
   idc = -1;
   text = "NO";
   x = 0.40625 * safezoneW + safezoneX;
   y = 0.739258 * safezoneH + safezoneY;
   w = 0.0825 * safezoneW;
   h = 0.0314453 * safezoneH;
};
class SCX_PICTURE: RscPicture
{
   idc = -1;
   text = "#(argb,8,8,3)color(1,1,1,1)";
   x = 0.363279 * safezoneW + safezoneX;
   y = 0.19336 * safezoneH + safezoneY;
   w = 0.284063 * safezoneW;
   h = 0.296094 * safezoneH;
};
class SCX_TEXT1: RscText
{
   idc = -1;
   text = "Testing some Text allright!";
   x = 0.279688 * safezoneW + safezoneX;
   y = 0.525391 * safezoneH + safezoneY;
   w = 0.443437 * safezoneW;
   h = 0.199414 * safezoneH;
};
};
};

Also, I use a different style for the BG now. Take a look at the .hpp(s) below and here's an example mission. Follow the waypoint, and notice when the player knows enough about the tower, a dialog will popup. I'll redo the tutorial for Arma3 & simplify things even more. Atm it isn't a priority for me, so I hope this helps.

Defines.hpp

// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_STRUCTURED_TEXT  13
#define CT_LINEBREAK        98


// Static styles
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_ROUNDED1        128
#define ST_ROUNDED2        112
#define ST_ROUNDED3        96
#define ST_BACKGROUND      80
#define ST_ROUNDED4          ST_ROUNDED1 + ST_BACKGROUND

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

////////////////
//Base Classes//
////////////////


class IceText
{
   access = 0;
   type = CT_STATIC;
   linespacing = 1;
   idc = -1;
   colorBackground[] = {0,0,0,0.1};
   colorText[] = {1,0,0,0.7};
   text = "";
   fixedWidth = 0;
   x = 0;
   y = 0;
   h = 0;
   w = 0;
   style = ST_LEFT;
   shadow = 2;
   font = "puristaMedium";
   SizeEx = 0.02300;


};

class IceStructuredText
{
   access = 0;
   type = CT_STRUCTURED_TEXT;
   idc = -1;
   style = 0;
   colorText[] = {0,0,1,0.7};
   colorBackground[] = {0,0,0,0.1};

   class Attributes
   {
       font = "puristaMedium";
               color = "#111";
       align = "Left";
       shadow = 1;
   };

   x = 0;
   y = 0;
   h = 0.035;
   w = 0.1;
   text = "";
   size = 0.022;
   shadow = 2;
};


class IcePicture
{
   access = 0;
   type = CT_STATIC;
   idc = -1;
   style = ST_PICTURE;
   colorBackground[] = {0,0,0,1};
   colorText[] = {1,1,1,1};
   font = "puristaMedium";
   sizeEx = 0;
   lineSpacing = 0;
   text = "";
   fixedWidth = 0;
   shadow = 0;
   x = 0;
   y = 0;
   w = 0.2;
   h = 0.15;
};

class IceButton
{
   idc = -1;
   access = 0;
   type = CT_BUTTON;
   text = "";
   colorText[] = {1,1,1,.9};
   colorDisabled[] = {0.75,0.75,0.75,.5};
   colorBackground[] = {0.75,0.75,0.75,0.8};
   colorBackgroundDisabled[] = {0.75,0.75,0.75,0.5};
   colorBackgroundActive[] = {1,1,1,.9};
   colorFocused[] = {0.75,0.75,0.75,.7};
   colorShadow[] = {0.023529,0,0.0313725,1};
   colorBorder[] = {0.023529,0,0.0313725,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};
   style = 2;
   x = 0;
   y = 0;
   w = 0;
   h = 0;
   shadow = 2;
   font = "puristaMedium";
   sizeEx = 0.023;
   offsetX = 0;
   offsetY = 0;
   offsetPressedX = 0.001;
   offsetPressedY = 0.001;
   borderSize = 0;
   moving = 1;
};

class IceIGUIBack
{
   type = 0;
   idc = -1;
   style = 80;
   text = "";
   colorText[] = {0,0,0,0};
   font = "PuristaMedium";
   sizeEx = 0;
   shadow = 0;
   x = 0.1;
   y = 0.1;
   w = 0.1;
   h = 0.1;
   colorBackground[] = {0,0,0,0.8};
};

Dialog.hpp

class SecOpsDialog
{
   idd = 3000;
   movingenable = true;
   onLoad = "uiNamespace setVariable ['myDisplay', (_this select 0)]"; 

   class Controls
   {
     class ICE_BG: IceIGUIBack
     {
   idc = 2200;
   x = 0.36875 * safezoneW + safezoneX;
   y = 0.276 * safezoneH + safezoneY;
   w = 0.247917 * safezoneW;
   h = 0.462 * safezoneH;
     };
     class ICE_Accept_Button: IceButton
     {
   idc = 1600;
   text = "Accept"; 
   x = 0.419792 * safezoneW + safezoneX;
   y = 0.668 * safezoneH + safezoneY;
   w = 0.0583333 * safezoneW;
   h = 0.042 * safezoneH;
     };
     class ICE_Decline_Button: IceButton
     {
   idc = 1601;
   text = "Decline"; 
   x = 0.5 * safezoneW + safezoneX;
   y = 0.668 * safezoneH + safezoneY;
   w = 0.0583333 * safezoneW;
   h = 0.042 * safezoneH;
     };
     class ICE_Picture: IcePicture
     {
   idc = 1200;
   text = "#(argb,8,8,3)color(1,1,1,1)";
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.2956 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.21 * safezoneH;
     };
     class ICE_Header: IceText
     {
   idc = 1000;
   text = "Side Objective:"; 
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.52 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.022 * safezoneH;
     };
     class ICE_Overview_Text: IceStructuredText
     {
   idc = 1100;
   text = ""; 
   x = 0.383333 * safezoneW + safezoneX;
   y = 0.542 * safezoneH + safezoneY;
   w = 0.21875 * safezoneW;
   h = 0.12 * safezoneH;
     };

   };

};

works like a charm! many thanks for your time!

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

×