From 0636ebfc86b27c2a7ef835305ef8840bb5867c4e Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 20 Jun 2005 20:54:47 +0000 Subject: [PATCH] - fix "frame" (the old code was broken and ... strange) - add "hrule" (horizontal rule; accepts color and "pref-height" for thickness) --- src/GUI/dialog.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 1a49842a3..74245da83 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -435,12 +435,14 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight) setupGroup(group, props, width, height, color, false); return group; } 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); - setupGroup(group, props, width, height, color, false); + setupGroup(group, props, width, height, color, true); 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") { puList * list = new puList(x, y, x + width, y + height); setupObject(list, props); @@ -522,7 +524,7 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight) return dial; } else if (type == "textbox") { 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; puLargeInput * puTextBox = new puLargeInput(x, y, x+width, x+height, 2, slider_width, wrap); -- 2.39.5