16
0
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:
WLs50
2025-03-09 15:36:11 +01:00
parent a687f551a2
commit a5f6397eca
1211 changed files with 483542 additions and 58643 deletions

View File

@@ -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();
}

View File

@@ -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));
}
}
}