1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Fix version in the interface

This commit is contained in:
Mathieu Schroeter 2017-02-28 22:39:26 +01:00
parent 9f1107a32e
commit 9317da91e8
3 changed files with 15 additions and 2 deletions

View File

@ -13,6 +13,13 @@ set (PB_VERSION_MAJOR 2)
set (PB_VERSION_MINOR 0)
set (PB_VERSION_PATCH 0)
configure_file (
"${PROJECT_SOURCE_DIR}/src/config.h.in"
"${PROJECT_BINARY_DIR}/include/config.h"
)
include_directories ("${PROJECT_BINARY_DIR}/include")
file (GLOB_RECURSE sources src/*.cxx src/*.h)
file (GLOB_RECURSE po resources/po/*.po)

3
src/config.h.in Normal file
View File

@ -0,0 +1,3 @@
#define PB_VERSION_MAJOR @PB_VERSION_MAJOR@
#define PB_VERSION_MINOR @PB_VERSION_MINOR@
#define PB_VERSION_PATCH @PB_VERSION_PATCH@

View File

@ -4,6 +4,7 @@
#include <unordered_map>
#include <assert.h>
#include "config.h"
#include "gettext.h"
#include "blupi.h"
#include "def.h"
@ -1917,9 +1918,11 @@ bool CEvent::DrawButtons()
if (m_phase == WM_PHASE_INIT)
{
pos.x = 580;
pos.x = 570;
pos.y = 465;
DrawText (m_pPixmap, pos, "Version 1.7", FONTLITTLE);
snprintf (res, sizeof (res), "%s %u.%u.%u", gettext ("Version"),
PB_VERSION_MAJOR, PB_VERSION_MINOR, PB_VERSION_PATCH);
DrawText (m_pPixmap, pos, res, FONTLITTLE);
}
if (m_phase == WM_PHASE_SETUP ||