16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2019-03-16 01:37:38 +01:00
35 changed files with 2328 additions and 1740 deletions

View File

@@ -23,12 +23,17 @@ driver_ui::driver_ui() {
clear_panels();
// bind the panels with ui object. maybe not the best place for this but, eh
push_back( &m_aidpanel );
push_back( &m_scenariopanel );
push_back( &m_timetablepanel );
push_back( &m_debugpanel );
push_back( &m_transcriptspanel );
m_aidpanel.title = locale::strings[ locale::string::driver_aid_header ];
m_scenariopanel.title = locale::strings[ locale::string::driver_scenario_header ];
m_scenariopanel.size_min = { 435, 85 };
m_scenariopanel.size_max = { Global.iWindowWidth * 0.95, Global.iWindowHeight * 0.95 };
m_timetablepanel.title = locale::strings[ locale::string::driver_timetable_header ];
m_timetablepanel.size_min = { 435, 110 };
m_timetablepanel.size_max = { 435, Global.iWindowHeight * 0.95 };
@@ -67,6 +72,7 @@ driver_ui::on_key( int const Key, int const Action ) {
case GLFW_KEY_F1:
case GLFW_KEY_F2:
case GLFW_KEY_F3:
case GLFW_KEY_F10:
case GLFW_KEY_F12: { // ui mode selectors
@@ -114,6 +120,12 @@ driver_ui::on_key( int const Key, int const Action ) {
return true;
}
case GLFW_KEY_F3: {
// debug panel
m_scenariopanel.is_open = !m_scenariopanel.is_open;
return true;
}
case GLFW_KEY_F12: {
// debug panel
m_debugpanel.is_open = !m_debugpanel.is_open;