From 6f8cae6b87860890a4278253ab377b1af5ac9527 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 27 Sep 2004 14:40:31 +0000 Subject: [PATCH] Boris Koenig: I'm attaching a small change to Andy's dialog.cxx that I needed to make so that it enables XML/Nasal-dialogs to also contain puLargeInput boxes. The text will be retrieved/buffered from/within a specified property tree, like: 100 100 200 100 /gui/path-to-text-node/contents 15 true --- src/GUI/dialog.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 6320cae28..52f2fef76 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -385,6 +385,20 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight) dial->setWrap(props->getBoolValue("wrap", true)); setupObject(dial, props); return dial; + } else if (type == "textbox") { + int slider_width = props->getIntValue("slider", parentHeight); + if (slider_width==0) slider_width=20; + puLargeInput * puTextBox = + new puLargeInput(x, y, x+width, x+height, 2, slider_width); + if (props->hasValue("editable")) + { + if (props->getBoolValue("editable")==false) + puTextBox->disableInput(); + else + puTextBox->enableInput(); + } + setupObject(puTextBox,props); + return puTextBox; } else if (type == "select") { vector value_nodes; SGPropertyNode * selection_node =