]> git.tdb.fi Git - r2c2.git/commitdiff
Make function toggles 1px wider to have 5 of them fill the space exactly
authorMikko Rasa <tdb@tdb.fi>
Fri, 18 Dec 2009 21:10:02 +0000 (21:10 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 18 Dec 2009 21:10:02 +0000 (21:10 +0000)
Write most function names fully
Add BR 194 loco

locos.dat
source/engineer/trainpanel.cpp

index f923d45d219b4678549a74cf2282ae22f1b95e42..f44c9beb5635c664550cfc19ace054930fe46d50 100644 (file)
--- a/locos.dat
+++ b/locos.dat
@@ -3,9 +3,9 @@
 locomotive 37844
 {
        name "BR 50";
-       function 0 "lght";
+       function 0 "light";
        function 1 "smke";
-       function 2 "tlx";
+       function 2 "telex";
        function 3 "sfx";
        function 5 "whst";
 };
@@ -13,12 +13,18 @@ locomotive 37844
 locomotive 33961
 {
        name "BR 86";
-       function 0 "lght";
-       function 2 "tlx";
+       function 0 "light";
+       function 2 "telex";
 };
 
 locomotive 36850
 {
        name "BR 185";
-       function 0 "lght";
+       function 0 "light";
+};
+
+locomotive 37225
+{
+       name "BR 194";
+       function 0 "light";
 };
index 250b283c23990ead07f5e8114f3f057f7d39e567..5a1e531dda3457099cddd9bed2ab1b00be546221 100644 (file)
@@ -64,14 +64,14 @@ TrainPanel::TrainPanel(Engineer &e, const GLtk::Resources &r, Train &t):
 
        const map<unsigned, string> &funcs = train.get_locomotive().get_type().get_functions();
        unsigned x = 10;
-       for(map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=35)
+       for(map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=36)
        {
                string fname = i->second;
                fname[0] = toupper(fname[0]);
                GLtk::Toggle *tgl;
                add(*(tgl=new GLtk::Toggle(res)));
                tgl->set_text(fname);
-               tgl->set_geometry(GLtk::Geometry(x, geom.h-85, 35, 27));
+               tgl->set_geometry(GLtk::Geometry(x, geom.h-85, 36, 27));
                tgl->set_value(train.get_locomotive().get_function(i->first));
                tgl->signal_toggled.connect(sigc::bind(sigc::mem_fun(this, &TrainPanel::func_toggled), i->first));