Jump to content
Sign in to follow this  
VictorFarbau

"Error loading control" in Dialog

Recommended Posts

Weird thing while creating some quick configuration dialog for my current VFFPSS project. I need some text edit fields in there as well.

Problem is, they seem to work correctly; the dialog displays ok and I can edit, select, delete and do all the fancy stuff with them.

However, the RPT file contains errors; furthermore they can't be addressed by "ctrlSetText" or "ctrlText" which is likely due to the same error.

The rpt file contains this:

Error loading control <long path>\ArmA 2\missions\VFFPSS.Chernarus\description.ext/fpssdialog/loFPSval/

Error loading control <long path>\ArmA 2\missions\VFFPSS.Chernarus\description.ext/fpssdialog/hiFPSval/

Error loading control <long path>\ArmA 2\missions\VFFPSS.Chernarus\description.ext/fpssdialog/loDistval/

Error loading control <long path>\ArmA 2\missions\VFFPSS.Chernarus\description.ext/fpssdialog/hiDistval/

All of these fields are edit controls. All the rest of the dialog works fine. This is what the base class of my edit field looks like:

class commonE {

type = CT_EDIT;

font = FontM;

sizeEx = 0.04;

style = ST_MULTI;

colorText[] = white;

colorBackground[] = {0,0,0,0};

colorSelection[] = {0,1,0,0.7};

autocomplete = false;

text = "";

};

And here's one of the the inheriting controls (they all look the same):

class loFPSval: commonE {

idc = minFPS;

x = dspx + 0.4; y = dspy + (theight * 1.5);

w = 0.1; h = theight;

};

All names are defined properly, all fields seem to be there. I can't see what's wrong. Maybe you can? :)

Cheers,

VictorFarbau

Edited by VictorFarbau

Share this post


Link to post
Share on other sites

Here's the "effective"[1] RscEdit class:

class RscEdit {
access = 0;
type = 2;
h = 0.04;
colorBackground[] = { 0, 0, 0, 1 };
colorText[] = { 0.95, 0.95, 0.95, 1 };
colorSelection[] = { 0.543, 0.5742, 0.4102, 1 };
autocomplete = "";
text = "";
size = 0.2;
style = 0x00 + 0x40;
font = "Zeppelin32";
sizeEx = 0.03921;
};

HTH

[1] i.e. not taken from a config but dumped from the running game

Share this post


Link to post
Share on other sites

Thanks Worldeater, no success there. In the end I just copied and pasted the qouted base classe into my config file - same errors occur. For some reason these fields are there and useable but something is wrong and I can't access them either.

Share this post


Link to post
Share on other sites

Can you give as the definitions of dspx, dspy, theight?

Share this post


Link to post
Share on other sites

Sure thing. Here it comes. I just dump the complete config since it may be easier to see the whole thing than to request bits and pieces...

Edit: sad thing is, as mentioned, that my edit fields display perfectly fine and are fully useable. Just this stupid error galore and the inability to access the fields gives me a headache. Can't seem to be able to resolve this.

Thanks for your time,

VictorFarbau

// FPSS Control Panel Dialog

// The default template provided by BIS
// 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_KEEP_ASPECT_RATIO	0x800

#define FontM		"TahomaB"
#define amber		{1, 1, 0, 0.7}
#define white		{1,1,1,0.7}
#define dspx		0.05
#define dspy		0.2
#define dspw		0.6
#define dsph		0.5
#define theight		0.045
#define	minfps		31421
#define	maxfps		31422
#define	mindist		31423
#define	maxdist		31424
#define	dbon		31425
#define cprevt		"Rev 1.0 Arma II"

class fpssdialog {
idd = -1;
movingEnable = true;

// Simulation enables manipluation of text properties by scripts
enableSimulation = 1;
enableDisplay = 1;
objects[] = {};
controls[] = {cp,cptitle,cprev,line1,loFPS,loFPSval,hiFPS,hiFPSval,loDist,loDistval,hiDist,hiDistval,debugON,debugONb,line2,closeD};
controlsBackground[] = {};


class common1 {
	font = FontM;
	sizeEx = 0.04;
	colorText[] = white;
	colorBackground[] = { 0, 0, 0, 0 };
};
class commonE {
	type = CT_EDIT;
	font = FontM;
	size = 0.1;
	sizeEx = 0.04;
	style = 0x00 + 0x40;
	colorText[] = white;
	colorBackground[] = {0,0,0,0};
	colorSelection[] = {0,1,0,0.7};
	autocomplete = false;
	text = "";
};
class commonButton {
	type = CT_BUTTON;
	style = ST_CENTER;
	font = FontM;
	sizeEx = 0.04;
	colorText[] = white;
	colorFocused[] = {0,0,0,0};
		colorDisabled[] = {1, 1, 1, 0.2};
	colorBackground[] = {0, 0, 0, 0};
	colorBackgroundDisabled[] = {0,0,0,0};
	colorBackgroundActive[] = {0.5, 1, 0, 0.7};
	offsetX = 0.003;
	offsetY = 0.003;
	offsetPressedX = 0.002;
	offsetPressedY = 0.002;
	colorShadow[] = {0, 0, 0, 0};
	colorBorder[] = {0, 0, 0, 0};
	borderSize = 0;
	soundEnter[] = {"", 0, 1 };
	soundPush[] = {"", 0, 1 };
	soundClick[] = {"", 0, 1 };
	soundEscape[] = {"", 0, 1 };
	text = "Undefined";
};

class cp {
	idc = -1;
	moving = 1;
	type = CT_STATIC;
	style = ST_BACKGROUND;
	x = dspx; y = dspy;
w = dspw; h = dsph;
	font = FontM;
	sizeEx = 0;
	colorText[] = white;
	colorBackground[] = { 0, 0, 0, 1 };
	text = "";
};

class cptitle: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + 0.01;
w = dspw - 0.02; h = theight;
	text = "VF FPS Saver";
};

