[keel,nostalgia,studio] Fix implicit conversions
This commit is contained in:
@ -62,7 +62,6 @@ void NewMenu::drawNewItemType(turbine::Context *ctx) noexcept {
|
||||
}
|
||||
ImGui::ListBox("Item Type", &m_selectedType, items.get(), static_cast<int>(m_types.size()));
|
||||
drawFirstPageButtons();
|
||||
ImGui::EndPopup();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <ox/event/signal.hpp>
|
||||
#include <ox/std/string.hpp>
|
||||
#include <ox/std/vec.hpp>
|
||||
|
||||
#include <turbine/context.hpp>
|
||||
|
||||
#include "imguiuitl.hpp"
|
||||
|
||||
namespace studio {
|
||||
|
||||
|
||||
@ -47,14 +47,7 @@ class Popup {
|
||||
return m_title;
|
||||
}
|
||||
|
||||
void drawWindow(turbine::Context *ctx, bool *open, auto drawContents) {
|
||||
studio::ig::centerNextWindow(ctx);
|
||||
ImGui::SetNextWindowSize(static_cast<ImVec2>(m_size));
|
||||
constexpr auto modalFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize;
|
||||
if (ImGui::BeginPopupModal(m_title.c_str(), open, modalFlags)) {
|
||||
drawContents();
|
||||
}
|
||||
}
|
||||
void drawWindow(turbine::Context *ctx, bool *open, const std::function<void()> &drawContents);
|
||||
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,18 @@
|
||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||
*/
|
||||
|
||||
#include <studio/imguiuitl.hpp>
|
||||
#include <studio/popup.hpp>
|
||||
|
||||
namespace studio {
|
||||
|
||||
void Popup::drawWindow(turbine::Context *ctx, bool *open, const std::function<void()> &drawContents) {
|
||||
studio::ig::centerNextWindow(ctx);
|
||||
ImGui::SetNextWindowSize(static_cast<ImVec2>(m_size));
|
||||
constexpr auto modalFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize;
|
||||
if (ImGui::BeginPopupModal(m_title.c_str(), open, modalFlags)) {
|
||||
drawContents();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -35,7 +35,7 @@ Project::Project(keel::Context *ctx, ox::String path, ox::CRStringView projectDa
|
||||
ox::Error Project::create() noexcept {
|
||||
std::error_code ec;
|
||||
std::filesystem::create_directory(m_path.toStdString(), ec);
|
||||
return OxError(ec.value(), "PassThroughFS: mkdir failed");
|
||||
return OxError(static_cast<ox::ErrorCode>(ec.value()), "PassThroughFS: mkdir failed");
|
||||
}
|
||||
|
||||
ox::FileSystem *Project::romFs() noexcept {
|
||||
|
Reference in New Issue
Block a user