OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: haroon1992 on 08 Aug 2010, 09:27:46
-
Can someone give me the default constants and classes
like
rscButton
rscBackground
etc
?
Regards,
Haroon1992
-
Here are the ones I use: just remove RUG_ from the start of them (or exchange with your own tag - useful if you're going to want to use 'plug-in' dialog stuff, e.g. RUG Inventory). These are for Arma 2, but they're not really tested, so you might get some errors :)
/*******************/
/* Controls */
/*******************/
// 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 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
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
/*******************/
/* Basic classes */
/*******************/
class RUG_RscBackground
{
type = CT_STATIC;
IDC = -1;
style = 512;
x=0.0;
y=0.0;
w=1.0;
h=1.0;
text="";
ColorBackground[]={0.6,0.6,0.6,1};
ColorText[]={0.1,0.1,0.1,1};
font="BitStream";
SizeEx = 1;
};
class RUG_RscText
{
type = CT_STATIC;
IDC = -1;
style = ST_LEFT + ST_MULTI + ST_NO_RECT;
LineSpacing = 1.000000;
w = 0.275;
h = 0.040000;
ColorBackground[] = {1,1,1,0.2};
ColorText[] = {0.1,0.1,0.1,1};
font = "BitStream";
SizeEx = 0.030000;
};
class RUG_RscPicture
{
type = CT_STATIC;
IDC = -1;
style = ST_PICTURE;
ColorBackground[] = {0,0,0,0};
ColorText[] = {1,1,1,1};
font = "BitStream";
SizeEx = 0;
};
class RUG_RscActiveText
{
type = CT_ACTIVETEXT;
style = ST_LEFT;
SizeEx = 0.05;
font = "BitStream";
color[]= {1,1,1,0.8};
colorActive[] = {1, 1, 1,1};
soundEnter[] = {"", 0.1, 1};
soundPush[] = {"", 0.1, 1};
soundClick[] = {"", 0.1, 1};
soundEscape[] = {"", 0.1, 1};
text = "";
};
class RUG_BIS_RscButton
{
access = ReadAndWrite;
type = VArmor;
style = 0;
x = 0;
y = 0;
w = 0.3;
h = 0.1;
text = "";
font = "TahomaB";
sizeEx = 0.04;
colorText[] = {0, 0, 0, 1};
colorDisabled[] = {0.3, 0.3, 0.3, 1};
colorBackground[] = {1,1.1,1};
colorBackgroundDisabled[] = {1, 1, 1, 1};
colorBackgroundActive[] = {1, 0.5, 0, 1};
offsetX = 0.004;
offsetY = 0.004;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorFocused[] = {0, 0, 0, 1};
colorShadow[] = {0, 0, 0, 0};
colorBorder[] = {0, 0, 0, 1};
borderSize = 0.000;
soundEnter[] = {"", 0.1, 1};
soundPush[] = {"", 0.1, 1};
soundClick[] = {"", 0.1, 1};
soundEscape[] = {"", 0.1, 1};
};
class RUG_RscButton : RUG_BIS_RscButton
{
type = CT_BUTTON;
idc = -1;
style = ST_CENTER;
sizeEx = 0.02000;
borderSize = 0.000;
default = false;
};
class RUG_RscEdit {
access = 0;
type = 2;
style = 0;
h = 0.040000;
colorBackground[] = {0,0,0,0 };
colorText[] = {1,1,1,1 };
colorSelection[] = {1,1,1,0.250000 };
font = "TahomaB";
sizeEx = 0.040000;
autocomplete = "";
text = "";
size = 0.200000;
};
class RUG_RscCombo {
access = 0;
type = 4;
style = 0;
h = 0.050000;
wholeHeight = 0.250000;
colorSelect[] = {0.600000,0.600000,0.600000,1 };
colorText[] = {1,1,1,1 };
colorBackground[] = {0.200000,0.200000,0.200000,1 };
colorScrollbar[] = {1,1,1,1 };
font = "TahomaB";
sizeEx = 0.040000;
soundSelect[] = {"",0.100000,1 };
soundExpand[] = {"",0.100000,1 };
soundCollapse[] = {"",0.100000,1 };
class ScrollBar
{
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
border = "\ca\ui\data\ui_border_scroll_ca.paa";
};
};
class RUG_RscSliderH
{
type = CT_SLIDER;
style = SL_HORZ;
color[] = {0.2, 0.2, 0.2, 1};
colorActive[] = {1, 1, 1, 1};
h = 0.04;
w = 0.5;
idc = -1;
sizeEx = 0.025;
};
class RUG_RscLB_C
{
style = ST_LEFT;
idc = -1;
colorSelect[] = {0.4, 0.4, 0.4, 1};
colorSelectBackground[] = {0.2, 0.2, 0.2, 1};
colorText[] = {0.2, 0.2, 0.2, 1};
colorBackground[] = {0.4, 0.4, 0.4, 1};
font = FontHTML;
sizeEx = 0.025;
rowHeight = 0.04;
soundSelect[] = {"", 0.1, 1};
maxHistoryDelay = 10;
class ScrollBar
{
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
border = "\ca\ui\data\ui_border_scroll_ca.paa";
};
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
};
class RUG_RscListBox: RUG_RscLB_C
{
type = CT_LISTBOX;
};
class RUG_RscFrame
{
type = CT_STATIC;
idc = -1;
style = ST_FRAME;
colorBackground[] = {0, 0, 0, 0};
colorText[] = {1, 1, 1, 1};
font = FontM;
sizeEx = 0.04;
};
-
Thank you very much Wolfrug...
I have a few more questions about the dialogs
My mission have a cutom hint (resource called by titlersc) class
like the following :
HINT
This is a sample hint.
HINT = hintHeader
This is a sample hint = hintText
hintHeader and hintText are the two reference classes. (defined before class rscTitle)
Is there any way to input the desired text via a script to be used in this template?
(instead of defining all the hints used in the mission in the description.ext)
i mean :
[hintHeader,hintText] execVM "hintShow.sqf"
example :
["NEW INFORMATION","There are possible Talibans in Nogova."] exec "hintShow.sqf"
which will show like this :
NEW INFORMATION
There are possible Talibans in Nogova.
Is that possible ?
If so what kind of commands are needed to change the text in the description.ext from the script.
(I think I saw something like lbSetCurText in a script)
If this is possible in ArmA 2, I also would like to know if this can also be done in OFP:Resistance ?
Regards and thanks in advance,
Haroon1992