class cprev: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_RIGHT;
	x = dspx + 0.01; y = dspy + 0.01;
w = dspw - 0.02; h = theight;
	text = cprevt;
};

class line1 {
	idc = -1;
	font = FontM;
	colorText[] = white;
	colorBackground[] = { 0, 0, 0, 0 };
	type = CT_STATIC;
	style = ST_LINE;
	x = dspx + 0.01; y = dspy + theight + (theight / 5);
w = dspw - 0.02; h = 0;
	sizeEx = 0;
	text = "";
};

class loFPS: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + (theight * 1.5);
w = 0.35; h = theight;
	text = "Low FPS (Quality --)";
};
class loFPSval: commonE {
	idc = minFPS;
	x = dspx + 0.4; y = dspy + (theight * 1.5);
w = 0.1; h = theight;
};

class hiFPS: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + (theight * 3);
w = 0.35; h = theight;
	text = "High FPS (Quality ++)";
};
class hiFPSval: commonE {
	idc = maxFPS;
	x = dspx + 0.4; y = dspy + (theight * 3);
w = 0.1; h = theight;
};

class loDist: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + (theight * 4.5);
w = 0.35; h = theight;
	text = "Minimum Viewdistance (m)";
};
class loDistval: commonE {
	idc = minDist;
	x = dspx + 0.4; y = dspy + (theight * 4.5);
w = 0.1; h = theight;
};

class hiDist: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + (theight * 6);
w = 0.35; h = theight;
	text = "Maximum Viewdistance (m)";
};
class hiDistval: commonE {
	idc = maxDist;
	x = dspx + 0.4; y = dspy + (theight * 6);
w = 0.1; h = theight;
};

class debugON: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LEFT;
	x = dspx + 0.01; y = dspy + (theight * 7.5);
w = 0.34; h = theight;
	text = "Debug Messages";
};
class debugONb: commonButton {
	idc = dbon;
	x = dspx + 0.4; y = dspy + (theight * 7.5);
w = 0.1; h = theight;
	action =  "dummy = [0] execVM ""debugswitch.sqf"";";
};

class line2: common1 {
	idc = -1;
	type = CT_STATIC;
	style = ST_LINE;
	x = dspx + 0.01; y = dspy + (theight * 9);
w = dspw - 0.02; h = 0;
	text = "";
};

class closeD: common1 {
	idc = -1;
	type = CT_BUTTON;
	style = ST_CENTER;
	x = dspx + ((dspw / 2) - 0.05); y = dspy + (theight * 10) - 0.03; w = 0.1; h = theight;
	font = FontM;
	colorText[] = white;
	colorFocused[] = {0,0,0,0};
		colorDisabled[] = {0,0,0,0};
	colorBackground[] = {0, 0, 0, 0};
	colorBackgroundDisabled[] = {0, 0, 0, 0};
	colorBackgroundActive[] = {0.5, 1, 0, 0.7};
	offsetX = 0.003;
	offsetY = 0.003;
	offsetPressedX = 0.002;
	offsetPressedY = 0.002;
	colorShadow[] = {0, 0, 0, 0};
	colorBorder[] = {0, 0, 0, 0};
	borderSize = 0;
	soundEnter[] = {"", 0, 1 };
	soundPush[] = {"", 0, 1 };
	soundClick[] = {"", 0, 1 };
	soundEscape[] = {"", 0, 1 };
	action = "closeDialog 0";
	text = "CLOSE";
};

};

Edited by VictorFarbau

Share this post


Link to post
Share on other sites

Don't know if it might help but here's how i use my edit controls:

class RscEdit {
type = 2;
style = 0x00 + 0x40;
font = "Zeppelin32";
sizeEx = 0.03921;
colorBackground[] = {0, 0, 0, 1};
colorText[] = {0.5, 0.5, 0.95, 1};
colorSelection[] = {0.543, 0.5742, 0.4102, 1.0};
};

class ConsoleEdit: RscEdit {
idc = 10003;
x = 0.03;
y = 0.265;
w = 0.715;
h = 0.09804;
linespacing = 0;
text = "";
autocomplete = "scripting";
};

Share this post


Link to post
Share on other sites

Haha awesome :D There's always somebody with an eye for hidden things. Yes indeed it was that case sensitive constants who screwed my dialog!

I should have C&P'ed the definitions as usual, I just had my 5 minutes where I typed things twice - dang :eek:

Thanks a lot, great help here! Time to finish that thing now.

Cheers,

VictorFarbau

Share this post


Link to post
Share on other sites
after I preprocessed your config with mcpp

You are aware that this is cheating and not allowed in Arma, aren't you? Only notepad is allowed :)

VictorFarbau

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  

×