From: Mikko Rasa Date: Fri, 18 Dec 2009 21:10:02 +0000 (+0000) Subject: Make function toggles 1px wider to have 5 of them fill the space exactly X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=296d83d8a04e767e2b622ebc0570515617859275;p=r2c2.git Make function toggles 1px wider to have 5 of them fill the space exactly Write most function names fully Add BR 194 loco --- diff --git a/locos.dat b/locos.dat index f923d45..f44c9be 100644 --- 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"; }; diff --git a/source/engineer/trainpanel.cpp b/source/engineer/trainpanel.cpp index 250b283..5a1e531 100644 --- a/source/engineer/trainpanel.cpp +++ b/source/engineer/trainpanel.cpp @@ -64,14 +64,14 @@ TrainPanel::TrainPanel(Engineer &e, const GLtk::Resources &r, Train &t): const map &funcs = train.get_locomotive().get_type().get_functions(); unsigned x = 10; - for(map::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=35) + for(map::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));