mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 03:59:19 +02:00
feat(ui): imgui 1.91.9b-docking in place of 1.73: local changes of the backends carried over (glad as the gl loader, srgb and gamma of the ui, gles glsl string), BufferingBar/Spinner kept, imgui_tables in cmake; cursor position, cursor enter and focus of the main window passed to the glfw backend, which works with events now; code adapted to the api: ImGuiListClipper::Begin, BeginListBox, ImTextureID as an integer, ImageButton with an id, ImGuiKey without GetKeyIndex, logarithmic sliders in place of the removed power argument; ImGuizmo with the math operators defined before imgui.h and SetNextFrameWantCaptureMouse
This commit is contained in:
@@ -308,13 +308,16 @@ void ui::map_panel::render_contents()
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
ImGui::ImageButton((ImTextureID)(intptr_t)(m_tex->id),
|
||||
// imgui 1.89+ takes the frame padding of the image button from the style
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f));
|
||||
ImGui::ImageButton("##map",
|
||||
(ImTextureID)(intptr_t)(m_tex->id),
|
||||
surface_size_im,
|
||||
ImVec2(0, surface_size.y / fb_size),
|
||||
ImVec2(surface_size.x / fb_size, 0),
|
||||
0,
|
||||
ImVec4(0.0f, 0.0f, 0.0f, 0.0f),
|
||||
ImVec4(1.0f, 1.0f, 1.0f, Global.UIBgOpacity));
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleColor(3);
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
|
||||
Reference in New Issue
Block a user