Revision: 2641
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2641&view=rev
Author: rorthomas
Date: 2012-05-23 23:18:48 +0000 (Wed, 23 May 2012)
Log Message:
-----------
improved GUI:
- added separate font for GUI: higher resolution, better readable
- added engine_autogear_string for GUI: able to display the RND21 display now
- moved gear number to speedo, looked weird hanging in the air
- fixed opacity race condition on showing/hiding by removing the smooth blending
Modified Paths:
--------------
trunk/bin/resources/dashboards.zip
trunk/bin/resources/mygui.zip
trunk/source/main/gui/DashBoardManager.cpp
trunk/source/main/gui/DashBoardManager.h
trunk/source/main/physics/Beam.cpp
Modified: trunk/bin/resources/dashboards.zip
===================================================================
(Binary files differ)
Modified: trunk/bin/resources/mygui.zip
===================================================================
(Binary files differ)
Modified: trunk/source/main/gui/DashBoardManager.cpp
===================================================================
--- trunk/source/main/gui/DashBoardManager.cpp 2012-05-23 23:02:31 UTC (rev
2640)
+++ trunk/source/main/gui/DashBoardManager.cpp 2012-05-23 23:18:48 UTC (rev
2641)
@@ -47,6 +47,7 @@
INITDATA(DD_ENGINE_GEAR , DC_INT , "engine_gear");
INITDATA(DD_ENGINE_NUM_GEAR , DC_INT , "engine_num_gear");
INITDATA(DD_ENGINE_GEAR_STRING , DC_CHAR , "engine_gear_string");
+ INITDATA(DD_ENGINE_AUTOGEAR_STRING , DC_CHAR ,
"engine_autogear_string");
INITDATA(DD_ENGINE_AUTO_GEAR , DC_INT , "engine_auto_gear");
INITDATA(DD_ENGINE_CLUTCH , DC_FLOAT, "engine_clutch");
INITDATA(DD_BRAKE , DC_FLOAT, "brake");
@@ -108,6 +109,8 @@
INITDATA(DD_ODOMETER_TOTAL , DC_FLOAT, "odometer_total");
INITDATA(DD_ODOMETER_USER , DC_FLOAT, "odometer_user");
+ // load dash fonts
+ MyGUI::ResourceManager::getInstance().load("MyGUI_FontsDash.xml");
}
@@ -663,10 +666,12 @@
if(!mainWidget) return;
visible = v;
+ /*
+ // buggy for some reason
if(smooth)
mainWidget->setVisibleSmooth(v);
- else
- mainWidget->setVisible(v);
+ */
+ mainWidget->setVisible(v);
}
#endif // USE_MYGUI
Modified: trunk/source/main/gui/DashBoardManager.h
===================================================================
--- trunk/source/main/gui/DashBoardManager.h 2012-05-23 23:02:31 UTC (rev
2640)
+++ trunk/source/main/gui/DashBoardManager.h 2012-05-23 23:18:48 UTC (rev
2641)
@@ -79,6 +79,7 @@
DD_ENGINE_GEAR, // current gear
DD_ENGINE_NUM_GEAR, // amount of gears
DD_ENGINE_GEAR_STRING, // string like "<current gear>/<max gear>"
+ DD_ENGINE_AUTOGEAR_STRING, // string like "P R N G"
DD_ENGINE_AUTO_GEAR, // automatic gear
DD_ENGINE_CLUTCH, // the engines clutch
Modified: trunk/source/main/physics/Beam.cpp
===================================================================
--- trunk/source/main/physics/Beam.cpp 2012-05-23 23:02:31 UTC (rev 2640)
+++ trunk/source/main/physics/Beam.cpp 2012-05-23 23:18:48 UTC (rev 2641)
@@ -5766,6 +5766,22 @@
str = String("R");
dash->setChar(DD_ENGINE_GEAR_STRING, str.c_str());
+
+ // R N D 2 1 String
+ int cg = engine->getAutoShift();
+ if(cg != BeamEngine::MANUALMODE)
+ {
+ str = ((cg == BeamEngine::REAR)
?"#ff0012":"#8a000a") + String("R\n");
+ str += ((cg ==
BeamEngine::NEUTRAL)?"#ffffff":"#868686") + String("N\n");
+ str += ((cg == BeamEngine::DRIVE)
?"#12ff00":"#248c00") + String("D\n");
+ str += ((cg == BeamEngine::TWO)
?"#ffffff":"#868686") + String("2\n");
+ str += ((cg == BeamEngine::ONE)
?"#ffffff":"#868686") + String("1");
+ } else
+ {
+ //str = "#b8b8b8M\na\nn\nu\na\nl";
+ str = "#b8b8b8M\na\nn\nu";
+ }
+ dash->setChar(DD_ENGINE_AUTOGEAR_STRING, str.c_str());
// autogears
int autoGear = engine->getAutoShift();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel