/* * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. */ #pragma once #include #include namespace nostalgia::core { class PaletteEditorImGui: public studio::Editor { private: Context *m_ctx = nullptr; ox::String m_itemName; ox::String m_itemPath; Palette m_pal; std::size_t m_selectedRow = 0; PaletteEditorImGui() noexcept = default; public: static ox::Result make(Context *ctx, const ox::String &path) noexcept; /** * Returns the name of item being edited. */ const ox::String &itemName() const noexcept final; const ox::String &itemDisplayName() const noexcept final; void draw(core::Context*) noexcept final; protected: ox::Error saveItem() noexcept final; }; }