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 }}
diff --git a/README.md b/README.md
index f6976c2..9fcf901 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-
+
---
[](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!
-
+
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 @@
-
- {% if config.copyright %}
-
- {{ config.copyright }}
-
- {% endif %}
- {% if not config.extra.generator == false %}
- Made with
-
- Doxide
-
- and
-
- Material for MkDocs
-
- {% endif %}
-
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/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/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..563ae41 100644
--- a/include/editor/childWindows/settingsWindow.hpp
+++ b/include/editor/childWindows/settingsWindow.hpp
@@ -2,9 +2,16 @@
#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);
+ SettingsWindow();
};
#endif /* RPGPP_SETTINGSWINDOW_H */
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