Commit Graph

92 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 828d2146eb Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/ai/ai_info.cpp
#	src/company_base.h
#	src/economy.cpp
#	src/game/game_info.cpp
#	src/gfx_type.h
#	src/linkgraph/linkgraph_gui.cpp
#	src/palette.cpp
#	src/palette_func.h
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
#	src/window.cpp
#	src/window_func.h
3 months ago
Peter Nelson 8afef45d4e
Fix d3c673e: Don't defer OnResize() after ReInit() (#12174)
Some windows resize themselves during painting and issue ReInit(). In this case deferred OnResize() causes a visible glitch as the event is handled on the next redraw.
3 months ago
Jonathan G Rennison 42c8f50551 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows.yml
#	.gitignore
#	COMPILING.md
#	src/company_gui.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/engine_func.h
#	src/fileio.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf_debug_gui.cpp
#	src/newgrf_gui.cpp
#	src/order_gui.cpp
#	src/osk_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/script/api/script_event_types.hpp
#	src/sl/oldloader_sl.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_gui.cpp
#	src/transparency_gui.cpp
#	src/vehicle_gui.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_func.h
#	src/widgets/dropdown_type.h
#	src/widgets/group_widget.h
#	src/widgets/vehicle_widget.h
#	src/window.cpp
#	src/window_gui.h
#	src/window_type.h
5 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.
5 months ago
Jonathan G Rennison ea1ba56ec4 Window: Add window "token" type, unique for each window instance
Not recycled even for windows with same class/ID
Token may outlive window, unlike pointer
5 months ago
Jonathan G Rennison 2a31095118 Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/console_cmds.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/hotkeys.cpp
#	src/network/core/tcp_connect.cpp
#	src/network/core/tcp_listen.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_engine.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_station.cpp
#	src/openttd.cpp
#	src/order_gui.cpp
#	src/os/macosx/osx_main.cpp
#	src/pathfinder/yapf/yapf_node_rail.hpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_game_calendar.h
#	src/timer/timer_manager.h
#	src/timer/timer_window.cpp
#	src/timetable_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/vehicle_cmd.h
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_func.h
#	src/window_gui.h
6 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Peter Nelson f379b31e28 Add: data parameter in Window::Close method.
This allows passing data when closing a window, e.g. to indicate how it was closed.
7 months ago
Jonathan G Rennison b93503bb21 Avoid window iterations when no windows of desired class present 8 months ago
Jonathan G Rennison a18f3274b4 Rename close window functions to match upstream 8 months ago
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
9 months ago
Jonathan G Rennison 87ee18b6b9 Add close/delete window function aliases for upstream 11 months ago
Jonathan G Rennison 1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
1 year ago
Rubidium bcfe0fb076 Codechange: introduce GetMainWindow() to properly account for nullptr checks
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
1 year ago
Jonathan G Rennison ff064e06b8 Fix race between network client disconnect and network window deletion 2 years ago
Jonathan G Rennison a818157c57 Debug: Add button to duplicate debug window 2 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
Peter Nelson a469b4f395 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
(cherry picked from commit 4791ff2862)
3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
Jonathan G Rennison b03889d7e6 Add DumpWindowInfo function 4 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 1dba06656d Codechange: Add utility function for whether the focused window is a console 5 years ago
Jonathan G Rennison 36ac643749 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/afrikaans.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/estonian.txt
#	src/lang/finnish.txt
#	src/lang/french.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/norwegian_bokmal.txt
#	src/lang/norwegian_nynorsk.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/unfinished/persian.txt
#	src/lang/vietnamese.txt
#	src/lang/welsh.txt
#	src/rail_cmd.cpp
#	src/station_cmd.cpp
5 years ago
Joan Josep 548ec05a48 Add: News menu entry and shortcut for deleting all messages. (#7240) 5 years ago
Peter Nelson 806e7d25dd Change: Use GUITimer class instead of bare int/uints. 5 years ago
Peter Nelson 2a8fa5fef9 Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. 5 years ago
patch-import 536a95dfd0 Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
9 years ago
michi_cc fa7a779cf7 (svn r25681) -Change: [Win32] Position the IME composition window at the caret position. 11 years ago
michi_cc da09fd3077 (svn r25681) -Change: [Win32] Position the IME composition window at the caret position. 11 years ago
michi_cc 4b9fdb9ec4 (svn r25667) -Fix: [Win32] Only forward key presses to the IME system if an edit box has the input focus. 11 years ago
michi_cc 923eb009e8 (svn r25667) -Fix: [Win32] Only forward key presses to the IME system if an edit box has the input focus. 11 years ago
frosch 7ac05227dd (svn r24089) -Fix [FS#5136]: Conflicting strategies for resizing the main toolbar and statusbar after resizing the main window. 12 years ago
frosch 946749fb01 (svn r24089) -Fix [FS#5136]: Conflicting strategies for resizing the main toolbar and statusbar after resizing the main window. 12 years ago
alberth 06597e684c (svn r23704) -Doc: Doxygen comment fixes and additions. 13 years ago
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 13 years ago
frosch 335744a1af (svn r22242) -Codechange: Let OnInvalidateData() decide itself what to do immediately in command scope, and what to do asynchronously in GUI-scope. 13 years ago
frosch 51ddbbb13d (svn r22242) -Codechange: Let OnInvalidateData() decide itself what to do immediately in command scope, and what to do asynchronously in GUI-scope. 13 years ago
frosch 04f56cf6ed (svn r22140) -Fix (r22135): I like the letter 'l' nevertheless. (Alberth) 13 years ago
frosch f34e9ff074 (svn r22140) -Fix (r22135): I like the letter 'l' nevertheless. (Alberth) 13 years ago
frosch 074548f8f3 (svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command. 13 years ago
frosch 19b7249ade (svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command. 13 years ago
terkhen c4104567a1 (svn r22059) -Fix (r21179): Make the send chat message window follow the position of the status bar. 13 years ago
terkhen 8196b03074 (svn r22059) -Fix (r21179): Make the send chat message window follow the position of the status bar. 13 years ago
rubidium bf6b6b8bc9 (svn r21244) -Fix [FS#4240] (r21179): the news message always stayed in the middle; let it follow the setting of the statusbar instead 14 years ago
rubidium 16c90ed48b (svn r21244) -Fix [FS#4240] (r21179): the news message always stayed in the middle; let it follow the setting of the statusbar instead 14 years ago
rubidium 9bdf6a36f4 (svn r21179) -Fix [FS#4201] (r69): if the main toolbar's location is configurable, why isn't the statusbar's location configurable? 14 years ago
rubidium a9da53c106 (svn r21179) -Fix [FS#4201] (r69): if the main toolbar's location is configurable, why isn't the statusbar's location configurable? 14 years ago
rubidium 55897be79b (svn r18331) -Fix [FS#3334]: news items would with some chat 'bars' not be displayed fully. Fix by erikjanp. 15 years ago
rubidium 5d38d06313 (svn r18331) -Fix [FS#3334]: news items would with some chat 'bars' not be displayed fully. Fix by erikjanp. 15 years ago