]> git.mxchange.org Git - flightgear.git/commitdiff
textbox: add <top-line> param that sets first line (last line if negative)
authormfranz <mfranz>
Thu, 29 Jan 2009 18:50:16 +0000 (18:50 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 1 Feb 2009 22:44:10 +0000 (23:44 +0100)
src/GUI/dialog.cxx

index 33b51b93fb53b8c0ff8d63d63b086abccf5ffa29..6d710e7e6e2b717defcd3c6480795bdf22547456 100644 (file)
@@ -798,6 +798,9 @@ FGDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeight)
             obj->setSize(width, height);
         setupObject(obj, props);
         setColor(obj, props, FOREGROUND|LABEL);
+
+        int top = props->getIntValue("top-line", 0);
+        obj->setTopLineInWindow(top < 0 ? unsigned(-1) >> 1 : top);
         return obj;
 
     } else if (type == "select") {