Commit Graph

272 Commits (8bb9c3f6466c6d15a1a02e963b06b95f9ffb6397)

Author SHA1 Message Date
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
peter1138 c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 3 years ago
peter1138 27a956ba62 Codechange: Replace Group::replace_protection with Group::flags 3 years ago
Peter Nelson 2a0365b3d9 Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.

Additionally fixes scrolled padding for the framerate window.
3 years ago
PeterN 8e539ce293
Change: Improve layout and spacing of vehicle group widgets. (#9041)
Existing layout included a blank widget above the group list to align with the vehicle list, however since then an additional sort-by row was added.
Group list size tweaks to match normal row size (at least with normal gui and text size.)
Removed reduction of 2 rows in the group list <- main culprit of odd sizing.
Removed fill attribute on buttons which gave strange sizes, and put it on the group info widget instead.
Tweaked various soft-padding values to line up (centreing text with a 1px offset does not make centred text.)
3 years ago
Bernard Teo f0a24e98f5
Fix #8922: Show vehicle window for single vehicle in shared order grouping (#8926) 3 years ago
SamuXarick a4035af337
Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces

* Codechange: Remove space

* Codechange: Remove space

* Codechange: More missing spaces

* Codechange: Missing spaces

* Codechange: Remove space

* Codechange: Remove space
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
Patric Stout c988b4d62b
Fix #8332: aborting group drag&drop could cause crashes with vehicle drag&drop (#8511)
The selected group was not reset when drag&drop was aborted. When
after that vehicle drag&drop was successful, group drag&drop code
was still executed, causing weird behaviour or even crashes.
4 years ago
Bernard Teo 4af1acfe92 Feature: Drag-and-drop vehicles in group GUI for shared order groups 4 years ago
Bernard Teo a5047b7566 Cleanup: Use range-based for-loop in group_gui.cpp 4 years ago
Bernard Teo e59c400ca6 Feature: Option to group vehicle lists by shared orders
This applies to all kinds of vehicle lists, as well as the "vehicle groups" window.
4 years ago
Bernard Teo 584df548f1 Codechange: Make vehicle lists internally support grouping of vehicles
This is in preparation for the new UI feature that allows grouping by shared orders.
4 years ago
Jonathan G Rennison c167648d75 Fix: Violation of strict weak ordering in group name sorters
This could be caused by a group being renamed, and the old
name being cached from a previous sort.

See: #7838
4 years ago
stormcone 492d2704f1 Fix #7974: Crash when CTRL+click to show a vehicle group that is collapsed 4 years ago
Samu 8b0e4bb101 Codechange: Use const instead of magic number for vehicle profit threshold 5 years ago
stormcone cc1d72c3a3 Feature: Control + click on the vehicle details button in the vehicle view window opens the vehicle group window, then selects and scrolls to the vehicle's group. 5 years ago
stormcone a363933d08 Feature: Control + click on a vehicle in the vehicle group window selects and scrolls to the vehicle's group. 5 years ago
stormcone 551bde77a4 Add: A function which selects and scrolls to a particular group in the vehicle group window. 5 years ago
glx 4ae829cb27 Codechange: Replace FOR_ALL_GROUPS with range-based for loops 5 years ago
stormcone 40ebf3c765 Fix: Do not refer to a function in the documentation that was removed years ago (#7844)
The 'DoDrawString' was removed with this commit: f11300d
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 5 years ago
glx 2db88953e7 Codechange: use std::sort() in GUIList 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 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.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Charles Pigott 49f7332b75 Feature #6053: Collapsible vehicle groups (3298) 5 years ago
Charles Pigott 8890436af1 Add #6189: Groups now count the total number of vehicles in subgroups (3298) 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 5 years ago
PeterN 3a4b6b476b
Change: Use selected group as parent when creating a new group. (#7224) 5 years ago
PeterN 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
5 years ago
Peter Nelson 310fa1af88 Codechange: Rename function to match what it does and reduce code indenting. 5 years ago
Peter Nelson fe37b40385 Fix: Group hierarchy not visible in RTL languages. 5 years ago
Peter Nelson 15320a37b9 Change: OnGameTick() is only called when not paused. 6 years ago
Peter Nelson 2a8fa5fef9 Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
peter1138 19d56a33e8 (svn r27822) -Feature: Vehicle Group Info: Add profits and occupancy display to group vehicle list (mtm, JGR) 7 years ago
frosch ddc9205212 (svn r27630) -Codechange: Deduplicate code to attach vehicle to cursor. 8 years ago
frosch 235b7946fc (svn r27300) -Fix [FS#6306]: Silence GCC warning (Cif) 9 years ago
peter1138 0877f892c5 (svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width. 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 10 years ago
peter1138 fc0646c229 (svn r26455) -Change: Prompt for confirmation when deleting a vehicle group. 10 years ago
peter1138 567d0ff3a7 (svn r26450) -Feature: Hierarchical vehicle subgroups. 10 years ago