Some UI changes

This commit is contained in:
Antoine Pilote
2023-03-05 21:44:23 -05:00
parent 50a4b42284
commit 7982fe151f
3 changed files with 8 additions and 16 deletions

View File

@@ -38,8 +38,8 @@
ImGui::PopStyleVar(); \
if (ImGui::BeginTable(#name, 3, ImGuiTableFlags_BordersInner)) \
{ \
ImGui::TableSetupColumn("name", 0, 0.3f); \
ImGui::TableSetupColumn("set", 0, 0.6f); \
ImGui::TableSetupColumn("name", 0, 0.25f); \
ImGui::TableSetupColumn("set", 0, 0.65f); \
ImGui::TableSetupColumn("reset", 0, 0.1f); \
\
ImGui::TableNextColumn();

View File

@@ -9,7 +9,7 @@ ModelResourceInspector::ModelResourceInspector(Ref<Nuake::Model> model)
void ModelResourceInspector::Draw()
{
ImGui::BeginChild("modelInspector", ImVec2(0, 0), true);
ImGui::BeginChild("modelInspector", ImVec2(0, 100 * std::size(_model->GetMeshes())), true);
{
for (uint32_t i = 0; i < std::size(_model->GetMeshes()); i++)
{

View File

@@ -27,22 +27,16 @@ public:
if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("_Script"))
{
char* file = (char*)payload->Data;
std::string fullPath = std::string(file, 256);
path = Nuake::FileSystem::AbsoluteToRelative(fullPath);
Ref<Nuake::File> nuakeFile = Nuake::FileSystem::GetFile(path);
component.mWrenScript = CreateRef<Nuake::WrenScript>(nuakeFile, true);
auto modules = component.mWrenScript->GetModules();
if (modules.size() > 0)
component.mModule = 0;
std::string fullPath = std::string(file, 512);
path = Nuake::FileSystem::AbsoluteToRelative(std::move(fullPath));
component.LoadScript(path);
}
ImGui::EndDragDropTarget();
}
component.Script = path;
//
//ImGuiHelper::DrawVec3("Translation", &component.Translation);
ImGui::TableNextColumn();
ComponentTableReset(component.Script, "");
@@ -53,9 +47,7 @@ public:
ImGui::TableNextColumn();
// Here we create a dropdown for every modules
auto wrenScript = component.mWrenScript;
auto& wrenScript = component.mWrenScript;
if (wrenScript)
{
auto modules = wrenScript->GetModules();