Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
9 months ago
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
9 months ago
Tyler Trahan
051abb2fad
Change: Don't show scoring year in high score table ( #11546 )
10 months ago
Peter Nelson
c18a1494b7
Codechange: Remove FONT_HEIGHT_... macros. ( #11481 )
...
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
11 months ago
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
11 months ago
Peter Nelson
f379b31e28
Add: data parameter in Window::Close method.
...
This allows passing data when closing a window, e.g. to indicate how it was closed.
12 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
1 year ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
Rubidium
15c75e6f45
Codechange: use std::array and std::string for high scores
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
Rubidium
8d8519c3f6
Fix #10368 , Fix 994bf19: server restarting game caused clients to hit assertion
...
Upon closing the EndGameWindow, triggered from UnInitWindowSystem, the
HighScoreWindow would be opened and _z_windows would not be empty.
2 years ago
Peter Nelson
ed60c88b0a
Change: Use power-of-2 scaling for some dimensions in GUI.
...
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
2 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
3 years ago
PeterN
8c3fa2a3bf
Fix #9209 : Excessive time resizing highscore/news window when screen is too small. ( #9210 )
...
If the highscore/news window panel size, which is now scaled by GUI zoom, is larger than the screen size, a loop will be entered where the window is repeatedly resized.
This is resolved by removing the minimal size from the panel, as the window is always resized to cover the screen anyway. This means the screen size can never be too small.
3 years ago
Charles Pigott
2b08f21625
Fix #8625 : Wrong ending year was displayed in highscore table
4 years ago
glx22
6b8ad5a9b1
Change: Apply some consistency to singleplayer related comments
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Niels Martin Hansen
d649011dfc
Fix #7702 : Scaling for highscore screen
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
peter1138
ea8de14520
(svn r26871) -Codechange: Centre and draw arbitrary size highscore screen. Highscore text continues to be drawn with 640x480 dimensions.
10 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
michi_cc
b911f4a452
(svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers.
11 years ago
rubidium
bdb62c14e2
(svn r25513) -Fix [FS#5623]: the high score's company/president name was stored with encoded string codes, causing it to cause trouble when the encoding of the string codes changes. Furthermore, check the incoming dangerous content better
11 years ago
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
12 years ago
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
12 years ago
smatz
3a3162865b
(svn r24915) -Fix: Several out-of-bounds reads
12 years ago
zuu
fd8f5cff5d
(svn r24898) -Fix: Don't unpause the game when closing the highscore window if it was already paused before the highscore screen was shown.
12 years ago
frosch
d1ab0f03bc
(svn r24790) -Remove: Classic difficulty profiles.
12 years ago
frosch
a499435351
(svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables.
12 years ago
truebrain
cb8e37197d
(svn r23534) -Codechange: document and rename widgets to be consistent and understandable
13 years ago
truebrain
2aa774e831
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
13 years ago
truebrain
df0afdf0dc
(svn r23525) -Codechange: make Window::flags4 WindowFlags instead of uint16, with only values known in WindowFlags (and move out 2 timers to their own variable)
...
-Codechange: rename Window::flags4 to Window::flags
-Codechange: move some non-inline functions from .hpp to .cpp
13 years ago
yexo
ad232bd497
(svn r22932) -Fix [FS#4766]: disable the white border on window creation for several windows (based on patch by monoid)
13 years ago
rubidium
7eba2bf4d3
(svn r21890) -Cleanup: remove some unneeded includes
14 years ago
frosch
4bd32799f1
(svn r20286) -Codechange: Unify end of doxygen comments.
14 years ago
frosch
ed4f806f1d
(svn r20283) -Codechange: Unify start of doygen comments.
14 years ago
yexo
063909962a
(svn r20074) -Fix (r20065): highscore window should use the same hotkey for quit as the toolbar
14 years ago
frosch
88019e64e1
(svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick().
15 years ago
rubidium
82fc28f77f
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
rubidium
43a5a4bee8
(svn r18690) -Fix [FS#3469]: some keys that open windows that want to be located relatively to the toolbars/statusbar could cause a crash when in one of the end game screens
15 years ago
rubidium
1f0da3710f
(svn r18324) -Codechange: there's no need for a default size when the window isn't resizable
15 years ago
rubidium
293dfd7c3e
(svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice.
15 years ago