Peter Nelson
7124b4eef1
Codechange: Use std::unique_ptr for all NWidgets.
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
Peter Nelson
b86182ab84
Codechange: Use std::map to provide indexed widget access.
...
This removes the need to determine the biggest widget index and replaces C-style memory handling.
9 months ago
Peter Nelson
8186182e4c
Codechange: Set displayed plane earlier to avoid ReInit.
10 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
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
Tyler Trahan
5c64cdcb79
Feature: Press Ctrl to build a diagonal area of trees ( #10342 )
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
b6ed595176
Codechange: Prefer suggested widget padding.
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
eb4ba1991b
Change: Use CenterBounds function in more places.
...
CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
2 years ago
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map 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
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Vít Šefl
710b758b81
Fix #9241 : Grove and forest tree brushes also create rainforests ( #9542 )
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Niels Martin Hansen
2d9fa81bd0
Feature: Plant clumps of trees in editor by dragging on the landscape
4 years ago
Niels Martin Hansen
e0ee2d530a
Change: Switch tree GUI to use dynamically generated buttons
...
This makes it look a bit better in climates with fewer tree types.
4 years ago
Niels Martin Hansen
4d0f19406b
Fix: Wrong tree sprite in tree toolbar
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 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
frosch
3352dc7e62
(svn r26419) -Cleanup: Remove implementation of BuildTreesWindow::OnPaint since it matches the one of the base class.
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
frosch
3ce8d2ce70
(svn r24846) -Add: Advanced settings to disable certain sound effects.
12 years ago
frosch
03736af2ae
(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.
12 years ago
frosch
b998cbdff1
(svn r24697) -Codechange: Use WDF_UNCLICK_BUTTONS instead of duplicating the same functionality.
12 years ago
michi_cc
ed56585388
(svn r24135) -Remove [FS#4757]: Tree drag size limit.
13 years ago
planetmaker
5ade484ce4
(svn r23538) -Codechange: Consistent naming of widgets in tree plant gui
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
rubidium
db12a5f703
(svn r22908) -Codechange: silence MSVC warning
13 years ago
planetmaker
56c36aed86
(svn r22862) -Add: Allow the tree build gui to resize according to tree size
13 years ago
frosch
ec9540a12a
(svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData().
14 years ago
rubidium
7eba2bf4d3
(svn r21890) -Cleanup: remove some unneeded includes
14 years ago
alberth
852e647bcc
(svn r21627) -Codechange: Remove _place_proc global variable.
14 years ago
frosch
aea2252960
(svn r19634) -Codechange: Use TREE_INVALID more consistently.
15 years ago
frosch
88019e64e1
(svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick().
15 years ago
alberth
91872aca48
(svn r18588) -Feature [FS#2943]: Add shading and unshading of windows.
15 years ago
rubidium
ac4ef286f4
(svn r18447) -Change: make some more windows (e.g. graphs, company view) stickyable
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
rubidium
8d6e323ef8
(svn r18280) -Codechange: remove widget indices that are not needed for custom drawing/handling input
15 years ago
rubidium
14300d309c
(svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions
15 years ago
rubidium
69b6d9309a
(svn r18274) -Codechange: remove the unused WDF flags
15 years ago
alberth
450e40b997
(svn r18230) -Codechange: Allow fill stepsize to be set from Window::UpdateWidgetSize().
15 years ago