mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 06:55:02 +01:00
make trackswitch window semitransparent
This commit is contained in:
@@ -524,6 +524,14 @@ void ui::launcher_window::render_content()
|
||||
|
||||
ui::track_switch_window::track_switch_window(ui_panel &panel, std::shared_ptr<map::track_switch> &&sw) : popup(panel), m_switch(sw) {}
|
||||
|
||||
bool ui::track_switch_window::render()
|
||||
{
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.5f);
|
||||
bool ret = popup::render();
|
||||
ImGui::PopStyleVar();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ui::track_switch_window::render_content()
|
||||
{
|
||||
auto &highlight = dynamic_cast<map_panel&>(m_parent).highlighted_switches;
|
||||
|
||||
@@ -54,6 +54,7 @@ class track_switch_window : public popup
|
||||
public:
|
||||
track_switch_window(ui_panel &panel, std::shared_ptr<map::track_switch> &&sw);
|
||||
|
||||
virtual bool render() override;
|
||||
virtual void render_content() override;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class popup
|
||||
popup(ui_panel &panel);
|
||||
virtual ~popup();
|
||||
|
||||
bool render();
|
||||
virtual bool render();
|
||||
|
||||
protected:
|
||||
ui_panel &m_parent;
|
||||
|
||||
Reference in New Issue
Block a user