Codechange: Use a dynamic copyright year
This commit is contained in:
@@ -2736,7 +2736,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Company-owned l
|
||||
STR_ABOUT_OPENTTD :{WHITE}About OpenTTD
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 The OpenTTD team
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-{RAW_STRING} The OpenTTD team
|
||||
|
||||
# Framerate display window
|
||||
STR_FRAMERATE_CAPTION :{WHITE}Frame rate
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "newgrf_debug.h"
|
||||
#include "zoom_func.h"
|
||||
#include "guitimer_func.h"
|
||||
#include "rev.h"
|
||||
|
||||
#include "widgets/misc_widget.h"
|
||||
|
||||
@@ -399,7 +400,7 @@ static const NWidgetPart _nested_about_widgets[] = {
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_A_SCROLLING_TEXT),
|
||||
EndContainer(),
|
||||
NWidget(WWT_LABEL, COLOUR_GREY, WID_A_WEBSITE), SetDataTip(STR_BLACK_RAW_STRING, STR_NULL),
|
||||
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL),
|
||||
NWidget(WWT_LABEL, COLOUR_GREY, WID_A_COPYRIGHT), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -495,6 +496,7 @@ struct AboutWindow : public Window {
|
||||
void SetStringParameters(int widget) const override
|
||||
{
|
||||
if (widget == WID_A_WEBSITE) SetDParamStr(0, "Website: http://www.openttd.org");
|
||||
if (widget == WID_A_COPYRIGHT) SetDParamStr(0, _openttd_revision_year);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
|
||||
@@ -98,7 +98,7 @@ BEGIN
|
||||
VALUE "FileDescription", "OpenTTD\0"
|
||||
VALUE "FileVersion", "!!VERSION!!\0"
|
||||
VALUE "InternalName", "openttd\0"
|
||||
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2019. All Rights Reserved.\0"
|
||||
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-!!YEAR!!. All Rights Reserved.\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "openttd.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
|
||||
@@ -50,6 +50,11 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
||||
*/
|
||||
const char _openttd_revision_hash[] = "!!GITHASH!!";
|
||||
|
||||
/**
|
||||
* The year of this version.
|
||||
*/
|
||||
const char _openttd_revision_year[] = "!!YEAR!!";
|
||||
|
||||
/**
|
||||
* Let us know if current build was modified. This detection
|
||||
* works even in the case when revision string is overridden by
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
extern const char _openttd_revision[];
|
||||
extern const char _openttd_build_date[];
|
||||
extern const char _openttd_revision_hash[];
|
||||
extern const char _openttd_revision_year[];
|
||||
extern const byte _openttd_revision_modified;
|
||||
extern const byte _openttd_revision_tagged;
|
||||
extern const uint32 _openttd_newgrf_version;
|
||||
|
||||
@@ -639,6 +639,7 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BACKGROUND, "WID_TT_BACKGROUND");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_SCROLLING_TEXT, "WID_A_SCROLLING_TEXT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_WEBSITE, "WID_A_WEBSITE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_COPYRIGHT, "WID_A_COPYRIGHT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_CAPTION, "WID_QS_CAPTION");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_TEXT, "WID_QS_TEXT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_WARNING, "WID_QS_WARNING");
|
||||
|
||||
@@ -1605,6 +1605,7 @@ public:
|
||||
enum AboutWidgets {
|
||||
WID_A_SCROLLING_TEXT = ::WID_A_SCROLLING_TEXT, ///< The actually scrolling text.
|
||||
WID_A_WEBSITE = ::WID_A_WEBSITE, ///< URL of OpenTTD website.
|
||||
WID_A_COPYRIGHT = ::WID_A_COPYRIGHT, ///< Copyright string
|
||||
};
|
||||
|
||||
/** Widgets of the #QueryStringWindow class. */
|
||||
|
||||
@@ -24,6 +24,7 @@ enum ToolTipsWidgets {
|
||||
enum AboutWidgets {
|
||||
WID_A_SCROLLING_TEXT, ///< The actually scrolling text.
|
||||
WID_A_WEBSITE, ///< URL of OpenTTD website.
|
||||
WID_A_COPYRIGHT, ///< Copyright string
|
||||
};
|
||||
|
||||
/** Widgets of the #QueryStringWindow class. */
|
||||
|
||||
Reference in New Issue
Block a user