mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
merge manul
This commit is contained in:
@@ -23,11 +23,11 @@ public:
|
||||
}
|
||||
|
||||
if (image != null_handle) {
|
||||
opengl_texture &tex = GfxRenderer->Texture(image);
|
||||
auto &tex = GfxRenderer->Texture(image);
|
||||
tex.create();
|
||||
|
||||
if (tex.is_ready)
|
||||
return tex.id;
|
||||
if (tex.get_is_ready())
|
||||
return tex.get_id();
|
||||
}
|
||||
|
||||
return -1;
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
glm::ivec2 size() const
|
||||
{
|
||||
if (image != null_handle) {
|
||||
opengl_texture &tex = GfxRenderer->Texture(image);
|
||||
return glm::ivec2(tex.width(), tex.height());
|
||||
auto &tex = GfxRenderer->Texture(image);
|
||||
return glm::ivec2(tex.get_width(), tex.get_height());
|
||||
}
|
||||
return glm::ivec2();
|
||||
}
|
||||
|
||||
@@ -81,14 +81,14 @@ void ui::scenerylist_panel::draw_scenery_image()
|
||||
}
|
||||
|
||||
if (selected_scenery->image != null_handle) {
|
||||
opengl_texture &tex = GfxRenderer->Texture(selected_scenery->image);
|
||||
auto &tex = GfxRenderer->Texture(selected_scenery->image);
|
||||
tex.create();
|
||||
|
||||
if (tex.is_ready) {
|
||||
if (tex.get_is_ready()) {
|
||||
float avail_width = ImGui::GetContentRegionAvailWidth();
|
||||
float height = avail_width / tex.width() * tex.height();
|
||||
float height = avail_width / tex.get_width() * tex.get_height();
|
||||
|
||||
ImGui::Image(reinterpret_cast<void *>(tex.id), ImVec2(avail_width, height), ImVec2(0, 1), ImVec2(1, 0));
|
||||
ImGui::Image(reinterpret_cast<void *>(tex.get_id()), ImVec2(avail_width, height), ImVec2(0, 1), ImVec2(1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user