Peter Nelson
de4e00c93f
Codechange: Pass by reference to UpdateWidgetSize. ( #12457 )
...
These parameters are always provided and not optional.
2024-04-09 08:34:45 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
Peter Nelson
89474701bc
Codechange: Use templates to deduplicate goal widgets. ( #11852 )
2024-01-21 16:23:17 +00:00
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.
2024-01-16 21:57:05 +00:00
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.
2023-12-30 00:23:57 +00:00
Peter Nelson
bdef9b451c
Codechange: Remove unnecessary SetMinimalTextLines for text buttons alongside captions. ( #11549 )
2023-12-06 21:14:09 +00:00
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(...)`.
2023-11-21 19:04:24 +00:00
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
Peter Nelson
a601a1f406
Change: Use modalpopup spacing for goal question windows.
2023-10-26 12:43:20 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
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.
2023-09-04 10:20:45 +01:00
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
2023-07-19 19:30:14 +02:00
Rubidium
7c37dcb8e3
Fix: do not use {STRING} when {STRING1} or {STRING2} is needed
2023-06-14 09:44:06 +02:00
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
2023-05-05 07:07:54 +01:00
Rubidium
3342967ad9
Codechange: use std::string instead of stredup/free for goals
2023-05-01 16:23:24 +02:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2022-11-12 18:28:39 +00:00
Peter Nelson
6f95e04005
Change: Use Rect helpers for widget drawing.
...
This replaces repetitive and sometimes unwieldy use of constants.
2022-11-12 18:28:39 +00:00
Michael Lutz
e6e69d5289
Codechange: Un-bitstuff goal and story page commands.
2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
2021-12-16 22:28:32 +01:00
glx22
89ab8b79a5
Codechange: Remove FOR_EACH_SET_BIT
2021-07-09 21:36:09 +02:00
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
2021-05-29 21:08:25 +02:00
dP
56911a86ea
Add: Buttons to open global goals from company goals and vice versa
2021-03-08 18:18:47 +00:00
dP
818bee3961
Change: Don't show global goals in company goal windows
2021-03-08 18:18:47 +00:00
dP
91cc414588
Feature: [GS] Allow non-question type windows to have no buttons
2021-02-14 23:21:43 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
dP
94057e9b18
Change: Add some style to GameScript question windows depending on the type
2020-12-28 11:27:42 +00:00
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
SamuXarick
3e680c50ca
Change: Open company window when clicking on a company goal ( #8033 )
2020-03-22 15:05:10 +01:00
SamuXarick
3a08a7e99d
Fix: Ignore clicks on non-applicable global goals ( #8035 )
2020-03-22 15:02:48 +01:00
glx
f58ce3db19
Codechange: Replace FOR_ALL_GOALS with range-based for loops
2019-12-21 20:13:03 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Henry Wilson
af7d9020a1
Codechange: Use override specifer for overriding member declarations
...
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.
Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
2014-04-25 15:40:32 +00:00
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
2014-04-23 20:13:33 +00:00
frosch
73a2245528
(svn r26420) -Fix (r25623) [FS#5948]: Goal GUI failed to shade.
2014-03-23 12:49:22 +00:00
zuu
6fc653d2d7
(svn r26012) -Add: new goal type that show a story page when clicked
2013-11-16 17:41:57 +00:00
frosch
7480a00ce0
(svn r25921) -Fix [FS#5763]: Goal and progress columns were out of sync for company specific goals, if there were no global goals.
2013-10-28 10:41:57 +00:00
zuu
24481998fa
(svn r25759) -Fix (r25369): Set the owner flag of the goal and story windows
2013-09-12 14:35:52 +00:00
zuu
789b4e320b
(svn r25624) -Fix (r25620, r25623): Silence warnings
2013-07-21 17:14:35 +00:00
zuu
4f6d19465b
(svn r25623) -Fix [FS#5611] (r25296): Progress column width in goal window was not updated when a string changed while the window is open
2013-07-21 15:59:07 +00:00
zuu
7a805b621e
(svn r25622) -Codechange: Improve goal_gui comments (Alberth)
2013-07-21 15:52:52 +00:00
zuu
eaede14b8f
(svn r25372) -Add: Allow opening a goal list window specific to a company
2013-06-09 13:23:03 +00:00
zuu
086aae8d04
(svn r25370) -Fix: Make the prefix for widget constants unique for the goal list window
2013-06-09 13:17:20 +00:00
zuu
a4cddc3e08
(svn r25296) -Feature: Goals can now have a progress text and/or be marked as completed.
2013-05-26 19:54:43 +00:00
frosch
4e4e635916
(svn r25294) -Feature: Add another button to window title bars to resize the window to its default size.
2013-05-26 19:30:07 +00:00