[jasper/world/studio] Get a good start to world editor going
Some checks failed
Build / build (push) Failing after 46s
Some checks failed
Build / build (push) Failing after 46s
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user