From: Mikko Rasa Date: Tue, 17 Jul 2007 08:33:11 +0000 (+0000) Subject: Add train properties dialog (unfinished) X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;ds=sidebyside;h=9462461b00b65c0018114802cfba8f290d6b2d42;p=r2c2.git Add train properties dialog (unfinished) Remove some unnecessary files --- diff --git a/source/engineer/guicomponent.h b/source/engineer/guicomponent.h deleted file mode 100644 index f752936..0000000 --- a/source/engineer/guicomponent.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef GUICOMPONENT_H_ -#define GUICOMPONENT_H_ - -class GuiComponent -{ -public: - enum HAlign - { - LEFT, - CENTER, - RIGHT - }; - - enum VAlign - { - TOP, - MIDDLE, - BOTTOM - }; - - struct Part - { - enum Type - { - IMAGE, - LABEL, - TEXT - }; - - std::string variation; - std::string state; - Type type; - std::string data; - HAlign align_x; - VAlign align_y; - int offset_x; - int offset_y; - }; - typedef std::list PartSeq; - -private: -}; - -#endif diff --git a/source/engineer/guiresources.h b/source/engineer/guiresources.h deleted file mode 100644 index 86d29ce..0000000 --- a/source/engineer/guiresources.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef GUIRESOURCES_H_ -#define GUIRESOURCES_H_ - -#endif diff --git a/source/engineer/trainproperties.cpp b/source/engineer/trainproperties.cpp new file mode 100644 index 0000000..adb48d3 --- /dev/null +++ b/source/engineer/trainproperties.cpp @@ -0,0 +1,21 @@ +#include "trainproperties.h" + +using namespace Msp; + +TrainProperties::TrainProperties(GLtk::Resources &r, Train &t): + Panel(r), + train(t) +{ + set_size(200, 50); + + add(*(ent_name=new GLtk::Entry(res, train.get_name()))); + ent_name->set_geometry( + + GLtk::Button *btn; + + add(*(btn=new GLtk::Button(res, "OK"))); + btn->set_geometry(geom.width-45, 5, 40, 25); + + add(*(btn=new GLtk::Button(res, "Cncl"))); + btn->set_geometry(geom.width-45, 5, 40, 25); +} diff --git a/source/engineer/trainproperties.h b/source/engineer/trainproperties.h new file mode 100644 index 0000000..de0d8a8 --- /dev/null +++ b/source/engineer/trainproperties.h @@ -0,0 +1,16 @@ +#ifndef TRAINPROPERTIES_H_ +#define TRAINPROPERTIES_H_ + +#include + +class TrainProperties: public Msp::GLtk::Panel +{ +public: + TrainProperties(Msp::GLtk::Resources &, Train &); +private: + Train &train; + Msp::GLtk::Entry *ent_id; + Msp::GLtk::Entry *ent_name; +}; + +#endif