Jonathan G Rennison
c929f7075e
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/SourceList.cmake
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/depot_base.h
# src/elrail.cpp
# src/network/core/udp.cpp
# src/network/network_admin.cpp
# src/network/network_chat_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/newgrf.cpp
# src/newgrf_engine.cpp
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_storage.h
# src/os/unix/crashlog_unix.cpp
# src/rail.h
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_cmd.cpp
# src/road_map.h
# src/saveload/labelmaps_sl.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/table/settings/world_settings.ini
# src/tests/test_script_admin.cpp
# src/textfile_gui.cpp
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/window.cpp
# src/window_gui.h
# src/window_type.h
11 months 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
Jonathan G Rennison
40faaa46f4
Scroll to class when using picker tool on object
...
See: #572
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
Jonathan G Rennison
ead18b2af2
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/3rdparty/md5/md5.h
# src/3rdparty/squirrel/squirrel/squtils.h
# src/animated_tile.cpp
# src/console_func.h
# src/core/CMakeLists.txt
# src/core/container_func.hpp
# src/core/smallstack_type.hpp
# src/crashlog.cpp
# src/crashlog.h
# src/debug.h
# src/economy.cpp
# src/gamelog.cpp
# src/industry_gui.cpp
# src/lang/catalan.txt
# src/misc_gui.cpp
# src/network/network_content.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/newgrf_gui.cpp
# src/os/unix/font_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/rail_cmd.cpp
# src/saveload/animated_tile_sl.cpp
# src/script/api/script_tilelist.cpp
# src/settings.cpp
# src/settingsgen/settingsgen.cpp
# src/sl/oldloader_sl.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/strgen/strgen.cpp
# src/strgen/strgen_base.cpp
# src/table/settings/gui_settings.ini
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_cmd.cpp
# src/vehicle_gui_base.h
# src/viewport_sprite_sorter.h
1 year ago
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
1 year ago
Jonathan G Rennison
7202a4e0a6
Fix crash when using picker tool on non-GRF objects
...
See: #546
1 year ago
Jonathan G Rennison
61e9c3084f
Add picker tool to main toolbar help menu
...
See: #498
Supports:
* Rail types
* Road/tram types
* Objects
* Rail stations/waypoints
* Road stops/waypoints
Add unset hotkey
1 year ago
PeterN
f814c86389
Codechange: Reorganise hotkey initialisation. ( #10951 )
...
Hotkeys are now initialized inline, and use std::vector instead of
separate static C-arrays and std::string instead of char *. The list end
marker is no longer required.
1 year ago
Jonathan G Rennison
3a47b421b0
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/core/overflowsafe_type.hpp
# src/economy.cpp
# src/engine_base.h
# src/ground_vehicle.cpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/newgrf_commons.cpp
# src/newgrf_engine.cpp
# src/newgrf_industries.cpp
# src/newgrf_object.cpp
# src/newgrf_roadstop.cpp
# src/newgrf_station.cpp
# src/rail_gui.cpp
# src/road_cmd.h
# src/road_gui.cpp
# src/saveload/afterload.cpp
# src/script/api/script_log.cpp
# src/script/api/script_log.hpp
# src/settings_gui.cpp
# src/settingsgen/settingsgen.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/station_gui.cpp
# src/strgen/strgen.cpp
# src/string_func.h
# src/string_type.h
# src/table/settings/network_private_settings.ini
# src/tests/math_func.cpp
# src/textfile_gui.cpp
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/vehicle.cpp
# src/waypoint_cmd.cpp
# src/waypoint_cmd.h
# src/widgets/dropdown.cpp
1 year ago
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
1 year ago
Jonathan G Rennison
02fe4af934
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/release-windows.yml
# src/company_base.h
# src/company_cmd.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/economy.cpp
# src/economy_cmd.h
# src/fios.h
# src/goal.cpp
# src/group_gui.cpp
# src/network/core/config.h
# src/network/network_admin.cpp
# src/newgrf_config.cpp
# src/os/windows/win32.cpp
# src/saveload/afterload.cpp
# src/saveload/company_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload_error.hpp
# src/settings_gui.cpp
# src/ship_cmd.cpp
# src/stdafx.h
# src/story.cpp
# src/story_base.h
# src/string.cpp
# src/table/settings/economy_settings.ini
# src/tests/CMakeLists.txt
# src/tests/math_func.cpp
1 year ago
PeterN
8ea9c1a133
Fix #10880 : Crash in object window due to incorrect parameter order. ( #10881 )
1 year ago
PeterN
07473bfd2e
Fix: Don't use a loop to test if classid is valid. ( #10818 )
...
Additionally the Object class test was broken.
1 year ago
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.
1 year ago
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
1 year ago
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
1 year ago
Tyler Trahan
ba3de0383a
Codechange: Pass more std::string to StringFilter::AddLine() ( #10743 )
1 year ago
Jonathan G Rennison
c89079a210
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/saveload/cargopacket_sl.cpp
# src/saveload/saveload.h
# src/strings.cpp
# src/vehicle.cpp
2 years ago
Peter Nelson
06b78a7299
Fix: Don't double-pad existing size when adding widget padding.
...
UpdateWidgetSize's size parameter already includes padding.
2 years ago
Peter Nelson
82c70ed3b8
Change: Expose ObjectSpec vector to simplify iteration.
2 years ago
Peter Nelson
1f46f080f0
Codechange: Store objectspecs in std::vector instead of flat array.
2 years ago
Tyler Trahan
066ae6f3fb
Codechange: Simplify some CodeQL-flagged trivial switches
2 years ago
Peter Nelson
c95a3be243
Change: Expose ObjectSpec vector to simplify iteration.
...
(cherry picked from commit 51b112139235c66c3adb2c3a75919fc1d3eff9fc)
2 years ago
Peter Nelson
74e4556a85
Codechange: Store objectspecs in std::vector instead of flat array.
...
(cherry picked from commit 1ae263c5467105820e4d770b3d57d25ba01e22b1)
2 years ago
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2 years ago
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
Jonathan G Rennison
adf2210bc8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/genworld_gui.cpp
# src/lang/afrikaans.txt
# src/lang/arabic_egypt.txt
# src/lang/basque.txt
# src/lang/belarusian.txt
# src/lang/brazilian_portuguese.txt
# src/lang/bulgarian.txt
# src/lang/catalan.txt
# src/lang/croatian.txt
# src/lang/czech.txt
# src/lang/danish.txt
# src/lang/dutch.txt
# src/lang/english.txt
# src/lang/english_AU.txt
# src/lang/english_US.txt
# src/lang/esperanto.txt
# src/lang/estonian.txt
# src/lang/faroese.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/frisian.txt
# src/lang/gaelic.txt
# src/lang/galician.txt
# src/lang/german.txt
# src/lang/greek.txt
# src/lang/hebrew.txt
# src/lang/hungarian.txt
# src/lang/icelandic.txt
# src/lang/indonesian.txt
# src/lang/irish.txt
# src/lang/italian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/latin.txt
# src/lang/latvian.txt
# src/lang/lithuanian.txt
# src/lang/luxembourgish.txt
# src/lang/malay.txt
# src/lang/norwegian_bokmal.txt
# src/lang/norwegian_nynorsk.txt
# src/lang/persian.txt
# src/lang/polish.txt
# src/lang/portuguese.txt
# src/lang/romanian.txt
# src/lang/russian.txt
# src/lang/serbian.txt
# src/lang/simplified_chinese.txt
# src/lang/slovak.txt
# src/lang/slovenian.txt
# src/lang/spanish.txt
# src/lang/spanish_MX.txt
# src/lang/swedish.txt
# src/lang/tamil.txt
# src/lang/thai.txt
# src/lang/traditional_chinese.txt
# src/lang/turkish.txt
# src/lang/ukrainian.txt
# src/lang/vietnamese.txt
# src/lang/welsh.txt
# src/saveload/afterload.cpp
2 years ago
PeterN
09a32f2ce1
Fix #10335 : Set initial scrollbar count for object GUI. ( #10336 )
...
This previously happened when the window was resized by itself which was fixed by #10196 . Explicitly set the count instead.
2 years ago
Jonathan G Rennison
6a7cad1b47
Add NewGRFClass helper method for whether class ID is valid (for iteration)
2 years ago
Jonathan G Rennison
417416d19b
Add NewGRFClass helper method for whether any UI classes available
2 years ago
Jonathan G Rennison
9ada7380ef
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/korean.txt
# src/misc_gui.cpp
2 years ago
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
2 years ago
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
2 years ago
Jonathan G Rennison
5bbf1f5375
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/geometry_type.hpp
# src/error_gui.cpp
# src/rail_gui.cpp
# src/tree_gui.cpp
# src/vehicle_gui.cpp
# src/widgets/dropdown.cpp
2 years ago
PeterN
eaf1e33bd7
Fix #10021 : Object GUI resized when switching between different objects. ( #10196 )
...
* Fix: Scale object gui margin by interface scale.
* Fix: Improve padding on object info text.
* Fix #10021 : Resizing for 1/2/4 object views didn't account for interface scale.
As halving and doubling padding is problematic due to rounding, it is now
added on lower view counts instead of removing on higher view counts.
2 years ago
Jonathan G Rennison
728b902e9f
No longer use CDECL for GUIList::FilterFunction
2 years ago
Peter Nelson
f5f035a22b
Codechange: Make use of Rect Width/Height helpers.
2 years ago
Peter Nelson
ed60c88b0a
Change: Use power-of-2 scaling for some dimensions in GUI.
...
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
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
Tyler Trahan
3d45bc4abe
Feature: Build objects by area
2 years ago
Jonathan G Rennison
ece0a43146
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/newgrf_station.cpp
2 years ago
Andy
039f90d05f
Feature: add sticky pin to Object Selection UI panel ( #10019 )
2 years ago
Andy
a06d323f03
Feature: add shade widget to Object Selection UI panel ( #10020 )
2 years ago
Michael Lutz
c521b965bd
Codechange: Don't use a global for the terrforming error tile.
3 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