refactor: 修复Panel窗口关闭行为并优化ProjectManager路径处理
This commit is contained in:
@@ -102,7 +102,7 @@ std::wstring ProjectManager::GetCurrentFullPathW() const {
|
||||
if (m_path.empty()) return Utf8ToWstring(m_projectPath);
|
||||
|
||||
std::wstring fullPath = Utf8ToWstring(m_projectPath);
|
||||
for (size_t i = 1; i < m_path.size(); i++) {
|
||||
for (size_t i = 0; i < m_path.size(); i++) {
|
||||
fullPath += L"/" + Utf8ToWstring(m_path[i]->name);
|
||||
}
|
||||
return fullPath;
|
||||
|
||||
@@ -14,7 +14,7 @@ ConsolePanel::ConsolePanel() : Panel("Console") {
|
||||
}
|
||||
|
||||
void ConsolePanel::Render() {
|
||||
ImGui::Begin(m_name.c_str(), &m_isOpen, ImGuiWindowFlags_None);
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
if (ImGui::Button("Clear")) {
|
||||
LogSystem::Get().Clear();
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace UI {
|
||||
GameViewPanel::GameViewPanel() : Panel("Game") {}
|
||||
|
||||
void GameViewPanel::Render() {
|
||||
ImGui::Begin(m_name.c_str(), &m_isOpen, ImGuiWindowFlags_None);
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
RenderGameView();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ InspectorPanel::~InspectorPanel() {
|
||||
}
|
||||
|
||||
void InspectorPanel::Render() {
|
||||
ImGui::Begin(m_name.c_str(), &m_isOpen, ImGuiWindowFlags_None);
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
EntityID selectedId = SelectionManager::Get().GetSelectedEntity();
|
||||
Entity* entity = SceneManager::Get().GetEntity(selectedId);
|
||||
|
||||
@@ -14,7 +14,7 @@ void ProjectPanel::Initialize(const std::string& projectPath) {
|
||||
}
|
||||
|
||||
void ProjectPanel::Render() {
|
||||
ImGui::Begin(m_name.c_str(), &m_isOpen, ImGuiWindowFlags_None);
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
auto& manager = ProjectManager::Get();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace UI {
|
||||
SceneViewPanel::SceneViewPanel() : Panel("Scene") {}
|
||||
|
||||
void SceneViewPanel::Render() {
|
||||
ImGui::Begin(m_name.c_str(), &m_isOpen, ImGuiWindowFlags_None);
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
ImVec2 canvasSize = ImGui::GetContentRegionAvail();
|
||||
ImDrawList* drawList = ImGui::GetWindowDrawList();
|
||||
|
||||
Reference in New Issue
Block a user