mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Some UI changes
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user