[jasper/world/studio] Get a good start to world editor going
Some checks failed
Build / build (push) Failing after 46s

This commit is contained in:
2024-04-21 10:25:44 -05:00
parent 7ceee8c84d
commit 513e3360b5
31 changed files with 810 additions and 339 deletions

View File

@@ -18,7 +18,7 @@ namespace ncore = nostalgia::core;
class CollisionView {
private:
static const glutils::ProgramSource s_programSrc;
static constexpr int s_scale = 10;
static constexpr int s_scale = 5;
ncore::ContextUPtr m_nctx;
glutils::FrameBuffer m_frameBuffer;
glutils::GLProgram m_shader;

View File

@@ -109,18 +109,10 @@ void WorldObjectSetEditorImGui::drawObjSelector() noexcept {
if (ig::PushButton("-", btnSize)) {
undoStack()->push(ox::make_unique<RmObject>(m_doc, m_selectedObj));
}
if (ImGui::BeginListBox("Objects")) {
for (auto i = 0u; auto const&obj : m_doc.objects) {
ig::IDStackItem const idStackItem2(static_cast<int>(i));
if (ImGui::Selectable(obj.name.c_str(), m_selectedObj == i)) {
if (i != m_selectedObj) {
m_selectedObj = i;
loadObj();
}
}
++i;
}
ImGui::EndListBox();
if (ig::ListBox("Objects", [this](size_t i) -> ox::CStringView {
return m_doc.objects[i].name;
}, m_doc.objects.size(), m_selectedObj)) {
loadObj();
}
}