Compare commits
3 Commits
8173c95fc5
...
9b57d61ed0
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b57d61ed0 | |||
| a32a0a067a | |||
| 7688c05bac |
1
deps/nostalgia/release-notes.md
vendored
1
deps/nostalgia/release-notes.md
vendored
@@ -2,6 +2,7 @@
|
||||
|
||||
* Add ability to remember recent projects in config
|
||||
* PaletteEditor: Add RGB key shortcuts for focusing color channels
|
||||
* PaletteEditor: Add color preview to color editor
|
||||
|
||||
# d2025.05.2
|
||||
|
||||
|
||||
@@ -307,6 +307,15 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
|
||||
colorInput("Red", r, inputFocused, FocusCmd::Red);
|
||||
colorInput("Green", g, inputFocused, FocusCmd::Green);
|
||||
colorInput("Blue", b, inputFocused, FocusCmd::Blue);
|
||||
// color preview
|
||||
{
|
||||
ImGui::PushStyleColor(
|
||||
ImGuiCol_ChildBg,
|
||||
color32(color16(r, g, b)) | 0xff'00'00'00);
|
||||
ImGui::BeginChild("ColorPreview", {0, 25});
|
||||
ImGui::EndChild();
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
if (ig::PushButton("Apply to all pages", {-1, ig::BtnSz.y})) {
|
||||
std::ignore = pushCommand<ApplyColorAllPagesCommand>(
|
||||
m_pal, m_page, m_selectedColorRow);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace jasper::world {
|
||||
|
||||
TileClipboard::TileClipboard(ox::UUID assetId, ox::Size selSz) noexcept:
|
||||
TileClipboard::TileClipboard(ox::UUID const &assetId, ox::Size selSz) noexcept:
|
||||
m_assetId(assetId), m_selSz(selSz) {
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ ox::Size TileClipboard::selectionSize() const noexcept {
|
||||
return m_selSz;
|
||||
}
|
||||
|
||||
void TileClipboard::addTile(const ModifyTilesCommand::Mod&mod) noexcept {
|
||||
void TileClipboard::addTile(ModifyTilesCommand::Mod const &mod) noexcept {
|
||||
m_tileMods.emplace_back(mod);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class TileClipboard : public turbine::ClipboardObject<TileClipboard> {
|
||||
ox::Vector<ModifyTilesCommand::Mod> m_tileMods;
|
||||
|
||||
public:
|
||||
TileClipboard(ox::UUID assetId, ox::Size selSz) noexcept;
|
||||
TileClipboard(ox::UUID const &assetId, ox::Size selSz) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
ox::Size selectionSize() const noexcept;
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
namespace jasper::world {
|
||||
|
||||
template<
|
||||
WorldObjCommand cmd, auto getVar, auto hasMerge = false,
|
||||
WorldObjCommand cmd,
|
||||
auto getVar,
|
||||
auto hasMerge = false,
|
||||
typename ValType = std::remove_reference_t<decltype(getVar(*new WorldObject))>>
|
||||
class EditObject: public studio::UndoCommand {
|
||||
private:
|
||||
|
||||
@@ -178,7 +178,10 @@ ox::Error WorldObjectSetEditorImGui::loadObj() noexcept {
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
static ox::Vec2 clickPos(ImVec2 const&imgSz, ImVec2 const&offset, ox::Vec2 clickPos) noexcept {
|
||||
static ox::Vec2 clickPos(
|
||||
ImVec2 const &imgSz,
|
||||
ImVec2 const &offset,
|
||||
ox::Vec2 clickPos) noexcept {
|
||||
clickPos.x -= offset.x;
|
||||
clickPos.y -= offset.y;
|
||||
clickPos.x /= imgSz.x;
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
namespace jasper::world {
|
||||
|
||||
[[nodiscard]]
|
||||
static bool isUpdatingObj(ObjTileRefSet const&obj) noexcept {
|
||||
bool isUpdatingObj(ObjTileRefSet const &obj) noexcept {
|
||||
return obj.frames > 1;
|
||||
}
|
||||
|
||||
World::World(ngfx::Context &nctx, WorldStatic const &worldStatic) noexcept:
|
||||
m_nctx(nctx),
|
||||
m_worldStatic(worldStatic) {}
|
||||
m_nctx{nctx},
|
||||
m_worldStatic{worldStatic} {}
|
||||
|
||||
ox::Error World::setupDisplay() noexcept {
|
||||
if (m_worldStatic.objTileRefSets.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user