]> git.mxchange.org Git - flightgear.git/commitdiff
Melchior: Make line wrapping in textboxes configurable, and enable it by default
authorehofman <ehofman>
Tue, 19 Apr 2005 13:15:04 +0000 (13:15 +0000)
committerehofman <ehofman>
Tue, 19 Apr 2005 13:15:04 +0000 (13:15 +0000)
docs-mini/README.gui
src/GUI/dialog.cxx

index 1cc27b937049b8b194bb1c9f16275a564f415f32..61542e4694dfa3766c75169d7c828561da358886 100644 (file)
@@ -117,10 +117,10 @@ properties, though they will ignore any that are not relevant:
    the width of the parent container.
 
  color - a subgroup to specify the dialogs color:
-  red   - specify the red color compnent of the color scheme.
-  green - specify the green color compnent of the color scheme.
-  blue  - specify the blue color compnent of the color scheme.
-  alpha - specify the alpha color compnent of the color scheme.
+  red   - specify the red color component of the color scheme.
+  green - specify the green color component of the color scheme.
+  blue  - specify the blue color component of the color scheme.
+  alpha - specify the alpha color component of the color scheme.
 
  legend - the text legend to display in the object.
 
@@ -231,6 +231,14 @@ Example:
    <label>Heading</label>
   </text>
 
+  <text>
+   <x>10</x>
+   <y>200</y>
+   <label>-9.9999</label> <!-- placeholder for width -->
+   <format>%-0.4f m</format>
+   <property>/foo/altitude</property>
+  </text>
+
 
 checkbox
 --------
@@ -382,6 +390,7 @@ property tree, like:
     <property>/gui/path-to-text-node/contents</property>
 
     <slider>15</slider> <!--width for slider -->
+    <wrap>false</wrap> <!-- don't wrap text; default: true -->
 
     <editable>true</editable> <!-- whether the puLargeInput is supposed to be editable -->
 </textbox>  
index f85efb5e4bff199466cf859ae2aae3945c393249..e67f972eaae4ed86660039e345ac17ac192a0899 100644 (file)
@@ -496,9 +496,10 @@ 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;
        if (slider_width==0) slider_width=20;
        puLargeInput * puTextBox =
-                     new puLargeInput(x, y, x+width, x+height, 2, slider_width);
+                     new puLargeInput(x, y, x+width, x+height, 2, slider_width, wrap);
        if  (props->hasValue("editable"))
        {
           if (props->getBoolValue("editable")==false)