]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainview.h
Complete rewrite of the engineer UI
[r2c2.git] / source / engineer / trainview.h
index c7ba7b90c30da5b05e546aa384369f901b5eacd3..6ee9b4e77e4a66669b84859c23b444345b277711 100644 (file)
@@ -1,23 +1,16 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef TRAINVIEW_H_
 #define TRAINVIEW_H_
 
 #include <msp/gl/renderbuffer.h>
 #include <msp/gl/framebuffer.h>
 #include <msp/gl/texture2d.h>
-#include <msp/gltk/panel.h>
+#include <msp/gltk/dialog.h>
 #include <msp/gltk/toggle.h>
 #include "libr2c2/train.h"
 
 class Engineer;
 
-class TrainView: public Msp::GLtk::Panel
+class TrainView: public Msp::GLtk::Dialog
 {
 public:
        enum Mode
@@ -38,18 +31,17 @@ private:
        Msp::GL::Renderbuffer depth;
        Msp::GL::Camera camera;
        Msp::GL::Pipeline pipeline;
-       bool stale;
 
 public:
        TrainView(Engineer &, const R2C2::Train &);
        ~TrainView();
 
        void set_mode(Mode);
+private:
+       void ui_mode_toggled(bool, Mode);
+public:
        void set_forward(bool);
        void prepare();
-private:
-       virtual void button_release(int, int, unsigned);
-       void close_clicked();
 };
 
 #endif