summaryrefslogtreecommitdiffhomepage
path: root/editor/imgui-editors.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-10-28 03:07:00 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-10-28 08:48:29 +0100
commit5032581ffc1e29d6b139d66eaa7228c0113bed14 (patch)
tree0fa40a95cba1ceacddef4b032b40e4b605329166 /editor/imgui-editors.cpp
parent221861499394aa8fa5c2682cafb3387ab9a3683f (diff)
wip to rebasewip22
Diffstat (limited to 'editor/imgui-editors.cpp')
-rw-r--r--editor/imgui-editors.cpp4
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))