Merge commit '9e11019b87ba27d1dac9e097dc212a126e404218'

This commit is contained in:
Gary Talent 2024-11-01 22:23:08 -05:00
commit 5025475414
3 changed files with 20 additions and 16 deletions

2
deps/ox/ox-docs.md vendored
View File

@ -179,6 +179,8 @@ ox::Result<int> f2() noexcept {
```oxRequire``` by default creates a const, but there is also an ```oxRequireM``` (oxRequire Mutable) ```oxRequire``` by default creates a const, but there is also an ```oxRequireM``` (oxRequire Mutable)
variant for creating a non-const value. variant for creating a non-const value.
* ```oxRequireM``` - oxRequire Mutable
### Logging and Output ### Logging and Output
Ox provides for logging and debug prints via the ```oxTrace```, ```oxDebug```, and ```oxError``` macros. Ox provides for logging and debug prints via the ```oxTrace```, ```oxDebug```, and ```oxError``` macros.

View File

@ -154,22 +154,24 @@ void PaletteEditorImGui::drawColorsEditor() noexcept {
ImGui::TableSetupColumn("Blue", ImGuiTableColumnFlags_WidthFixed, 40); ImGui::TableSetupColumn("Blue", ImGuiTableColumnFlags_WidthFixed, 40);
ImGui::TableSetupColumn("Preview", ImGuiTableColumnFlags_NoHide); ImGui::TableSetupColumn("Preview", ImGuiTableColumnFlags_NoHide);
ImGui::TableHeadersRow(); ImGui::TableHeadersRow();
for (auto i = 0u; auto const&c : m_pal.pages[m_page].colors) { if (m_page < m_pal.pages.size()) {
ig::IDStackItem const idStackItem(static_cast<int>(i)); for (auto i = 0u; auto const &c: m_pal.pages[m_page].colors) {
ImGui::TableNextRow(); ig::IDStackItem const idStackItem(static_cast<int>(i));
drawColumn(i + 1); ImGui::TableNextRow();
drawColumnLeftAlign(m_pal.colorNames[i]); drawColumn(i + 1);
drawColumn(red16(c)); drawColumnLeftAlign(m_pal.colorNames[i]);
drawColumn(green16(c)); drawColumn(red16(c));
drawColumn(blue16(c)); drawColumn(green16(c));
ImGui::TableNextColumn(); drawColumn(blue16(c));
auto const ic = ImGui::GetColorU32({redf(c), greenf(c), bluef(c), 1}); ImGui::TableNextColumn();
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ic); auto const ic = ImGui::GetColorU32({redf(c), greenf(c), bluef(c), 1});
if (ImGui::Selectable( ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ic);
"##ColorRow", i == m_selectedColorRow, ImGuiSelectableFlags_SpanAllColumns)) { if (ImGui::Selectable(
m_selectedColorRow = i; "##ColorRow", i == m_selectedColorRow, ImGuiSelectableFlags_SpanAllColumns)) {
m_selectedColorRow = i;
}
++i;
} }
++i;
} }
} }
ImGui::EndTable(); ImGui::EndTable();

View File

@ -77,7 +77,7 @@ void NewMenu::drawNewItemName(studio::StudioContext &sctx) noexcept {
drawWindow(sctx.tctx, &m_open, [this, &sctx] { drawWindow(sctx.tctx, &m_open, [this, &sctx] {
auto const typeIdx = static_cast<std::size_t>(m_selectedType); auto const typeIdx = static_cast<std::size_t>(m_selectedType);
if (typeIdx < m_types.size()) { if (typeIdx < m_types.size()) {
ImGui::InputText("Name", m_itemName.data(), m_itemName.cap()); ig::InputText("Name", m_itemName);
} }
drawLastPageButtons(sctx); drawLastPageButtons(sctx);
}); });