Compare commits

..

No commits in common. "3a149fad6de8872da4d8489cf944750a47bdca2d" and "c5233e0d1db06b615b663d1b47422ebbe4bd8a63" have entirely different histories.

3 changed files with 9 additions and 13 deletions

View File

@ -28,10 +28,4 @@ ox::Error init(
return {};
}
ox::Result<ox::UPtr<Context>> init(ox::UPtr<ox::FileSystem> &&fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<Context>();
oxReturnError(keel::init(ctx.get(), std::move(fs), appName));
return ctx;
}
}

View File

@ -19,8 +19,11 @@ ox::Error init(
ox::UPtr<ox::FileSystem> &&fs,
ox::CRStringView appName) noexcept;
ox::Result<ox::UPtr<Context>> init(
ox::UPtr<ox::FileSystem> &&fs,
ox::CRStringView appName) noexcept;
template<typename Ctx = keel::Context>
ox::Result<ox::UPtr<Ctx>> init(ox::UPtr<ox::FileSystem> &&fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<Ctx>();
oxReturnError(keel::init(ctx.get(), std::move(fs), appName));
return ctx;
}
}

View File

@ -123,7 +123,6 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept {
ImGui::SameLine();
ImGui::BeginChild("Controls", ImVec2(m_palViewWidth - 8, paneSize.y), true);
{
const auto controlsSize = ImGui::GetContentRegionAvail();
ImGui::BeginChild("ToolBox", ImVec2(m_palViewWidth - 24, 30), true);
{
const auto btnSz = ImVec2(45, 14);
@ -142,14 +141,14 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept {
}
}
ImGui::EndChild();
const auto ySize = controlsSize.y - 38;
const auto ySize = paneSize.y - 36;
// draw palette/color picker
ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.f), true);
ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.07f), true);
{
drawPaletteSelector();
}
ImGui::EndChild();
ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.f), true);
ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.03f), true);
{
static constexpr auto btnHeight = 18;
const auto btnSize = ImVec2(18, btnHeight);