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
PeterN
d42a78f3e8
Codechange: Make DropDownListStringItem preformat and remove other implementations. ( #11063 )
...
Having to choose between DropDownListStringItem, DropDownListCharStringItem, and DropDownListParamStringItem depending on whether to draw a StringID, a raw string, or a StringID with extra parameters was needlessly complex.
Instead, allow passing a StringID or raw string to DropDownListStringItem. This will preformat the StringID into a raw string, and can therefore accept parameters via the normal SetDParam mechanism.
This also means that strings no longer need to be formatted on every draw.
1 year ago
Rubidium
7c37dcb8e3
Fix: do not use {STRING} when {STRING1} or {STRING2} is needed
1 year ago
PeterN
d086f288cd
Codechange: Remove duplicated includes. ( #10888 )
...
These are now included by stdafx.h so don't need to be included again.
1 year ago
Peter Nelson
61407840c6
Codechange: Remove STR_BLACK_RAW_STRING.
1 year ago
Rubidium
aac95eeaf5
Codechange: use std::string instead of stredup/free for stories
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
6f95e04005
Change: Use Rect helpers for widget drawing.
...
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Peter Nelson
686204ff1c
Change: Simplify widget layout of story book window.
2 years ago
Michael Lutz
e6e69d5289
Codechange: Un-bitstuff goal and story page 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
Rubidium
bb9121dbd4
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Jonathan G Rennison
f11cd8f2d0
Fix: Compilation warnings in story_gui and script_story_page
...
See: #7896
4 years ago
Niels Martin Hansen
800ade7702
Feature: Push-buttons on storybook pages ( #7896 )
...
Allow more direct player-initiated interaction for Game Scripts, by letting the GS put push-buttons on storybook pages. These buttons can either trigger an immediate event, or require the player to first select a tile on the map, or a vehicle.
Additionally this reworks how the storybook pages are layouted and rendered, to allow for slightly more complex layouts, and maybe speeding drawing up a bit.
4 years ago
glx
847e5f33d4
Codechange: Replace story related FOR_ALL with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
glx
2db88953e7
Codechange: use std::sort() in GUIList
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Michael Lutz
c7b9987d08
Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
...
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
Henry Wilson
9cba6f7193
Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
alberth
107bf32953
(svn r27086) -Codechange: Simplify opening of windows by always returning a valid window pointer.
10 years ago
rubidium
d534c80e94
(svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces)
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
zuu
9603014102
(svn r26307) -Add: [nogo] Allow GS to hide story page date
11 years ago
rubidium
83eeba28b7
(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns
11 years ago
rubidium
830a49692d
(svn r26048) -Fix: use delete instead of free when allocated by new
11 years ago
fonsinchen
29d0c68bb0
(svn r26040) -Fix: return 0 from unreached part of function to silence some compilers
11 years ago
frosch
7fbe7895ef
(svn r25920) -Fix: Story page content was clipped incorrectly and was drawn past the bottom end.
11 years ago
frosch
12ddbb7cb1
(svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets.
11 years ago
zuu
f8f9e30f80
(svn r25771) -Fix (r25344): If story book content changed height due a string parameter changing length, the scrollbar was not updated
11 years ago
zuu
541fe1775a
(svn r25769) -Fix (r25344): Drawing of broken goal references was broken
11 years ago
zuu
e2c618eaba
(svn r25768) -Fix [FS#5617] (r25344): Story Book text elements that use font size modifiers (eg {BIG_FONT}) caused problem with content height calculation. Solution: switch to pixel based content height instead of computing all heights as multiples of line heights.
11 years ago
zuu
9e30dda720
(svn r25766) -Codechange: Use FONT_HEIGHT_NORMAL instead of checking the height of a dummy string in Story gui
11 years ago
zuu
24481998fa
(svn r25759) -Fix (r25369): Set the owner flag of the goal and story windows
11 years ago
zuu
789b4e320b
(svn r25624) -Fix (r25620, r25623): Silence warnings
11 years ago
rubidium
b860353a66
(svn r25387) -Fix: "typos" in @file filename
11 years ago
zuu
53d2e785f5
(svn r25381) -Fix: Silent story book compiler warnings
11 years ago
zuu
dda71a15d1
(svn r25380) -Fix (r25344): Vertically center images of page elements in the available vertical space
11 years ago
zuu
eaede14b8f
(svn r25372) -Add: Allow opening a goal list window specific to a company
11 years ago