mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Rework
-Removed bullet -Removed Soloud Removed every instances of bullet usage. Edited some UI stuff
This commit is contained in:
@@ -33,6 +33,8 @@ public:
|
||||
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;
|
||||
}
|
||||
ImGui::EndDragDropTarget();
|
||||
}
|
||||
@@ -50,12 +52,26 @@ public:
|
||||
ImGui::Text("Module");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
// Todo: Automatically parse available modules. and offer a dropdown
|
||||
//ImGuiHelper::DrawVec3("Rotation", &component.Rotation);
|
||||
// Here we create a dropdown for every modules
|
||||
|
||||
auto wrenScript = component.mWrenScript;
|
||||
|
||||
if (wrenScript)
|
||||
{
|
||||
auto modules = wrenScript->GetModules();
|
||||
|
||||
std::vector<const char*> modulesC;
|
||||
|
||||
for (auto& m : modules)
|
||||
{
|
||||
modulesC.push_back(m.c_str());
|
||||
}
|
||||
static int currentModule = (int)component.mModule;
|
||||
ImGui::Combo("##WrenModule", ¤tModule, &modulesC[0], modules.size());
|
||||
component.mModule = currentModule;
|
||||
}
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
|
||||
|
||||
//ComponentTableReset(component.Class, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,24 +151,44 @@ namespace Nuake {
|
||||
if (Selection.Type == EditorSelectionType::Entity && Selection.Entity == e)
|
||||
base_flags |= ImGuiTreeNodeFlags_Selected;
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2{ 0.0f, 0.0f });
|
||||
{
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
bool& isVisible = e.GetComponent<VisibilityComponent>().Visible;
|
||||
char* visibilityIcon = isVisible ? ICON_FA_EYE : ICON_FA_EYE_SLASH;
|
||||
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, { 0, 0, 0, 0 });
|
||||
if (ImGui::Button(visibilityIcon, { 40, 40 }))
|
||||
{
|
||||
isVisible = !isVisible;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
// Write in normal font.
|
||||
ImGui::PushFont(normalFont);
|
||||
|
||||
// If has no childrens draw tree node leaf
|
||||
if (parent.Children.size() <= 0)
|
||||
{
|
||||
base_flags |= ImGuiTreeNodeFlags_Leaf;
|
||||
}
|
||||
|
||||
if(nameComponent.IsPrefab && e.HasComponent<PrefabComponent>())
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0,255,0,255));
|
||||
if (nameComponent.IsPrefab && e.HasComponent<PrefabComponent>())
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 255, 0, 255));
|
||||
}
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(8, 8));
|
||||
|
||||
bool open = ImGui::TreeNodeEx(name.c_str(), base_flags);
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
if(nameComponent.IsPrefab && e.HasComponent<PrefabComponent>())
|
||||
ImGui::PopStyleColor();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user