diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-10-28 03:07:00 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-10-28 15:10:45 +0100 |
| commit | 936fc578a825a04a58fce5d6bea518b1b02694f1 (patch) | |
| tree | 72e76fc2c157bdbafb8b4264f7f786701861c632 /editor/imgui-editors.cpp | |
| parent | 1bfc0344dd517f33ac1a2f5c1d18c568381a80db (diff) | |
wip to rebase
Diffstat (limited to 'editor/imgui-editors.cpp')
| -rw-r--r-- | editor/imgui-editors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/imgui-editors.cpp b/editor/imgui-editors.cpp index 4e331bcf..1dfc18fc 100644 --- a/editor/imgui-editors.cpp +++ b/editor/imgui-editors.cpp @@ -114,7 +114,7 @@ void draw_editor_tile_pane_atlas(ground_editor& ed, StringView name, const bptr< snformat(buf, "##item_{}"_cf, i); const auto uv = atlas->texcoords_for_id(i); constexpr ImVec2 size_2 = { TILE_SIZE[0]*.5f, TILE_SIZE[1]*.5f }; - ImGui::ImageButton(buf, (void*)&atlas->texture(), ImVec2(size_2.x * dpi[0], size_2.y * dpi[1]), + ImGui::ImageButton(buf, atlas->texture().id(), ImVec2(size_2.x * dpi[0], size_2.y * dpi[1]), { uv[3][0], uv[3][1] }, { uv[0][0], uv[0][1] }); if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) ed.select_tile(atlas, i); @@ -181,7 +181,7 @@ void impl_draw_editor_scenery_pane(T& ed, Vector2 dpi) const ImVec2 uv0 {texcoords[3][0], texcoords[3][1]}, uv1 {texcoords[0][0], texcoords[0][1]}; ImGui::SetCursorPosX(ImGui::GetCursorPosX() + std::max(0.f, .5f*(thumbnail_width - img_size.x))); ImGui::SetCursorPosY(ImGui::GetCursorPosY() + .5f*std::max(0.f, row_height - img_size.y)); - ImGui::Image((void*)&atlas.texture(), img_size, uv0, uv1); + ImGui::Image(atlas.texture().id(), img_size, uv0, uv1); click_event(); } if (ImGui::TableSetColumnIndex(1)) |
