mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
scenario ui panel
This commit is contained in:
@@ -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 };
|
||||
@@ -65,6 +70,7 @@ driver_ui::on_key_( int const Key, int const Scancode, int const Action, int con
|
||||
|
||||
case GLFW_KEY_F1:
|
||||
case GLFW_KEY_F2:
|
||||
case GLFW_KEY_F3:
|
||||
case GLFW_KEY_F10:
|
||||
case GLFW_KEY_F12: { // ui mode selectors
|
||||
|
||||
@@ -112,6 +118,12 @@ driver_ui::on_key_( int const Key, int const Scancode, int const Action, int con
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user