diff --git a/client/src/main.cpp b/client/src/main.cpp index f9999f4..09393c5 100644 --- a/client/src/main.cpp +++ b/client/src/main.cpp @@ -3,6 +3,7 @@ #include "objects/part/part.h" #include "rendering/renderer.h" #include "common.h" +#include "version.h" void errorCatcher(int id, const char* str); @@ -22,12 +23,14 @@ int main() { glfwSetErrorCallback(errorCatcher); + std::string title = std::string() + "Openblocks Client " + BUILD_VERSION; + glfwInit(); glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE); // Valid only in OpenGL 3.2+, see: https://stackoverflow.com/a/70519392/16255372 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); - GLFWwindow *window = glfwCreateWindow(1200, 900, "OpenBlocks Client ALPHA", NULL, NULL); + GLFWwindow *window = glfwCreateWindow(1200, 900, title.c_str(), NULL, NULL); glfwSetKeyCallback(window, keyCallback); glfwSetMouseButtonCallback(window, mouseButtonCallback); glfwSetCursorPosCallback(window, mouseCallback); diff --git a/editor/aboutdialog.cpp b/editor/aboutdialog.cpp index 407d84d..fb3ec78 100644 --- a/editor/aboutdialog.cpp +++ b/editor/aboutdialog.cpp @@ -1,5 +1,6 @@ #include "aboutdialog.h" #include "./ui_aboutdialog.h" +#include "version.h" #include #include #include @@ -40,6 +41,9 @@ AboutDialog::AboutDialog(QWidget *parent) { ui->setupUi(this); + ui->titleString->setText(QString() + "Openblocks Engine " + BUILD_VERSION); + ui->versionString->setText(BUILD_VERSION_LONG); + connect(ui->viewLicense, &QLabel::linkActivated, [this]() { (new LicenseDialog(this))->open(); }); diff --git a/editor/aboutdialog.ui b/editor/aboutdialog.ui index d44f552..9484d49 100644 --- a/editor/aboutdialog.ui +++ b/editor/aboutdialog.ui @@ -7,19 +7,19 @@ 0 0 582 - 162 + 200 582 - 162 + 200 582 - 162 + 200 @@ -29,7 +29,7 @@ 220 - 110 + 140 341 32 @@ -57,7 +57,7 @@ :/placeholder-logo.png - + 110 @@ -67,7 +67,7 @@ - Openblocks Engine ALPHA SNAPSHOT + Openblocks Engine @@ -96,6 +96,32 @@ <a href="/license">View license...</a> + + + + 20 + 110 + 81 + 16 + + + + Version: + + + + + + 110 + 110 + 451 + 16 + + + + unknown + + diff --git a/editor/mainwindow.cpp b/editor/mainwindow.cpp index 5091a2f..a422372 100644 --- a/editor/mainwindow.cpp +++ b/editor/mainwindow.cpp @@ -10,6 +10,7 @@ #include "placedocument.h" #include "script/scriptdocument.h" #include "undohistory.h" +#include "version.h" #include #include #include @@ -73,6 +74,8 @@ MainWindow::MainWindow(QWidget *parent) ui->setupUi(this); setMouseTracking(true); + setWindowTitle(QString() + "Openblocks Editor " + BUILD_VERSION); + ui->actionRedo->setShortcuts({QKeySequence("Ctrl+Shift+Z"), QKeySequence("Ctrl+Y")}); QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() + QStringList { "./assets/icons" });