1
0
Fork 0

- fix "frame" (the old code was broken and ... strange)

- add "hrule" (horizontal rule; accepts color and "pref-height" for thickness)
This commit is contained in:
mfranz 2005-06-20 20:54:47 +00:00
parent d977c07908
commit 0636ebfc86

View file

@ -435,12 +435,14 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight)
setupGroup(group, props, width, height, color, false); setupGroup(group, props, width, height, color, false);
return group; return group;
} else if (type == "frame") { } else if (type == "frame") {
puFrame * frame = new puFrame(x, y, width, height);
frame->setBorderThickness(1);
frame->setColorScheme(color[0], color[1], color[2], color[3]);
puGroup * group = new puGroup(x, y); puGroup * group = new puGroup(x, y);
setupGroup(group, props, width, height, color, false); setupGroup(group, props, width, height, color, true);
return group; return group;
} else if (type == "hrule") {
puFrame * rule = new puFrame(3, y, parentWidth - 4, y + (height ? height : 1));
rule->setBorderThickness(0);
rule->setColorScheme(color[0], color[1], color[2], color[3]);
return rule;
} else if (type == "list") { } else if (type == "list") {
puList * list = new puList(x, y, x + width, y + height); puList * list = new puList(x, y, x + width, y + height);
setupObject(list, props); setupObject(list, props);
@ -522,7 +524,7 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight)
return dial; return dial;
} else if (type == "textbox") { } else if (type == "textbox") {
int slider_width = props->getIntValue("slider", parentHeight); int slider_width = props->getIntValue("slider", parentHeight);
int wrap = props->getBoolValue("wrap", true)==true; int wrap = props->getBoolValue("wrap", true);
if (slider_width==0) slider_width=20; if (slider_width==0) slider_width=20;
puLargeInput * puTextBox = puLargeInput * puTextBox =
new puLargeInput(x, y, x+width, x+height, 2, slider_width, wrap); new puLargeInput(x, y, x+width, x+height, 2, slider_width, wrap);