[master] 7b9ddd9 - Fix group nesting / end() statements in test/cube demo

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 7b9ddd9 - Fix group nesting / end() statements in test/cube demo "Albrecht Schlosser" 04:47 Nov 25 top right image
 
commit 7b9ddd97c3f1feb30f06e5da43b5158512862fc3
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Thu Nov 25 13:36:18 2021 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Nov 25 13:36:44 2021 +0100

    Fix group nesting / end() statements in test/cube demo

 test/cube.cxx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git test/cube.cxx test/cube.cxx
index 733af20..76cb0a8 100644
--- test/cube.cxx
+++ test/cube.cxx
@@ -3,7 +3,7 @@
 //
 // Modified to have 2 cubes to test multiple OpenGL contexts
 //
-// Copyright 1998-2019 by Bill Spitzak and others.
+// Copyright 1998-2021 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -230,17 +230,18 @@ void makeform(const char *name) {
     // right resizer
     Fl_Box *rt_resizer = new Fl_Box(rt_grp_x-5, rt_grp_y, 10, rt_grp_h);
     rt_resizer->box(FL_NO_BOX);
-  form->end();
-  form->resizable(rt_resizer);
-  form->size_range(form->w(), form->h()); // minimum window size
 
 #if HAVE_GL
-  // try to overlay a button onto an OpenGL window
-  lt_cube->begin();
-  Fl_Button *test = new Fl_Button(35, 105, 100, 30, "Test");
-  test->box(FL_ROUND_UP_BOX);
-  lt_cube->end();
+    // overlay a button onto an OpenGL window
+    lt_cube->begin();
+    Fl_Button *test = new Fl_Button(35, 105, 100, 30, "Test");
+    test->box(FL_ROUND_UP_BOX);
+    lt_cube->end();
 #endif // HAVE_GL
+
+  form->end();
+  form->resizable(rt_resizer);
+  form->size_range(form->w(), form->h()); // minimum window size
 }
 
 int main(int argc, char **argv) {
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.