From 4e1737c4c7797c1c30d3db0e9a6a76af80d52b46 Mon Sep 17 00:00:00 2001 From: "D. Quan" <60545346+sudoker0@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:18:26 +0700 Subject: [PATCH 1/8] Improvement to the settings screen --- .../childWindows/settingsPanel/base.hpp | 25 +++ .../childWindows/settingsPanel/general.hpp | 10 ++ .../childWindows/settingsPanel/hotkeys.hpp | 11 ++ .../editor/childWindows/settingsWindow.hpp | 7 + resources/translations/en_us.json | 26 +++- resources/translations/vn.json | 26 +++- src/editor/childWindows/popupWindow.cpp | 4 +- .../childWindows/settingsPanel/general.cpp | 98 ++++++++++++ .../childWindows/settingsPanel/hotkeys.cpp | 52 +++++++ src/editor/childWindows/settingsWindow.cpp | 145 ++---------------- src/editor/views/worldView.cpp | 3 +- 11 files changed, 261 insertions(+), 146 deletions(-) create mode 100644 include/editor/childWindows/settingsPanel/base.hpp create mode 100644 include/editor/childWindows/settingsPanel/general.hpp create mode 100644 include/editor/childWindows/settingsPanel/hotkeys.hpp create mode 100644 src/editor/childWindows/settingsPanel/general.cpp create mode 100644 src/editor/childWindows/settingsPanel/hotkeys.cpp diff --git a/include/editor/childWindows/settingsPanel/base.hpp b/include/editor/childWindows/settingsPanel/base.hpp new file mode 100644 index 0000000..83615fc --- /dev/null +++ b/include/editor/childWindows/settingsPanel/base.hpp @@ -0,0 +1,25 @@ +#ifndef RPGPP_SETTINGSPANEL_BASE_H +#define RPGPP_SETTINGSPANEL_BASE_H + +#include "TGUI/Widgets/Panel.hpp" +#include "TGUI/Widgets/TabContainer.hpp" +#include "bindTranslation.hpp" +#include "services/translationService.hpp" + +class SettingsPanelBase { + protected: + tgui::Panel::Ptr panel; + + public: + SettingsPanelBase(tgui::TabContainer::Ptr tabContainer, std::string name) { + panel = tabContainer->addTab(name); + bindCustomTranslation( + tabContainer, [this, name](tgui::TabContainer::Ptr tabContainer, + TranslationService &ts) { + int idx = tabContainer->getIndex(panel); + tabContainer->changeTabText(idx, ts.getKey(name)); + }); + } +}; + +#endif diff --git a/include/editor/childWindows/settingsPanel/general.hpp b/include/editor/childWindows/settingsPanel/general.hpp new file mode 100644 index 0000000..288162b --- /dev/null +++ b/include/editor/childWindows/settingsPanel/general.hpp @@ -0,0 +1,10 @@ +#include "base.hpp" + +#ifndef RPGPP_SETTINGSPANEL_GENERAL_H +#define RPGPP_SETTINGSPANEL_GENERAL_H +class SettingsPanelGeneral : public SettingsPanelBase { + public: + SettingsPanelGeneral(tgui::TabContainer::Ptr tabContainer); +}; + +#endif diff --git a/include/editor/childWindows/settingsPanel/hotkeys.hpp b/include/editor/childWindows/settingsPanel/hotkeys.hpp new file mode 100644 index 0000000..8d0c23e --- /dev/null +++ b/include/editor/childWindows/settingsPanel/hotkeys.hpp @@ -0,0 +1,11 @@ +#include "base.hpp" + +#ifndef RPGPP_SETTINGSPANEL_HOTKEYS_H +#define RPGPP_SETTINGSPANEL_HOTKEYS_H + +class SettingsPanelHotkeys : public SettingsPanelBase { + public: + SettingsPanelHotkeys(tgui::TabContainer::Ptr tabContainer); +}; + +#endif diff --git a/include/editor/childWindows/settingsWindow.hpp b/include/editor/childWindows/settingsWindow.hpp index 3d82ccf..53484f2 100644 --- a/include/editor/childWindows/settingsWindow.hpp +++ b/include/editor/childWindows/settingsWindow.hpp @@ -2,7 +2,14 @@ #define RPGPP_SETTINGSWINDOW_H #include "childWindows/popupWindow.hpp" +#include "settingsPanel/general.hpp" +#include "settingsPanel/hotkeys.hpp" + class SettingsWindow : public PopupWindow { + private: + std::shared_ptr general; + std::shared_ptr hotkeys; + public: SettingsWindow(const std::string &title); }; diff --git a/resources/translations/en_us.json b/resources/translations/en_us.json index cfd6ce5..c0e2bdc 100644 --- a/resources/translations/en_us.json +++ b/resources/translations/en_us.json @@ -30,10 +30,28 @@ "recent_projects": "Recent Projects" }, "options": { - "language": "Language", - "theme": "Theme", - "theme_notice": "It is recommended to restart the editor after switching theme!", - "hotkey": "Hotkey" + "general": { + "_label": "General", + "language": "Language", + "theme": "Theme", + "theme_notice": "It is recommended to restart the editor after switching theme!" + }, + "hotkeys": { + "_label": "Hotkeys", + "close_tab": "Close Tab", + "new_project": "New Project", + "open_project": "Open Project", + "undo": "Undo", + "redo": "Redo", + "save_file": "Save File", + "toggle_debug": "Toggle Debug", + "room_tool.edit": "Room Tool/Edit", + "room_tool.eraser": "Room Tool/Eraser", + "room_tool.mouse": "Room Tool/Mouse", + "room_tool.pen": "Room Tool/Pen", + "room_tool.set_spoint": "Room Tool/Set Start Point", + "room_tool.toggle_bm": "Room Tool/Toggle Brush Mode" + } }, "project": { "create_new_resource": "New Resource", diff --git a/resources/translations/vn.json b/resources/translations/vn.json index 2027019..1d7e079 100644 --- a/resources/translations/vn.json +++ b/resources/translations/vn.json @@ -33,10 +33,28 @@ }, "options": { - "language": "Ngôn ngữ", - "theme": "Chủ đề", - "theme_notice": "Để áp dụng chủ đề mới, vui lòng khởi động lại phần mềm!", - "hotkey": "Phím tắt" + "general": { + "_label": "Chung", + "language": "Ngôn ngữ", + "theme": "Chủ đề", + "theme_notice": "Để áp dụng chủ đề mới, vui lòng khởi động lại phần mềm!" + }, + "hotkeys": { + "_label": "Phím Tắt", + "close_tab": "Đóng Tab", + "new_project": "Tạo dự án", + "open_project": "Mở dự án", + "undo": "Hoàn tác", + "redo": "Làm lại", + "save_file": "Lưu tệp", + "toggle_debug": "Bật/tắt gỡ lỗi", + "room_tool.edit": "Công cụ Phòng/Chỉnh sửa", + "room_tool.eraser": "Công cụ Phòng/Tẩy", + "room_tool.mouse": "Công cụ Phòng/Chuột", + "room_tool.pen": "Công cụ Phòng/Bút", + "room_tool.set_spoint": "Công cụ Phòng/Đặt điểm bắt đầu", + "room_tool.toggle_bm": "Công cụ Phòng/Bật tắt chế độ cọ lông" + } }, "project": { "create_new_resource": "Tạo tài nguyên", diff --git a/src/editor/childWindows/popupWindow.cpp b/src/editor/childWindows/popupWindow.cpp index d39863e..11a768a 100644 --- a/src/editor/childWindows/popupWindow.cpp +++ b/src/editor/childWindows/popupWindow.cpp @@ -24,8 +24,8 @@ void PopupWindow::open() { Editor::instance->getGui().gui->add(this->currentWindow); // pop-up in the center of the screen. - this->currentWindow->setOrigin({0.5, 0.5}); - this->currentWindow->setPosition({"50%", "50%"}); + this->currentWindow->setPosition("(parent.innersize - size) / 2"); + ; this->currentWindow->showWithEffect(ANIMATION_TYPE, tgui::Duration(ANIMATION_DURATION)); this->windowIsOpen = true; diff --git a/src/editor/childWindows/settingsPanel/general.cpp b/src/editor/childWindows/settingsPanel/general.cpp new file mode 100644 index 0000000..96ca55f --- /dev/null +++ b/src/editor/childWindows/settingsPanel/general.cpp @@ -0,0 +1,98 @@ +#include "childWindows/settingsPanel/general.hpp" +#include "TGUI/Widgets/ComboBox.hpp" +#include "TGUI/Widgets/GrowVerticalLayout.hpp" +#include "TGUI/Widgets/HorizontalLayout.hpp" +#include "TGUI/Widgets/Label.hpp" +#include "TGUI/Widgets/ScrollablePanel.hpp" + +SettingsPanelGeneral::SettingsPanelGeneral(tgui::TabContainer::Ptr tabContainer) + : SettingsPanelBase(tabContainer, "screen.options.general._label") { + TranslationService &ts = Editor::instance->getTranslations(); + ThemeService &theme = Editor::instance->getThemeService(); + + const tgui::ScrollablePanel::Ptr scrollPanel = + tgui::ScrollablePanel::create(); + scrollPanel->setSize("100%", "100%"); + scrollPanel->getRenderer()->setPadding(4); + + const auto layout = tgui::GrowVerticalLayout::create(); + layout->setSize("80%", "100%"); + layout->setPosition({"50%", "0%"}); + layout->setOrigin({0.5, 0}); + layout->getRenderer()->setSpaceBetweenWidgets(10.0f); + + // Language + const auto languageLayout = tgui::HorizontalLayout::create(); + const auto languageSelector = tgui::ComboBox::create(); + for (auto [name, key] : ts.translations) { + if (auto languageKey = key.find("language"); languageKey != key.end()) + languageSelector->addItem(languageKey->second); + else + languageSelector->addItem(name); + } + + if (const auto langTranslation = ts.getKey("language"); + languageSelector->contains(langTranslation)) + languageSelector->setSelectedItem(langTranslation); + + languageSelector->onItemSelect.connect([&](const tgui::String &item) { + ConfigurationService &configService = + Editor::instance->getConfiguration(); + ts.setLanguage(ts.getLanguageIdentifierByKey(item.toStdString())); + configService.setStringValue("language", ts.getCurrentLanguage()); + configService.saveConfiguration(); + + // Can't think of a way to reload the menu bar without recreating it + Editor::instance->getGui().initMenuBar(); + if (auto ptr = Editor::instance->getGui().menuBar.lock()) { + Editor::instance->getGui().currentScreen->bindMenuBarAndHK(ptr); + } + }); + + languageLayout->setSize({"100%", 30}); + const auto languageLabel = tgui::Label::create(); + languageLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); + bindTranslation(languageLabel, "screen.options.general.language", + &tgui::Label::setText); + + languageLayout->add(languageLabel); + languageLayout->add(languageSelector); + + // Theme + const auto themeLayout = tgui::HorizontalLayout::create(); + const auto themeSelector = tgui::ComboBox::create(); + + themeLayout->setSize({"100%", 30}); + const auto themeLabel = tgui::Label::create(); + themeLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); + bindTranslation(themeLabel, "screen.options.general.theme", &tgui::Label::setText); + + for (const auto &theme : theme.getThemes()) + themeSelector->addItem(theme); + + themeSelector->setSelectedItem(theme.current_theme_name); + + themeSelector->onItemSelect.connect([&](const tgui::String &item) { + ConfigurationService &configService = + Editor::instance->getConfiguration(); + configService.setStringValue("theme", item.toStdString()); + configService.saveConfiguration(); + theme.setTheme(item.toStdString()); + Editor::instance->getGui().reloadUi(); + }); + + themeLayout->add(themeLabel); + themeLayout->add(themeSelector); + + auto warnLabel = tgui::Label::create(); + bindTranslation(warnLabel, "screen.options.general.theme_notice", + &tgui::Label::setText); + warnLabel->setSize({"100%", 36}); + + layout->add(languageLayout); + layout->add(themeLayout); + layout->add(warnLabel); + + scrollPanel->add(layout); + panel->add(scrollPanel); +} diff --git a/src/editor/childWindows/settingsPanel/hotkeys.cpp b/src/editor/childWindows/settingsPanel/hotkeys.cpp new file mode 100644 index 0000000..4f45384 --- /dev/null +++ b/src/editor/childWindows/settingsPanel/hotkeys.cpp @@ -0,0 +1,52 @@ +#include "childWindows/settingsPanel/hotkeys.hpp" +#include "TGUI/Widgets/GrowVerticalLayout.hpp" +#include "TGUI/Widgets/HorizontalLayout.hpp" +#include "TGUI/Widgets/Label.hpp" +#include "TGUI/Widgets/ScrollablePanel.hpp" +#include "childWindows/settingsPanel/base.hpp" +#include "widgets/hotkeyModifier.hpp" + +SettingsPanelHotkeys::SettingsPanelHotkeys(tgui::TabContainer::Ptr tabContainer) + : SettingsPanelBase(tabContainer, "screen.options.hotkeys._label") { + HotkeyService &hks = Editor::instance->getHotkeyService(); + TranslationService &ts = Editor::instance->getTranslations(); + + const tgui::ScrollablePanel::Ptr scrollPanel = + tgui::ScrollablePanel::create(); + scrollPanel->setSize("100%", "100%"); + scrollPanel->getRenderer()->setPadding(4); + + const auto layout = tgui::GrowVerticalLayout::create(); + layout->setSize("80%", "100%"); + layout->setPosition({"50%", "0%"}); + layout->setOrigin({0.5, 0}); + layout->getRenderer()->setSpaceBetweenWidgets(10.0f); + + for (auto &[k, v] : hks.listHotkeys()) { + const auto container = tgui::HorizontalLayout::create(); + const auto hotkeyLabel = tgui::Label::create(); + hotkeyLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); + hotkeyLabel->setText(k); + bindTranslation(hotkeyLabel, "screen.options.hotkeys." + k, &tgui::Label::setText); + + const auto hotkeyModifier = HotkeyModifier::create(); + + hotkeyModifier->setKey(k, v.key, v.shift, v.ctrl, v.alt, v.super, true); + hotkeyModifier->onChange([&](const std::string &id, Hotkey hk) { + ConfigurationService &cfgs = Editor::instance->getConfiguration(); + hks.removeHotkey(id); + hks.addHotkey(id, hk); + cfgs.setStringValue("hotkeys", id, + to_string(HotkeyService::pack(hk))); + cfgs.saveConfiguration(); + }); + + container->setSize({"100%", 32}); + container->add(hotkeyLabel); + container->add(hotkeyModifier); + layout->add(container); + } + + scrollPanel->add(layout); + panel->add(scrollPanel); +} diff --git a/src/editor/childWindows/settingsWindow.cpp b/src/editor/childWindows/settingsWindow.cpp index 1be08ee..65fdbd4 100644 --- a/src/editor/childWindows/settingsWindow.cpp +++ b/src/editor/childWindows/settingsWindow.cpp @@ -1,144 +1,21 @@ #include "childWindows/settingsWindow.hpp" -#include "TGUI/Widgets/ComboBox.hpp" -#include "TGUI/Widgets/GrowVerticalLayout.hpp" -#include "TGUI/Widgets/HorizontalLayout.hpp" -#include "TGUI/Widgets/Label.hpp" -#include "TGUI/Widgets/ScrollablePanel.hpp" -#include "bindTranslation.hpp" +#include "TGUI/Widgets/TabContainer.hpp" #include "childWindows/popupWindow.hpp" -#include "editor.hpp" -#include "widgets/hotkeyModifier.hpp" +#include "childWindows/settingsPanel/general.hpp" +#include "childWindows/settingsPanel/hotkeys.hpp" SettingsWindow::SettingsWindow(const std::string &title) : PopupWindow(title) { - TranslationService &ts = Editor::instance->getTranslations(); - ThemeService &theme = Editor::instance->getThemeService(); - HotkeyService &hks = Editor::instance->getHotkeyService(); - + this->currentWindow->setSize("540", "360"); + this->currentWindow->setResizable(true); bindTranslation(this->currentWindow, "menu.options._label", &tgui::ChildWindow::setTitle); - const tgui::ScrollablePanel::Ptr scrollPanel = - tgui::ScrollablePanel::create(); - scrollPanel->setSize("100%", "100%"); - scrollPanel->getRenderer()->setPadding(4); - const auto layout = tgui::GrowVerticalLayout::create(); - - layout->setSize("80%", "100%"); - layout->setPosition({"50%", "0%"}); - layout->setOrigin({0.5, 0}); - layout->getRenderer()->setSpaceBetweenWidgets(10.0f); - - const auto topOptionsHeader = tgui::Label::create(); - topOptionsHeader->setHorizontalAlignment(tgui::HorizontalAlignment::Center); - topOptionsHeader->setTextSize(20); - bindTranslation(topOptionsHeader, "menu.options.editor", - &tgui::Label::setText); - layout->add(topOptionsHeader); - - // Language - const auto languageLayout = tgui::HorizontalLayout::create(); - const auto languageSelector = tgui::ComboBox::create(); - for (auto [name, key] : ts.translations) { - if (auto languageKey = key.find("language"); languageKey != key.end()) - languageSelector->addItem(languageKey->second); - else - languageSelector->addItem(name); - } - - if (const auto langTranslation = ts.getKey("language"); - languageSelector->contains(langTranslation)) - languageSelector->setSelectedItem(langTranslation); - - languageSelector->onItemSelect.connect([&](const tgui::String &item) { - ConfigurationService &configService = - Editor::instance->getConfiguration(); - ts.setLanguage(ts.getLanguageIdentifierByKey(item.toStdString())); - configService.setStringValue("language", ts.getCurrentLanguage()); - configService.saveConfiguration(); - - // Can't think of a way to reload the menu bar without recreating it - Editor::instance->getGui().initMenuBar(); - if (auto ptr = Editor::instance->getGui().menuBar.lock()) { - Editor::instance->getGui().currentScreen->bindMenuBarAndHK(ptr); - } - }); - - languageLayout->setSize({"100%", 30}); - const auto languageLabel = tgui::Label::create(); - languageLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); - bindTranslation(languageLabel, "screen.options.language", - &tgui::Label::setText); - - languageLayout->add(languageLabel); - languageLayout->add(languageSelector); - - // Theme - const auto themeLayout = tgui::HorizontalLayout::create(); - const auto themeSelector = tgui::ComboBox::create(); - - themeLayout->setSize({"100%", 30}); - const auto themeLabel = tgui::Label::create(); - themeLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); - bindTranslation(themeLabel, "screen.options.theme", &tgui::Label::setText); - - for (const auto &theme : theme.getThemes()) - themeSelector->addItem(theme); - - themeSelector->setSelectedItem(theme.current_theme_name); - - themeSelector->onItemSelect.connect([&](const tgui::String &item) { - ConfigurationService &configService = - Editor::instance->getConfiguration(); - configService.setStringValue("theme", item.toStdString()); - configService.saveConfiguration(); - theme.setTheme(item.toStdString()); - Editor::instance->getGui().reloadUi(); - }); - - themeLayout->add(themeLabel); - themeLayout->add(themeSelector); - - auto warnLabel = tgui::Label::create(); - bindTranslation(warnLabel, "screen.options.theme_notice", - &tgui::Label::setText); - warnLabel->setSize({"100%", 36}); - - layout->add(languageLayout); - layout->add(themeLayout); - layout->add(warnLabel); - - // Hotkeys - const auto hotkeyLabel = tgui::Label::create(); - bindTranslation(hotkeyLabel, "screen.options.hotkey", - &tgui::Label::setText); - - layout->add(hotkeyLabel); - - for (auto &[k, v] : hks.listHotkeys()) { - const auto container = tgui::HorizontalLayout::create(); - const auto hotkeyLabel = tgui::Label::create(); - hotkeyLabel->setVerticalAlignment(tgui::VerticalAlignment::Center); - hotkeyLabel->setText(k); - - const auto hotkeyModifier = HotkeyModifier::create(); - - hotkeyModifier->setKey(k, v.key, v.shift, v.ctrl, v.alt, v.super, true); - hotkeyModifier->onChange([&](const std::string &id, Hotkey hk) { - ConfigurationService &cfgs = Editor::instance->getConfiguration(); - hks.removeHotkey(id); - hks.addHotkey(id, hk); - cfgs.setStringValue("hotkeys", id, - to_string(HotkeyService::pack(hk))); - cfgs.saveConfiguration(); - }); - - container->setSize({"100%", 32}); - container->add(hotkeyLabel); - container->add(hotkeyModifier); - layout->add(container); - } + tgui::TabContainer::Ptr tabContainer = tgui::TabContainer::create(); + tabContainer->setPosition(0, 0); + tabContainer->setSize({"100%", "100%"}); - scrollPanel->add(layout); - this->currentWindow->add(scrollPanel); + general = std::make_shared(tabContainer); + hotkeys = std::make_shared(tabContainer); + this->currentWindow->add(tabContainer); } diff --git a/src/editor/views/worldView.cpp b/src/editor/views/worldView.cpp index b79ede4..eefdb5e 100644 --- a/src/editor/views/worldView.cpp +++ b/src/editor/views/worldView.cpp @@ -32,8 +32,7 @@ WorldView::WorldView(const char *typeName, bool initRenderer) tool = RoomTool::TOOL_NONE; } -WorldView::~WorldView() { -} +WorldView::~WorldView() {} WorldView::Ptr WorldView::create() { return std::make_shared(); } From b2dd265f6f9af1f9d158b269ca043185b3aa7135 Mon Sep 17 00:00:00 2001 From: "D. Quan" <60545346+sudoker0@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:58:57 +0700 Subject: [PATCH 2/8] Remove ci-cd branch from triggering --- .github/workflows/build.yml | 192 ++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 97 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e3d49e..2f7ddfe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,114 +1,112 @@ name: "Build RPG++" on: - push: - branches: ["main", "ci-cd"] - pull_request: - branches: ["main", "ci-cd"] - schedule: - - cron: "19 2 * * 1" - workflow_dispatch: + push: + branches: ["main"] + pull_request: + branches: ["main"] + workflow_dispatch: env: - BUILD_DIR: build - RETENTION_DAYS: 7 - BUILD_TYPE: debug + BUILD_DIR: build + RETENTION_DAYS: 7 + BUILD_TYPE: debug jobs: - build-linux: - name: "build: linux" - runs-on: 'ubuntu-latest' - env: - PLATFORM: linux - ARCH: x86_64 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: recursive + build-linux: + name: "build: linux" + runs-on: "ubuntu-latest" + env: + PLATFORM: linux + ARCH: x86_64 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: recursive - - name: Install packages - shell: bash - run: | - sudo add-apt-repository ppa:xmake-io/xmake - sudo apt-get update - sudo apt-get install -y \ - libx11-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libgl1-mesa-dev \ - mesa-common-dev \ - xmake + - name: Install packages + shell: bash + run: | + sudo add-apt-repository ppa:xmake-io/xmake + sudo apt-get update + sudo apt-get install -y \ + libx11-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libgl1-mesa-dev \ + mesa-common-dev \ + xmake - - name: Build - shell: bash - run: | - xmake build --all -y + - name: Build + shell: bash + run: | + xmake build --all -y - - name: Upload artifact - uses: actions/upload-artifact@v6 - with: - name: linux-build - path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ # adjust to your xmake output path - if-no-files-found: error - retention-days: ${{ env.RETENTION_DAYS }} - build-windows: - name: "build: windows" - runs-on: windows-latest - env: - PLATFORM: windows - ARCH: x64 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: recursive + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: linux-build + path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ # adjust to your xmake output path + if-no-files-found: error + retention-days: ${{ env.RETENTION_DAYS }} + build-windows: + name: "build: windows" + runs-on: windows-latest + env: + PLATFORM: windows + ARCH: x64 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: recursive - - name: Install xmake - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: latest + - name: Install xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: latest - - name: Build - shell: pwsh - run: xmake build --all -y + - name: Build + shell: pwsh + run: xmake build --all -y - - name: Upload artifact - uses: actions/upload-artifact@v6 - with: - name: windows-build - path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ - if-no-files-found: error - retention-days: ${{ env.RETENTION_DAYS }} + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: windows-build + path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ + if-no-files-found: error + retention-days: ${{ env.RETENTION_DAYS }} - build-macos: - name: "build: macos" - runs-on: macos-latest - env: - PLATFORM: macosx - ARCH: arm64 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: recursive + build-macos: + name: "build: macos" + runs-on: macos-latest + env: + PLATFORM: macosx + ARCH: arm64 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: recursive - - name: Install xmake - uses: xmake-io/github-action-setup-xmake@v1 + - name: Install xmake + uses: xmake-io/github-action-setup-xmake@v1 - - name: Build - shell: bash - run: xmake build --all -y + - name: Build + shell: bash + run: xmake build --all -y - - name: Upload artifact - uses: actions/upload-artifact@v6 - with: - name: macos-build - path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ - if-no-files-found: error - retention-days: ${{ env.RETENTION_DAYS }} + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: macos-build + path: ${{ env.BUILD_DIR }}/${{ env.PLATFORM }}/${{ env.ARCH }}/${{ env.BUILD_TYPE }}/ + if-no-files-found: error + retention-days: ${{ env.RETENTION_DAYS }} From 8f99315e60906e8038257553c4d4625e5287b361 Mon Sep 17 00:00:00 2001 From: CDevv Date: Thu, 26 Mar 2026 19:07:39 +0200 Subject: [PATCH 3/8] Bulgarian translation update + Fix absolute paths in new resources Signed-off-by: CDevv --- resources/translations/bg.json | 26 ++++++++++++++++++++++---- src/editor/fileInitVisitor.cpp | 6 +++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/resources/translations/bg.json b/resources/translations/bg.json index bc35d6c..579d042 100644 --- a/resources/translations/bg.json +++ b/resources/translations/bg.json @@ -30,10 +30,28 @@ "recent_projects": "Скорошни проекти" }, "options": { - "language": "Език", - "theme": "Тема", - "theme_notice": "Препоръчително е да рестартирате редактора след смяна на темата!", - "hotkey": "Бърз клавиш" + "general": { + "_label": "Общи", + "language": "Език", + "theme": "Тема", + "theme_notice": "Препоръчително е да рестартирате редактора след смяна на темата!" + }, + "hotkeys": { + "_label": "Бързи клавиши", + "close_tab": "Затвори раздел", + "new_project": "Нов проект", + "open_project": "Отвори проект", + "undo": "Отмени", + "redo": "Повтори", + "save_file": "Запази файл", + "toggle_debug": "Превключи на режим на дебъгване", + "room_tool.edit": "Стая/Редактирай", + "room_tool.eraser": "Стая/Гума", + "room_tool.mouse": "Стая/Показалец", + "room_tool.pen": "Стая/Писалка", + "room_tool.set_spoint": "Стая/Стартова плочка", + "room_tool.toggle_bm": "Стая/Превключи на четка" + } }, "project": { "create_new_resource": "Нов ресурс", diff --git a/src/editor/fileInitVisitor.cpp b/src/editor/fileInitVisitor.cpp index 9e80d83..8b13dcc 100644 --- a/src/editor/fileInitVisitor.cpp +++ b/src/editor/fileInitVisitor.cpp @@ -50,6 +50,7 @@ void FileInitVisitor::tileset(NewFileDialog::Ptr dialog) { dialog->confirmButton->onPress([dialog] { std::string title = dialog->titleField->getText().toStdString(); std::string filePath = dialog->fileField->getChosenPath().toStdString(); + filePath = TextFormat("images/%s", GetFileName(filePath.c_str())); if (!title.empty() && !filePath.empty()) { dialog->window->close(); @@ -74,6 +75,7 @@ void FileInitVisitor::room(NewFileDialog::Ptr dialog) { dialog->confirmButton->onPress([dialog] { std::string title = dialog->titleField->getText().toStdString(); std::string filePath = dialog->fileField->getChosenPath().toStdString(); + filePath = TextFormat("tilesets/%s", GetFileName(filePath.c_str())); if (!title.empty() && !filePath.empty()) { std::unique_ptr tileSet = std::make_unique(filePath); @@ -84,7 +86,7 @@ void FileInitVisitor::room(NewFileDialog::Ptr dialog) { std::make_unique(std::move(tileMap)); std::string newFilePath = - TextFormat("maps/%s.tiles", title.c_str()); + TextFormat("maps/%s.rtiles", title.c_str()); nlohmann::json fileJson = room->dumpJson(); SaveFileText(newFilePath.c_str(), fileJson.dump().c_str()); @@ -105,6 +107,7 @@ void FileInitVisitor::actor(NewFileDialog::Ptr dialog) { dialog->confirmButton->onPress([dialog] { std::string title = dialog->titleField->getText().toStdString(); std::string filePath = dialog->fileField->getChosenPath().toStdString(); + filePath = TextFormat("tilesets/%s", GetFileName(filePath.c_str())); if (!title.empty() && !filePath.empty()) { std::unique_ptr tileSet = std::make_unique(filePath); @@ -135,6 +138,7 @@ void FileInitVisitor::prop(NewFileDialog::Ptr dialog) { dialog->confirmButton->onPress([dialog] { std::string title = dialog->titleField->getText().toStdString(); std::string filePath = dialog->fileField->getChosenPath().toStdString(); + filePath = TextFormat("images/%s", GetFileName(filePath.c_str())); if (!title.empty() && !filePath.empty()) { std::unique_ptr prop = std::make_unique(Rectangle{0, 0, 16, 16}, Vector2{0, 0}); From 35b3c094cd5914706738d54de2a5fb783825bff5 Mon Sep 17 00:00:00 2001 From: "D. Quan" <60545346+sudoker0@users.noreply.github.com> Date: Fri, 27 Mar 2026 00:55:15 +0700 Subject: [PATCH 4/8] Lazyload languages --- .../editor/services/translationService.hpp | 13 ++- .../childWindows/settingsPanel/general.cpp | 11 +- src/editor/services/translationService.cpp | 101 ++++++++++-------- tools/translation_checker/checker.lua | 4 +- 4 files changed, 71 insertions(+), 58 deletions(-) diff --git a/include/editor/services/translationService.hpp b/include/editor/services/translationService.hpp index 4892c8d..f7a5030 100644 --- a/include/editor/services/translationService.hpp +++ b/include/editor/services/translationService.hpp @@ -2,6 +2,7 @@ #define _RPGPP_TRANSLATION_SERVICE_H #include +#include #include #include #include @@ -43,23 +44,25 @@ class TranslationService { using Callback = std::function; TranslationService(Editor *editor_ptr); - std::map>, - std::less<>> - translations = {}; TranslatedString getKey(const std::string &key); - TranslatedString getKey(const std::string &key, - const std::string &c_language); void setLanguage(const std::string &language); std::string getCurrentLanguage() const { return current_language; } std::string getLanguageIdentifierByKey(const std::string &language_key); ListenerID addListener(Callback cb); void removeListener(ListenerID id); void purgeDeadListeners(); + std::map langKeyToName = {}; private: + std::map>, + std::less<>> + translations = {}; + std::map translationFiles = {}; std::string current_language = DEFAULT_LANGUAGE; std::unordered_map listeners; ListenerID lastID = 1; void notify(); + void loadTranslation(const std::string &langKey); + void unloadTranslation(const std::string &langKey); }; #endif diff --git a/src/editor/childWindows/settingsPanel/general.cpp b/src/editor/childWindows/settingsPanel/general.cpp index 96ca55f..179cb82 100644 --- a/src/editor/childWindows/settingsPanel/general.cpp +++ b/src/editor/childWindows/settingsPanel/general.cpp @@ -24,22 +24,19 @@ SettingsPanelGeneral::SettingsPanelGeneral(tgui::TabContainer::Ptr tabContainer) // Language const auto languageLayout = tgui::HorizontalLayout::create(); const auto languageSelector = tgui::ComboBox::create(); - for (auto [name, key] : ts.translations) { - if (auto languageKey = key.find("language"); languageKey != key.end()) - languageSelector->addItem(languageKey->second); - else - languageSelector->addItem(name); + for (auto [name, key] : ts.langKeyToName) { + languageSelector->addItem(key, name); } if (const auto langTranslation = ts.getKey("language"); languageSelector->contains(langTranslation)) languageSelector->setSelectedItem(langTranslation); - languageSelector->onItemSelect.connect([&](const tgui::String &item) { + languageSelector->onItemSelect.connect([&](const tgui::String &item, const tgui::String &id) { ConfigurationService &configService = Editor::instance->getConfiguration(); ts.setLanguage(ts.getLanguageIdentifierByKey(item.toStdString())); - configService.setStringValue("language", ts.getCurrentLanguage()); + configService.setStringValue("language", id.toStdString()); configService.saveConfiguration(); // Can't think of a way to reload the menu bar without recreating it diff --git a/src/editor/services/translationService.cpp b/src/editor/services/translationService.cpp index 815553b..d9c34d1 100644 --- a/src/editor/services/translationService.cpp +++ b/src/editor/services/translationService.cpp @@ -28,48 +28,59 @@ static void flattenJson(const json &j, } } +void TranslationService::loadTranslation(const std::string &langKey) { + if (translations.find(langKey) != translations.end()) + return; + const auto directory_entry = translationFiles.at(langKey); + ifstream file(directory_entry.path()); + json parsed = json::parse(file); + + std::map> translated; + flattenJson(parsed, translated); + this->translations.try_emplace(langKey, + std::move(translated)); +} + +void TranslationService::unloadTranslation(const std::string &langKey) { + if (langKey == DEFAULT_LANGUAGE) + return; + this->translations.erase(langKey); +} + TranslationService::TranslationService(Editor *editor_ptr) { + auto languageInOptions = editor_ptr->getConfiguration().getStringValue("language"); for (auto const &directory_entry : filesystem::directory_iterator( editor_ptr->getFs().getResourcePath(TRANSLATION_FILE_LOCATION))) { // add the translation to the translations map. if (directory_entry.path().extension() != ".json") continue; + const std::string langKey = directory_entry.path().stem().string(); + auto [it, inserted] = translationFiles.try_emplace(langKey, directory_entry); - ifstream file(directory_entry.path()); - json parsed = json::parse(file); - - std::map> translated; - flattenJson(parsed, translated); - this->translations.try_emplace(directory_entry.path().stem().string(), - std::move(translated)); - } - this->current_language = - editor_ptr->getConfiguration().getStringValue("language"); -} + const auto &entry = it->second; + ifstream file(entry.path()); + json parsedEntry = json::parse(file); + langKeyToName.try_emplace(langKey, parsedEntry.at("language").get()); -TranslatedString getKeyWrapper(TranslationService *tr, - const std::string &c_language, - const std::string &key) { - if (tr->translations.find(tr->getCurrentLanguage()) != - tr->translations.end()) { - map> gotten_translations = - tr->translations[c_language]; - if (gotten_translations.find(key) != gotten_translations.end()) { - TranslatedString s = TranslatedString{gotten_translations[key]}; - return s; + if (langKey == DEFAULT_LANGUAGE || langKey == languageInOptions) { + loadTranslation(langKey); } - TranslatedString s = - TranslatedString{tr->translations[DEFAULT_LANGUAGE][key]}; - printf("TRANSLATION WARNING: %s key doesn't exist for language %s\n", - key.c_str(), c_language.c_str()); - return s; - } else { - throw std::out_of_range("translation doesn't exist in translations."); } + if (translationFiles.find(languageInOptions) != translationFiles.end()) { + current_language = languageInOptions; + } else { + fprintf(stderr, "WARNING: language '%s' not found, falling back to default.\n", + languageInOptions.c_str()); + current_language = DEFAULT_LANGUAGE; + } } void TranslationService::setLanguage(const std::string &language) { + if (language != current_language) { + unloadTranslation(current_language); + } current_language = language; + loadTranslation(language); for (auto &[id, cb] : listeners) { cb(*this, id, false); @@ -105,27 +116,29 @@ void TranslationService::purgeDeadListeners() { // using the provided translation can update itself when translation changes. // Otherwise, please use `bindTranslation()` in `bindTranslation.hpp` TranslatedString TranslationService::getKey(const std::string &key) { - return getKeyWrapper(this, current_language, key); -} - -// @notice Use of getKey is not recommended unless you guarantee that the widget -// using the provided translation can update itself when translation changes. -// Otherwise, please use `bindTranslation()` in `bindTranslation.hpp` -TranslatedString TranslationService::getKey(const std::string &key, - const std::string &c_language) { - return getKeyWrapper(this, c_language, key); + if (translations.find(getCurrentLanguage()) != translations.end()) { + const auto& gotten_translations = translations[current_language]; + if (gotten_translations.find(key) != gotten_translations.end()) { + TranslatedString s = TranslatedString{gotten_translations.at(key)}; + return s; + } + TranslatedString s = + TranslatedString{translations[DEFAULT_LANGUAGE][key]}; + printf("TRANSLATION WARNING: %s key doesn't exist for language %s\n", + key.c_str(), current_language.c_str()); + return s; + } else { + throw std::out_of_range("translation doesn't exist in translations."); + } } // NOTE: the whole point of this function, is to retrieve the raw key of a // language file like "en_us", from the "language" key in the JSON. -std::string TranslationService::getLanguageIdentifierByKey( - const std::string &language_key) { +std::string TranslationService::getLanguageIdentifierByKey(const std::string &language_key) { return std::find_if( - this->translations.begin(), this->translations.end(), - [&](std::pair>> - entry) { - return entry.second["language"] == language_key; + langKeyToName.begin(), langKeyToName.end(), + [&](std::pair entry) { + return entry.second == language_key; }) ->first; } diff --git a/tools/translation_checker/checker.lua b/tools/translation_checker/checker.lua index c4428ad..e40ff71 100644 --- a/tools/translation_checker/checker.lua +++ b/tools/translation_checker/checker.lua @@ -68,7 +68,7 @@ local function _CompareTranslation(base, target, filename) table.sort(untranslated) if #missing ~= 0 then - print("\n" .. "Missing keys:") + print("\n" .. "Missing keys (should be added):") for _, k in ipairs(missing) do print(" - " .. k) end @@ -82,7 +82,7 @@ local function _CompareTranslation(base, target, filename) end if #extra ~= 0 then - print("\n" .. "Extra keys:") + print("\n" .. "Extra keys (should be removed):") for _, k in ipairs(extra) do print(" - " .. k) end From a120178da31b65c13147a30f9e03fc9d1f395ca1 Mon Sep 17 00:00:00 2001 From: thefirey33 Date: Fri, 27 Mar 2026 15:31:06 +0300 Subject: [PATCH 5/8] turkish translation update --- resources/translations/tr.json | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/resources/translations/tr.json b/resources/translations/tr.json index 37e7070..7df71a1 100644 --- a/resources/translations/tr.json +++ b/resources/translations/tr.json @@ -30,10 +30,28 @@ "recent_projects": "Son Projeler" }, "options": { - "language": "Dil", - "theme": "Tema", - "theme_notice": "Tema değiştirdikten sonra düzenleyici yeniden başlatmanız önerilir!", - "hotkey": "Kısayol Tuşu" + "general": { + "_label": "Genel", + "language": "Dil", + "theme": "Tema", + "theme_notice": "Tema değiştirdikten sonra düzenleyici yeniden başlatmanız önerilir!" + }, + "hotkeys": { + "_label": "Kısayollar", + "close_tab": "Sekmeyi Kapat", + "new_project": "Yeni Proje", + "open_project": "Proje Aç", + "undo": "Geri Al", + "redo": "Yinele", + "save_file": "Dosyayı Kaydet", + "toggle_debug": "Hata Ayıklamayı Aç/Kapat", + "room_tool.edit": "Harita Araçları/Düzenle", + "room_tool.eraser": "Harita Araçları/Sil", + "room_tool.mouse": "Harita Araçları/Fare", + "room_tool.pen": "Harita Araçları/Kalem", + "room_tool.set_spoint": "Harita Araçları/Başlangıç Noktasını Seç", + "room_tool.toggle_bm": "Harita Araçları/Fırça Modunu Aç/Kapat" + } }, "project": { "create_new_resource": "Yeni Kaynak", From 0108ef8abcbf098263d00e86e02815a3a405c76f Mon Sep 17 00:00:00 2001 From: thefirey33 Date: Fri, 27 Mar 2026 15:35:41 +0300 Subject: [PATCH 6/8] fix TGUI already added to parent warning --- src/editor/childWindows/popupWindow.cpp | 9 ++++++++- src/editor/services/childWindowSubService.cpp | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/editor/childWindows/popupWindow.cpp b/src/editor/childWindows/popupWindow.cpp index 11a768a..26a23f4 100644 --- a/src/editor/childWindows/popupWindow.cpp +++ b/src/editor/childWindows/popupWindow.cpp @@ -1,8 +1,11 @@ #include "childWindows/popupWindow.hpp" #include "TGUI/Animation.hpp" +#include "TGUI/Backend/raylib.hpp" #include "TGUI/Duration.hpp" #include "TGUI/Widgets/ChildWindow.hpp" #include "editor.hpp" +#include "services/editorGuiService.hpp" +#include constexpr const int ANIMATION_DURATION = 200; constexpr const float TITLEBAR_HEIGHT = 30.0f; @@ -22,7 +25,11 @@ void PopupWindow::open() { if (this->windowIsOpen) return; - Editor::instance->getGui().gui->add(this->currentWindow); + std::unique_ptr &gui = Editor::instance->getGui().gui; + + if (gui->getWidgetIndex(this->currentWindow) == -1) + gui->add(this->currentWindow); + // pop-up in the center of the screen. this->currentWindow->setPosition("(parent.innersize - size) / 2"); ; diff --git a/src/editor/services/childWindowSubService.cpp b/src/editor/services/childWindowSubService.cpp index d4af3c4..8678060 100644 --- a/src/editor/services/childWindowSubService.cpp +++ b/src/editor/services/childWindowSubService.cpp @@ -1,10 +1,7 @@ #include "services/childWindowSubService.hpp" -#include "TGUI/Widgets/ChildWindow.hpp" #include "childWindows/aboutWindow.hpp" #include "childWindows/popupWindow.hpp" #include "childWindows/settingsWindow.hpp" -#include "editor.hpp" -#include "services/translationService.hpp" #include ChildWindowSubService::ChildWindowSubService() { this->createWindows(); } From 794c708cf5c627d6e153f2154685f38be79561fc Mon Sep 17 00:00:00 2001 From: thefirey33 Date: Fri, 27 Mar 2026 16:03:16 +0300 Subject: [PATCH 7/8] simply constructor --- include/editor/childWindows/aboutWindow.hpp | 4 +--- include/editor/childWindows/settingsWindow.hpp | 2 +- src/editor/childWindows/aboutWindow.cpp | 2 +- src/editor/childWindows/settingsWindow.cpp | 2 +- src/editor/services/childWindowSubService.cpp | 4 ++-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/editor/childWindows/aboutWindow.hpp b/include/editor/childWindows/aboutWindow.hpp index 99c58d7..45f933e 100644 --- a/include/editor/childWindows/aboutWindow.hpp +++ b/include/editor/childWindows/aboutWindow.hpp @@ -1,12 +1,10 @@ #ifndef RPGPP_ABOUTWINDOW_H #define RPGPP_ABOUTWINDOW_H -#include "TGUI/Widgets/Label.hpp" #include "childWindows/popupWindow.hpp" -#include class AboutWindow : public PopupWindow { public: - AboutWindow(const std::string &title); + AboutWindow(); }; #endif /* RPGPP_ABOUTWINDOW_H */ diff --git a/include/editor/childWindows/settingsWindow.hpp b/include/editor/childWindows/settingsWindow.hpp index 53484f2..563ae41 100644 --- a/include/editor/childWindows/settingsWindow.hpp +++ b/include/editor/childWindows/settingsWindow.hpp @@ -11,7 +11,7 @@ class SettingsWindow : public PopupWindow { std::shared_ptr hotkeys; public: - SettingsWindow(const std::string &title); + SettingsWindow(); }; #endif /* RPGPP_SETTINGSWINDOW_H */ diff --git a/src/editor/childWindows/aboutWindow.cpp b/src/editor/childWindows/aboutWindow.cpp index 5363738..5db90cf 100644 --- a/src/editor/childWindows/aboutWindow.cpp +++ b/src/editor/childWindows/aboutWindow.cpp @@ -9,7 +9,7 @@ #include "editor.hpp" #include -AboutWindow::AboutWindow(const std::string &title) : PopupWindow(title) { +AboutWindow::AboutWindow() : PopupWindow("AboutWindow") { auto layout = tgui::GrowVerticalLayout::create(); layout->getRenderer()->setSpaceBetweenWidgets(4.0f); diff --git a/src/editor/childWindows/settingsWindow.cpp b/src/editor/childWindows/settingsWindow.cpp index 65fdbd4..a249e3c 100644 --- a/src/editor/childWindows/settingsWindow.cpp +++ b/src/editor/childWindows/settingsWindow.cpp @@ -4,7 +4,7 @@ #include "childWindows/settingsPanel/general.hpp" #include "childWindows/settingsPanel/hotkeys.hpp" -SettingsWindow::SettingsWindow(const std::string &title) : PopupWindow(title) { +SettingsWindow::SettingsWindow() : PopupWindow("SettingsWindow") { this->currentWindow->setSize("540", "360"); this->currentWindow->setResizable(true); bindTranslation(this->currentWindow, diff --git a/src/editor/services/childWindowSubService.cpp b/src/editor/services/childWindowSubService.cpp index 8678060..62781fb 100644 --- a/src/editor/services/childWindowSubService.cpp +++ b/src/editor/services/childWindowSubService.cpp @@ -11,10 +11,10 @@ void ChildWindowSubService::createWindows() { this->childWindows.clear(); this->childWindows.try_emplace( - "about", std::unique_ptr(new AboutWindow(""))); + "about", std::unique_ptr(new AboutWindow())); this->childWindows.try_emplace( - "options", std::unique_ptr(new SettingsWindow(""))); + "options", std::unique_ptr(new SettingsWindow())); } void ChildWindowSubService::openWindow(const std::string &windowName) { From f1c0bce9fe648ecc2f5746e181c30fca4fc086d8 Mon Sep 17 00:00:00 2001 From: CDevv Date: Fri, 27 Mar 2026 16:07:53 +0200 Subject: [PATCH 8/8] Delete the docs folder --- README.md | 4 +- docs/building.md | 16 ------- docs/index.md | 15 ------- docs/javascripts/mathjax.js | 16 ------- docs/javascripts/tablesort.js | 6 --- docs/overrides/partials/copyright.html | 17 -------- docs/stylesheets/doxide.css | 58 ------------------------- {docs => readme}/logo.png | Bin {docs => readme}/readme_img1.png | Bin 9 files changed, 2 insertions(+), 130 deletions(-) delete mode 100644 docs/building.md delete mode 100644 docs/index.md delete mode 100644 docs/javascripts/mathjax.js delete mode 100644 docs/javascripts/tablesort.js delete mode 100644 docs/overrides/partials/copyright.html delete mode 100644 docs/stylesheets/doxide.css rename {docs => readme}/logo.png (100%) rename {docs => readme}/readme_img1.png (100%) diff --git a/README.md b/README.md index f6976c2..9fcf901 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -![logo](docs/logo.png) +![logo](readme/logo.png) --- [![Build RPG++](https://github.com/rpgppengine/rpgpp/actions/workflows/build.yml/badge.svg)](https://github.com/rpgppengine/rpgpp/actions/workflows/build.yml) RPG++ is an experimental 2D RPG game engine written in C++. It is currently in early development, but contributions are welcome! -screenshot of engine +screenshot of engine Requirements --- diff --git a/docs/building.md b/docs/building.md deleted file mode 100644 index ad5454d..0000000 --- a/docs/building.md +++ /dev/null @@ -1,16 +0,0 @@ -# Building - -Clone the repository -``` -git clone https://github.com/CDevv/rpgpp -``` - -Build it using Xmake. You must [download](https://xmake.io/guide/quick-start.html) it -``` -xmake -``` - -Then you can run it. -``` -./editor -``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 3bec83c..0000000 --- a/docs/index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Introduction - -The RPG++ Engine is an experimental engine for 2D RPG games. - -# Dependencies -- [raylib](https://github.com/raysan5/raylib) -- [nlohmann/json](https://github.com/nlohmann/json) -- [nativefiledialog-extended](https://github.com/btzy/nativefiledialog-extended) -- [raygui](https://github.com/raysan5/raygui) -- [alpaca](https://github.com/p-ranav/alpaca) -- [sol2](https://github.com/ThePhD/sol2) -- [reproc](https://github.com/DaanDeMeyer/reproc) - -# Sections -- [C++ API](/C++ API) diff --git a/docs/javascripts/mathjax.js b/docs/javascripts/mathjax.js deleted file mode 100644 index 080801e..0000000 --- a/docs/javascripts/mathjax.js +++ /dev/null @@ -1,16 +0,0 @@ -window.MathJax = { - tex: { - inlineMath: [["\\(", "\\)"]], - displayMath: [["\\[", "\\]"]], - processEscapes: true, - processEnvironments: true - }, - options: { - ignoreHtmlClass: ".*|", - processHtmlClass: "arithmatex" - } -}; - -document$.subscribe(() => { - MathJax.typesetPromise() -}) diff --git a/docs/javascripts/tablesort.js b/docs/javascripts/tablesort.js deleted file mode 100644 index 6a5afcf..0000000 --- a/docs/javascripts/tablesort.js +++ /dev/null @@ -1,6 +0,0 @@ -document$.subscribe(function() { - var tables = document.querySelectorAll("article table:not([class])") - tables.forEach(function(table) { - new Tablesort(table) - }) -}) diff --git a/docs/overrides/partials/copyright.html b/docs/overrides/partials/copyright.html deleted file mode 100644 index 473f830..0000000 --- a/docs/overrides/partials/copyright.html +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/docs/stylesheets/doxide.css b/docs/stylesheets/doxide.css deleted file mode 100644 index e6a9ccf..0000000 --- a/docs/stylesheets/doxide.css +++ /dev/null @@ -1,58 +0,0 @@ -:root { - --md-admonition-icon--variable: url('data:image/svg+xml;charset=utf-8,'); - --md-admonition-icon--function: url('data:image/svg+xml;charset=utf-8,'); - --md-admonition-icon--typedef: url('data:image/svg+xml;charset=utf-8,'); - --md-admonition-icon--concept: url('data:image/svg+xml;charset=utf-8,'); - --md-admonition-icon--macro: url('data:image/svg+xml;charset=utf-8,'); -} - -.md-typeset .admonition.variable, .md-typeset details.variable, -.md-typeset .admonition.function, .md-typeset details.function, -.md-typeset .admonition.typedef, .md-typeset details.typedef, -.md-typeset .admonition.concept, .md-typeset details.concept, -.md-typeset .admonition.macro, .md-typeset details.macro { - border-color: var(--md-default-fg-color--lighter); -} - -.md-typeset .variable > .admonition-title, .md-typeset .variable > summary, -.md-typeset .function > .admonition-title, .md-typeset .function > summary, -.md-typeset .typedef > .admonition-title, .md-typeset .typedef > summary, -.md-typeset .concept > .admonition-title, .md-typeset .concept > summary, -.md-typeset .macro > .admonition-title, .md-typeset .macro > summary { - background-color: var(--md-default-bg-color); -} - -.md-typeset .variable > .admonition-title::before, -.md-typeset .variable > summary::before { - background-color: var(--md-default-fg-color--light); - -webkit-mask-image: var(--md-admonition-icon--variable); - mask-image: var(--md-admonition-icon--variable); -} - -.md-typeset .function > .admonition-title::before, -.md-typeset .function > summary::before { - background-color: var(--md-default-fg-color--light); - -webkit-mask-image: var(--md-admonition-icon--function); - mask-image: var(--md-admonition-icon--function); -} - -.md-typeset .typedef > .admonition-title::before, -.md-typeset .typedef > summary::before { - background-color: var(--md-default-fg-color--light); - -webkit-mask-image: var(--md-admonition-icon--typedef); - mask-image: var(--md-admonition-icon--typedef); -} - -.md-typeset .concept > .admonition-title::before, -.md-typeset .concept > summary::before { - background-color: var(--md-default-fg-color--light); - -webkit-mask-image: var(--md-admonition-icon--concept); - mask-image: var(--md-admonition-icon--concept); -} - -.md-typeset .macro > .admonition-title::before, -.md-typeset .macro > summary::before { - background-color: var(--md-default-fg-color--light); - -webkit-mask-image: var(--md-admonition-icon--macro); - mask-image: var(--md-admonition-icon--macro); -} diff --git a/docs/logo.png b/readme/logo.png similarity index 100% rename from docs/logo.png rename to readme/logo.png diff --git a/docs/readme_img1.png b/readme/readme_img1.png similarity index 100% rename from docs/readme_img1.png rename to readme/readme_img1.png