Commit Graph

360 Commits

Author SHA1 Message Date
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
Loïc Guilloux ddb6024bc6
Codechange: Don't explicitly unset _generating_world outside of genworld.cpp (#9418) 2021-07-10 14:59:17 +02:00
glx22 89ab8b79a5 Codechange: Remove FOR_EACH_SET_BIT 2021-07-09 21:36:09 +02:00
Loïc Guilloux 87eb0e4fce
Fix #9402, 2e136285: Crash when founding town using default name (#9403) 2021-06-27 17:18:21 +02:00
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
PeterN 330a305c99
Fix: Apply unscaled padding to Viewport inside WWT_INSET. (#9219)
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive.

Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
2021-05-08 21:01:16 +01:00
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 2021-05-06 21:45:36 +02:00
rubidium42 0345f99180 Feature: make the town directory horizontally resizable 2021-05-01 13:30:27 +02:00
Peter Nelson 4f93dd95e4 Cleanup: Tidy up resize, fill and minimal size on widgets in town list window. 2021-04-30 17:08:15 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
frosch 5bfcd742b8 Change: Relocate rename and location buttons in all windows. 2021-01-11 22:15:58 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01: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
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
Jonathan G Rennison 87700bfe0e Codechange: Use cached town name for town list window filtering 2020-01-12 19:37:43 +00:00
Jonathan G Rennison d35f35a968 Codechange: Use cached town, station, industry names for list window sorting
This is to avoid needing to expensively regenerate name strings on
every comparison when sorting by name in the town/station/industry
list windows.
2020-01-12 19:37:43 +00:00
Jonathan G Rennison 22ba048c89 Change: Only resort town directory window on population change if necessary 2020-01-12 19:37:43 +00:00
glx 5c10c426fe Fix 196d5868: Always apply filter on town directory rebuild 2020-01-07 14:21:35 +00:00
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES 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
Charles Pigott fe9731d32c Fix: clang and MSVC warnings (glx) 2019-09-30 14:00:06 +01:00
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 2019-09-07 17:37:01 +01:00
Gabda b870596f15 Add #6887: Option to show zone inside local authority boundary of towns
Can be found at town information > local authority window
Layout for button is same as Graph Keys
Turn on/off for every town individually
2019-08-17 21:45:20 +01:00
TELK 196d586849 Feature: Town name filtering (#7621) 2019-07-22 20:27:39 +01:00
peter1138 b454ca7110 Fix 81d335b: Coverage button missing from town window in scenario editor. 2019-04-27 14:41:58 +01:00
peter1138 81d335b081 Feature: Add station coverage area display for towns. 2019-04-25 09:14:01 +02:00
glx 2db88953e7 Codechange: use std::sort() in GUIList 2019-04-13 12:49:18 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
Johannes E. Krause e6798ffdca Cleanup: Remove questionable syntax in town rating display 2019-03-13 07:47:32 +00:00
Alberth289346 11ba094582 Feature #4186: Append '(City)' behind cities in the town directory (sbr) 2018-06-23 14:02:50 +02:00
PeterN eaa32f5ad5
Change: Use name of cargo instead of Passengers/Mail in town statistics. (#6801)
* Change: Use name of cargo instead of Passengers/Mail in town statistics.
* Cleanup: Remove strings from all language files.
2018-06-04 13:14:11 +01:00
Pavel Stupnikov fef8b831a9 Change: Switch town growth rate and counter to actual game ticks (#6763) 2018-05-02 21:01:30 +02:00
J0an Josep cfb8092397 Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 2018-04-30 21:52:40 +02:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch 8084f39bf3 (svn r27577) -Fix [FS#6386]: Dock and roadstop picker, client list and town authority window did not auto-resize according to their content when they were positioned at the bottom of the screen. (Eearslya) 2016-05-22 10:52:02 +00:00
frosch a81968d0f3 (svn r27341) -Fix [FS#6332]: Do not rerandomise the town name when only cost-estimating the founding. 2015-07-26 09:56:43 +00:00
peter1138 0877f892c5 (svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width. 2014-10-05 11:20:02 +00:00
frosch c4fcc8d2aa (svn r26859) -Fix [FS#6119]: Height computation of game script text in town GUI did not consider margins. 2014-09-20 11:32:54 +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 5370613924 (svn r26422) -Fix [FS#5946]: Some road constructions used the rail sound effect. Rename the enum items to properly reflect their purpose. 2014-03-23 13:28:32 +00:00
frosch 12b30103b1 (svn r25922) -Codechange: Rename TOWN_IS_FUNDED to TOWN_IS_GROWING. It is not tied to funding a town. 2013-10-28 10:55:34 +00:00
rubidium 184e7744c3 (svn r25630) -Fix [FS#5666]: city list sort of population and rating are reversed compared to the icon 2013-07-27 14:46:33 +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
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
alberth d5307c9722 (svn r25097) -Feature[FS#5288]: Add sorting on rating for the town directory window (based on work by sbr). 2013-03-17 15:45:24 +00:00
alberth cfa42fcdce (svn r25096) -Feature: Do descending sort order on population by default, and stabilize sort of equally populated towns. 2013-03-17 15:44:19 +00:00
alberth d62ab47c74 (svn r25095) -Codechange: Immediately save the sort order of the town directory instead of when closing the window. 2013-03-17 15:42:50 +00:00
alberth 15ec6e26f0 (svn r25094) -Feature: Introduce dropdown for selecting the sort criterion in the town directory window (sbr) 2013-03-17 15:41:40 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
frosch b533523258 (svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations. 2012-12-08 17:18:51 +00:00
frosch 545b6de900 (svn r24747) -Fix: Some editboxes had a different colour than the rest of the window. 2012-11-14 22:50:53 +00:00
frosch f5d8ba5d7f (svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead. 2012-11-14 22:50:35 +00:00
frosch 6e6d94a2d1 (svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString. 2012-11-14 22:50:26 +00:00
frosch 6653ac6b36 (svn r24739) -Codechange: Simplify some code by using Textbuf::Assign. 2012-11-14 22:50:21 +00:00
frosch f6d4200f86 (svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor. 2012-11-14 22:50:17 +00:00
frosch c4d7c8dd42 (svn r24733) -Codechange: Move handling of editbox keys to window class. 2012-11-13 21:47:02 +00:00
frosch 7699a7dc06 (svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes. 2012-11-13 21:46:58 +00:00
frosch 137adb3496 (svn r24726) -Codechange: Move editbox mouseloop handling to Window class. 2012-11-13 21:46:33 +00:00
frosch 17025fa6ea (svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code. 2012-11-13 21:46:19 +00:00
frosch 03736af2ae (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. 2012-11-11 16:10:43 +00:00
frosch b998cbdff1 (svn r24697) -Codechange: Use WDF_UNCLICK_BUTTONS instead of duplicating the same functionality. 2012-11-11 16:07:46 +00:00
frosch d58eee1e79 (svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions. 2012-06-04 15:30:29 +00:00
rubidium 41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 2012-04-25 20:50:13 +00:00
michi_cc a2b2bc3620 (svn r24141) -Feature: Display rating in the town directory window. (Inspired by patch from MagicBuzz) 2012-04-17 19:44:41 +00:00
rubidium 89ab59f0cb (svn r23787) -Fix: add some missing spaces 2012-01-11 18:47:32 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain 102f811d02 (svn r23636) -Add: introduce ScriptText in parameters where it can be used 2011-12-19 21:06:06 +00:00
truebrain ad48ab9237 (svn r23626) -Add: ScriptTown::SetText, which adds custom text to the Town GUI 2011-12-19 21:00:55 +00:00
truebrain afcf07ac8a (svn r23620) -Add: ScriptTown::SetCargoGoal and ScriptTown::SetGrowthRate (GameScript only) 2011-12-19 20:59:19 +00:00
rubidium 2988509dd0 (svn r23542) -Codechange: unify and document town related widgets 2011-12-16 17:23:41 +00:00
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 2011-12-15 22:22:55 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
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
2011-12-15 19:54:23 +00:00
rubidium 7bb4a0b825 (svn r23477) -Fix [FS#4878] (r23300): like r23342, but now for the user interface ;) 2011-12-10 15:41:39 +00:00
rubidium 58423b26d1 (svn r23474) -Codechange: move the declaration error related functions to error.h 2011-12-10 13:54:10 +00:00
truebrain b9192bdc4c (svn r23310) -Fix: Town GUI was not representing the true conditions of arctic / tropical goals 2011-11-23 18:55:13 +00:00
truebrain f906ebd2a5 (svn r23300) -Add: show on the GUI when a town grows and make a general framework to store goals of a town 2011-11-23 16:07:14 +00:00
truebrain 229e572663 (svn r23298) -Add: track statistics of all incoming and outgoing goods. Incoming based on TownEffect, outgoing based on CargoType (based on patch by Terkhen) 2011-11-23 16:05:19 +00:00
michi_cc 6548ec6e9e (svn r23233) -Codechange: Refactor maximum and actually transported cargo amount of towns into a reusable struct. 2011-11-15 20:47:53 +00:00
rubidium 69162621d8 (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code 2011-11-04 10:25:58 +00:00
rubidium 46c242b1dc (svn r22385) -Fix [FS#4603]: strnatcmp is in string.cpp, so it ought to be declared in string_func.h. 2011-04-30 14:24:23 +00:00
terkhen 5bb7a48cd2 (svn r22345) -Change: Remove pixel limiter for text buffers. 2011-04-17 18:44:09 +00:00
terkhen 10caf391a1 (svn r22343) -Change: Remove pixel limiter for query strings. 2011-04-17 18:42:17 +00:00
frosch 6ce83c0aaa (svn r22307) -Fix: When drawing the town authority window, check whether the availability of the actions changed, and force a complete redraw in that case. 2011-04-09 21:15:24 +00:00
frosch 652c9cb663 (svn r22247) -Codechange: Update comments wrt. ForceRebuild() in command-scope. 2011-03-13 21:34:21 +00:00
frosch ec9540a12a (svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData(). 2011-03-13 21:31:29 +00:00
frosch 77d1dcb926 (svn r22228) -Fix (r22135)[FS#4546]: Do not resort town, industry and signs list directly in OnInvalidateData(). There might be a scheduled rebuild which needs execution first. So, only set a trigger for resorting. 2011-03-08 20:52:59 +00:00
planetmaker df8c4bdbfa (svn r21929) -Fix [FS#4554]: The town window would not be invalidated in the scenario editor if the ground changed and thus the required cargos for town growth 2011-01-30 19:14:48 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
alberth 852e647bcc (svn r21627) -Codechange: Remove _place_proc global variable. 2010-12-24 15:08:19 +00:00
rubidium 5c9c3f1acf (svn r21414) -Codechange: limit town name by amount of characters, not bytes 2010-12-05 22:25:21 +00:00