Commit Graph

760 Commits

Author SHA1 Message Date
Jonathan G Rennison
02aecca5ae Conditional order: Replace "next station" with manually set station 2023-08-27 13:47:40 +01:00
Jonathan G Rennison
8dc635b516 Order window: Fix misalignment of shared order vehicles button 2023-08-26 22:17:24 +01:00
Jonathan G Rennison
668a0f774a Window: Add accessors for cached NWidgetLeaf dimensions 2023-08-26 22:15:05 +01:00
Jonathan G Rennison
d09b504bc5 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-source.yml
#	.github/workflows/release.yml
#	CMakeLists.txt
#	COMPILING.md
#	src/ai/ai_core.cpp
#	src/ai/ai_gui.cpp
#	src/bridge_gui.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/CMakeLists.txt
#	src/core/smallmap_type.hpp
#	src/disaster_vehicle.h
#	src/effectvehicle_base.h
#	src/fontcache.cpp
#	src/game/game_core.cpp
#	src/game/game_gui.cpp
#	src/gamelog.cpp
#	src/gamelog_internal.h
#	src/group_gui.cpp
#	src/linkgraph/linkgraph.h
#	src/misc.cpp
#	src/network/core/config.h
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_profiling.cpp
#	src/newgrf_profiling.h
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/openttd.h
#	src/order_gui.cpp
#	src/os/windows/font_win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_controller.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/script/script_config.cpp
#	src/script/script_config.hpp
#	src/script/script_instance.cpp
#	src/script/script_scanner.cpp
#	src/script/squirrel.cpp
#	src/script/squirrel_helper.hpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings/network_private_settings.ini
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/window_gui.h
2023-07-01 02:42:51 +01:00
Jonathan G Rennison
326d0c329c Remove some unnecessary colour strings 2023-06-01 00:14:37 +01:00
Jonathan G Rennison
2ed248a61d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout.cpp
#	src/misc_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_config.h
#	src/newgrf_engine.cpp
#	src/news_gui.cpp
#	src/order_gui.cpp
#	src/roadveh_cmd.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/statusbar_gui.cpp
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
2023-05-31 23:21:38 +01:00
Jonathan G Rennison
23ab1cb3d0 Show ctrl-click function of shared orders button in tooltip 2023-05-25 20:02:29 +01:00
Jonathan G Rennison
3cbd1a5a76 Add conditional order test for whether slot is empty/not empty 2023-05-21 12:03:22 +01:00
PeterN
9eb0cca93a Fix #10823, Fix #10811: Order list has end marker row. (#10825) 2023-05-14 13:04:59 +01:00
Jonathan G Rennison
c4fc71339a Update orders window when renaming/removing dispatch schedule 2023-05-13 11:55:17 +01:00
Jonathan G Rennison
2abdd27d02 Fix crash when selecting conditional orders in order window 2023-05-13 11:33:41 +01:00
Peter Nelson
531d1ae8bc Codechange: Use GetScrolled(Row/Item)FromWidget in more places.
In many instances the clicked row position is 'manually' calculated
instead of using the GetScrolledRowFromWidget helper function, with
variations on checks. Replace with the two helpers where possible.
2023-05-12 21:45:32 +01:00
Jonathan G Rennison
54221de0f5 Allow entering decimal day/minute timetable values 2023-05-10 20:06:19 +01:00
Jonathan G Rennison
e7f7cd06bd Simplify timetable time/duration string management 2023-05-10 18:51:49 +01:00
Jonathan G Rennison
4c2244cc21 Viewport: Refactor handling of vehicle route overlays 2023-05-06 19:14:39 +01:00
Jonathan G Rennison
b089b561a5 Add departure board via order subtype to remove via for prior terminus 2023-05-05 17:21:44 +01:00
Jonathan G Rennison
284390cf6a Order window: Fix resizing of release slot and label button rows 2023-05-05 14:03:17 +01:00
Peter Nelson
e18f688db5 Codechange: Remove various COMMA strings. 2023-05-05 07:07:54 +01:00
Jonathan G Rennison
211c1ba61d Allow naming scheduled dispatch schedules 2023-04-29 12:19:28 +01:00
Jonathan G Rennison
6445d688ed Fix crash due to missing case in order window goto dropdown 2023-04-28 18:58:47 +01:00
Jonathan G Rennison
698253c56f Fix auto-close of order management button dropdown in order mode 2023-04-25 21:14:44 +01:00
Jonathan G Rennison
7da25820ea Merge branch 'master' into jgrpp
# Conflicts:
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
2023-04-18 00:01:50 +01:00
Jonathan G Rennison
82803b98e0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/game/game_gui.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf.cpp
#	src/order_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_text.cpp
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/strings.cpp
#	src/table/settings/economy_settings.ini
#	src/table/settings/locale_settings.ini
#	src/timetable_gui.cpp
2023-04-10 15:11:53 +01:00
Jonathan G Rennison
359fe89d2f Don't use occupancy of unload and leave empty orders for occupancy average 2023-04-09 23:34:29 +01:00
Jonathan G Rennison
17e289015e Adjust string names for label orders 2023-04-09 17:10:00 +01:00
Jonathan G Rennison
06e0f39aff Add text label and departure board via orders 2023-04-09 12:48:50 +01:00
Jonathan G Rennison
3b6f7c09ad Allow changing colour of orders in order list and timetable windows 2023-04-08 18:13:35 +01:00
PeterN
f1144de509 Feature: Separate rail/road and sea/air velocity units, and add knots. (#10594)
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00
Jonathan G Rennison
211fdd62b2 Initial support for multi-part (pseudo-articulated) ships 2023-03-15 19:44:26 +00:00
Jonathan G Rennison
2ea1766677 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/league_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_object.hpp
#	src/script/squirrel_helper.hpp
#	src/settings_table.cpp
#	src/station_cmd.cpp
#	src/table/settings.h.preamble
#	src/tree_cmd.cpp
#	src/tree_map.h
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
2023-03-04 16:45:05 +00:00
Rubidium
a409e4b026 Add: documention to large functions that have too little documentation according to CodeQL 2023-02-25 23:57:36 +01:00
Jonathan G Rennison
fef39b5797 Use backup/restore wrappers for various _cur_dpi changes 2023-02-15 22:02:23 +00:00
Rubidium
90f1768006 Codechange: add non-nullptr asserts in cases where it should never be nullptr
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
2023-01-14 21:15:23 +01:00
Jonathan G Rennison
6d4474b84e Merge tag '13.0-beta2' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/depot_gui.cpp
#	src/error_gui.cpp
#	src/gfx.cpp
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/misc_gui.cpp
#	src/network/network_content_gui.h
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/station_gui.cpp
#	src/subsidy_gui.cpp
#	src/table/settings/gui_settings.ini
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/water_cmd.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
2022-12-04 20:43:11 +00:00
Jonathan G Rennison
02e19521bc Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/error_gui.cpp
#	src/fios_gui.cpp
#	src/gfx_func.h
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/road_gui.cpp
#	src/roadveh_gui.cpp
#	src/settings_gui.cpp
#	src/ship_gui.cpp
#	src/station_gui.cpp
#	src/statusbar_gui.cpp
#	src/subsidy_gui.cpp
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widget.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
2022-12-04 13:53:44 +00:00
Bernard Teo
8a78fa7121 Feature: Contextual actions for vehicles grouped by shared orders (#8425) 2022-11-26 18:03:21 +01:00
Jonathan G Rennison
03a9912a2b Vehicle list commands now take into account cargo type filter
Start/stop
Send to depot type commands
Add to new group
Change order target
2022-11-19 22:40:29 +00:00
Jonathan G Rennison
cb9c657f59 Fix selected state of dispatch is/not first/last dropdown in order window 2022-11-17 20:43:57 +00:00
Jonathan G Rennison
cbf41a6343 Fix crash when clicking counter or schedule non-train conditional order 2022-11-17 20:24:04 +00:00
Peter Nelson
890b2666d3 Change: Use scaled WidgetDimensions. 2022-11-12 18:28:39 +00:00
Peter Nelson
b6ed595176 Codechange: Prefer suggested widget padding. 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
Jonathan G Rennison
1518c2fa1e Merge branch 'master' into jgrpp
# Conflicts:
#	src/depot_type.h
#	src/lang/german.txt
#	src/order_gui.cpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/script/api/script_window.hpp.in
#	src/settings_table.cpp
#	src/train_cmd.cpp
2022-11-05 17:19:00 +00:00
Jonathan G Rennison
5135e03539 Order window: Add button to toggle order management button 2022-10-24 18:52:23 +01:00
Nicolas Chappe
a9a21e784d Codechange: Always set the ODATFB_NEAREST_DEPOT flag for 'any depot' orders 2022-10-22 14:19:08 +02:00
Jonathan G Rennison
38c2fa3b66 Add a change counter value special order type 2022-10-13 20:09:20 +01:00
Jonathan G Rennison
91af0c82d3 Adjust CmdModifyOrder p2 bit allocation 2022-10-12 16:14:59 +01:00
Jonathan G Rennison
d61fbb977e Add order management dropdown, add duplicate order and move jump target
Add setting to control if order management button shown

Move order list management to order management dropdown if enabled

See: #439
2022-10-08 00:46:22 +01:00
Jonathan G Rennison
abe49c0b83 Fix release slot order buttons in ship/aircraft orders window
See: #438
2022-10-05 00:10:36 +01:00
Jonathan G Rennison
432717b21d Enabled shared orders and occupancy buttons for competitor order windows 2022-07-03 17:32:03 +01:00