Jump to content
Sign in to follow this  
=Odin=

Dialog question's

Recommended Posts

G'day, I have just made my 1st basic dialog, with alot of help from Manny,s explanation on the wiki (you da man Manny) biggrin_o.gif

But have a few questions?

1- is it possible to disable the underline in activetext, when it has been selected?

2- I have tried get a background colour to show, change font color and create buttons but allways get errors saying

eg. line 102 useing defined bla bla

[sorry accidently pressed post]

here is a bit of what I have so far

Quote[/b] ]// 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_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

// 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_TYPE 0xF0

#define ST_SINGLE 0

#define ST_MULTI 16

#define ST_TITLE_BAR 32

#define ST_PICTURE 48

#define ST_FRAME 64

#define ST_BACKGROUND 80

#define ST_GROUP_BOX 96

#define ST_GROUP_BOX2 112

#define ST_HUD_BACKGROUND 128

#define ST_TILE_PICTURE 144

#define ST_WITH_RECT 160

#define ST_LINE 176

#define FontM "Zeppelin32"

class hire {

idd = -1; // set to -1, because we don't require a unique ID

movingEnable = true; // no movement while the dialog is shown

controlsBackground[] = { }; // no background controls needed

objects[] = { }; // no objects needed

controls[] = { MyActiveText,MyActiveText2,MyActiveText3,MyActiveText4,MyActiveText5,MyActiveText6,MyActiv

eText7,MyActiveText8,MyActiveText9, }; // our Hello World text as seen below:

class MyHelloText {

idc = -1; // set to -1, unneeded

type = CT_STATIC; // constant

style = ST_LEFT; // constant

text = "Hello world";

font = FontM;

sizeEx = 0.023;

colorBackground[] = { 1, 1, 1, 0.3 };

colorText[] = { 0, 0, 0, 1 };

x = 0.8;

y = 0.1;

w = 0.2;

h = 0.05;

};

class MyActiveText {

idc = -1;

type = CT_ACTIVETEXT;

style = ST_LEFT;

x = 0.75; y = 0.13;

w = 0.2; h = 0.035;

font = FontM;

sizeEx = 0.024;

color[] = { 1, 1, 1, 1 };

colorActive[] = { 1, 0.2, 0.2, 1 };

soundEnter[] = { "", 0, 1 }; // no sound

soundPush[] = { "", 0, 1 };

soundClick[] = { "", 0, 1 };

soundEscape[] = { "", 0, 1 };

action = "nul = [""SoldierGB""] exec ""scripts\hire.sqs""";

text = "Recruit Rifleman";

default = true;

};

class MyActiveText2 {

idc = -1;

type = CT_ACTIVETEXT;

style = ST_LEFT;

x = 0.75; y = 0.15;

w = 0.2; h = 0.035;

font = FontM;

sizeEx = 0.024;

color[] = { 1, 1, 1, 1 };

colorActive[] = { 1, 0.2, 0.2, 1 };

soundEnter[] = { "", 0, 1 }; // no sound

soundPush[] = { "", 0, 1 };

soundClick[] = { "", 0, 1 };

soundEscape[] = { "", 0, 1 };

action = "nul = [""SoldierGMG""] exec ""scripts\hire1.sqs""";

text = "Recruit MG";

default = true;

};

and so on till the exit,

Will I Have to change all the classes static properties to make a change ?

3- Is useing an .hpp file better than placing the code in the description?

any comments appreciated smile_o.gif

Odin

Share this post


Link to post
Share on other sites

For a working example, see Dialog Framework.

1. perhaps change the focus to another control

2. show code, 'bla bla' doesn't help

3. example above shows how to use hpp files cleanly

Share this post


Link to post
Share on other sites

Thank-you Dr.E your team -Dialog pack was what made me wanna try some for myself, top job on that mate biggrin_o.gif

I have been trying but cannot get a blasted error to show again, hows that for strange, hehe think I may be getting the hang of it now maybe, anyway thanx for answering and as soon as I get one of them error windows I will post it.

Odin

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
Sign in to follow this  

×