Compare commits
2 Commits
c5233e0d1d
...
3a149fad6d
Author | SHA1 | Date | |
---|---|---|---|
3a149fad6d | |||
de50a5392a |
@ -28,4 +28,10 @@ ox::Error init(
|
|||||||
return {};
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,8 @@ ox::Error init(
|
|||||||
ox::UPtr<ox::FileSystem> &&fs,
|
ox::UPtr<ox::FileSystem> &&fs,
|
||||||
ox::CRStringView appName) noexcept;
|
ox::CRStringView appName) noexcept;
|
||||||
|
|
||||||
template<typename Ctx = keel::Context>
|
ox::Result<ox::UPtr<Context>> init(
|
||||||
ox::Result<ox::UPtr<Ctx>> init(ox::UPtr<ox::FileSystem> &&fs, ox::CRStringView appName) noexcept {
|
ox::UPtr<ox::FileSystem> &&fs,
|
||||||
auto ctx = ox::make_unique<Ctx>();
|
ox::CRStringView appName) noexcept;
|
||||||
oxReturnError(keel::init(ctx.get(), std::move(fs), appName));
|
|
||||||
return ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept {
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::BeginChild("Controls", ImVec2(m_palViewWidth - 8, paneSize.y), true);
|
ImGui::BeginChild("Controls", ImVec2(m_palViewWidth - 8, paneSize.y), true);
|
||||||
{
|
{
|
||||||
|
const auto controlsSize = ImGui::GetContentRegionAvail();
|
||||||
ImGui::BeginChild("ToolBox", ImVec2(m_palViewWidth - 24, 30), true);
|
ImGui::BeginChild("ToolBox", ImVec2(m_palViewWidth - 24, 30), true);
|
||||||
{
|
{
|
||||||
const auto btnSz = ImVec2(45, 14);
|
const auto btnSz = ImVec2(45, 14);
|
||||||
@ -141,14 +142,14 @@ void TileSheetEditorImGui::draw(turbine::Context*) noexcept {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
const auto ySize = paneSize.y - 36;
|
const auto ySize = controlsSize.y - 38;
|
||||||
// draw palette/color picker
|
// draw palette/color picker
|
||||||
ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.07f), true);
|
ImGui::BeginChild("Palette", ImVec2(m_palViewWidth - 24, ySize / 2.f), true);
|
||||||
{
|
{
|
||||||
drawPaletteSelector();
|
drawPaletteSelector();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.03f), true);
|
ImGui::BeginChild("SubSheets", ImVec2(m_palViewWidth - 24, ySize / 2.f), true);
|
||||||
{
|
{
|
||||||
static constexpr auto btnHeight = 18;
|
static constexpr auto btnHeight = 18;
|
||||||
const auto btnSize = ImVec2(18, btnHeight);
|
const auto btnSize = ImVec2(18, btnHeight);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user