lfs, current build
This commit is contained in:
1 parent
2efed2a443
commit
a5904b917b
397 files changed
+215918
-2458
No files matched your search
+10
-33
@@ -22,7 +22,6 @@ namespace game::developer
|
||||
constexpr auto RECENT_FILES_MAX = 10;
|
||||
constexpr auto CENTER_RATIO = 0.5f;
|
||||
constexpr auto DEVELOPER_WINDOW_SIZE_RATIO = 0.75f;
|
||||
constexpr auto INFO_SCHEMA_TABLE_COLUMNS = 4;
|
||||
constexpr auto DEVELOPER_WINDOW_FLAGS = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings;
|
||||
constexpr auto EDITOR_CHILD_FLAGS = ImGuiWindowFlags_MenuBar;
|
||||
constexpr auto DIALOGUE_SCHEMA_FILENAME = "dialogue.xml";
|
||||
@@ -338,11 +337,6 @@ namespace game::developer
|
||||
selectedDocument = i;
|
||||
if (ImGui::BeginTabBar("##Document Tabs"))
|
||||
{
|
||||
if (ImGui::BeginTabItem("Info"))
|
||||
{
|
||||
document_info_update(documents[i]);
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Dialogue"))
|
||||
{
|
||||
document_dialogue_update(resources, documents[i]);
|
||||
@@ -359,33 +353,6 @@ namespace game::developer
|
||||
if (closeRequest >= 0) close(closeRequest);
|
||||
}
|
||||
|
||||
void Window::document_info_update(const Document& document)
|
||||
{
|
||||
if (!ImGui::BeginTable("##Schema Info", INFO_SCHEMA_TABLE_COLUMNS, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg))
|
||||
return;
|
||||
|
||||
ImGui::TableSetupColumn("Schema");
|
||||
ImGui::TableSetupColumn("File");
|
||||
ImGui::TableSetupColumn("Exists");
|
||||
ImGui::TableSetupColumn("Valid");
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
for (auto& schema : document.schemas)
|
||||
{
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(schema.label.c_str());
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(schema.filename.c_str());
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(schema.isExists ? "Yes" : "No");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(schema.isValid ? "Yes" : "No");
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
void Window::document_dialogue_update(Resources& resources, Document& document)
|
||||
{
|
||||
auto* dialogue = document.dialogue_schema_get();
|
||||
@@ -450,6 +417,16 @@ namespace game::developer
|
||||
void Window::update(Resources& resources, SDL_Window* window, state::Play* play)
|
||||
{
|
||||
dialog.window_set(window);
|
||||
auto* settingsRoot = resources.settings.root();
|
||||
|
||||
if (!settingsRoot || !settingsRoot->isDeveloperConsoleEnabled)
|
||||
{
|
||||
resources.isDeveloper = false;
|
||||
isDeveloperOpen = false;
|
||||
action = {};
|
||||
console.action = {};
|
||||
return;
|
||||
}
|
||||
|
||||
if (!resources.isDeveloper && shortcut_is_pressed(ImGuiKey_GraveAccent))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user