TechGeekNZ
8652a4db76
Cleanup: Give `SetDirtyBlocks` a more descriptive name.
4 years ago
Jonathan G Rennison
52e0d44c8a
Revert "Fix recursive faults in Window crash logger due to message box event loop."
...
This reverts commit 2b1b7f8b135968cb88d8e65fcb89cdff8d203838.
Replaced by b5ca2161d9
.
4 years ago
Jonathan G Rennison
b03889d7e6
Add DumpWindowInfo function
4 years ago
Jonathan G Rennison
c227d30801
Fix window re-rendering when ReInit() called within OnPaint/draw handler
5 years ago
Jonathan G Rennison
8f442500ea
Change how dirty screen, window and viewport areas are tracked for later redrawing
...
Track dirty viewport areas seperately form general screen redraws.
Maintain a dirty block grid per viewport, with a smaller block size.
Use even smaller block size in viewport map mode.
Use a rectangle array for general screen redraws instead of a block grid.
Add a dirty bit to windows and widgets, to simplify the common case
of repainting a whole window or widget, without catching
neighbouring windows or viewports.
5 years ago
Jonathan G Rennison
81a1094cc8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_cmds.cpp
# src/date.cpp
# src/economy.cpp
# src/misc.cpp
# src/newgrf_house.cpp
5 years ago
glx
341941af85
Fix #7952 : don't try to access destroyed QueryStrings
5 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
81f159434d
Codechange: Add EditBoxGainedFocus method to VideoDriver base class
5 years ago
Jonathan G Rennison
24b5cb0fdb
IME: Add direct support for Fcitx IME input, with SDL2 on *nix/X11.
5 years ago
Jonathan G Rennison
04cf7d5500
Fix modifier key window not always updating
5 years ago
Jonathan G Rennison
9742a161b3
Clear _focused_window in window destructor before calling OnFocuLost
...
This is such that EditBoxInGlobalFocus does not return true
within any OnFocusLost handlers
5 years ago
Jonathan G Rennison
a4c677a571
Add basic IME support to SDL2 video driver
5 years ago
Jonathan G Rennison
edfd378e93
Merge branch 'master' into jgrpp
...
# Conflicts:
# source.list
# src/blitter/32bpp_anim.cpp
# src/linkgraph/linkgraphjob.cpp
# src/order_cmd.cpp
# src/vehicle.cpp
# src/vehicle_type.h
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
Jonathan G Rennison
b3431512ee
Add modifier key window for toggling shift/ctrl key states using mouse
5 years ago
peter1138
6e28727fa4
Fix: Clicking on scrollbar 'thumb' moved position up instantly.
...
(cherry picked from commit 82989ef076
)
5 years ago
peter1138
82989ef076
Fix: Clicking on scrollbar 'thumb' moved position up instantly.
5 years ago
Jonathan G Rennison
0d93ecb6bf
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/alloc_type.hpp
# src/group_gui.cpp
# src/newgrf.cpp
# src/saveload/economy_sl.cpp
# src/saveload/map_sl.cpp
# src/station_cmd.cpp
6 years ago
glx
410b81537c
Fix 801cbea9c: operator< is not always the best idea
...
Also removes unused and anyway broken SmallMap::SortByKey() function.
6 years ago
glx
801cbea9cc
Codechange: use std::sort() for all std::vector types
6 years ago
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Jonathan G Rennison
ba34ec7ade
Merge branch 'master' into jgrpp
...
Replace build and refit, and group collapse implementations
Fix template creation build and refit
# Conflicts:
# Makefile.bundle.in
# config.lib
# src/animated_tile.cpp
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_base.hpp
# src/blitter/8bpp_base.hpp
# src/blitter/null.hpp
# src/build_vehicle_gui.cpp
# src/command.cpp
# src/command_func.h
# src/console_gui.cpp
# src/core/smallstack_type.hpp
# src/date.cpp
# src/debug.cpp
# src/genworld_gui.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/lang/korean.txt
# src/linkgraph/linkgraph_gui.h
# src/main_gui.cpp
# src/misc_gui.cpp
# src/network/core/game.h
# src/network/core/packet.cpp
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network_content.cpp
# src/network/network_type.h
# src/network/network_udp.cpp
# src/newgrf_house.h
# src/openttd.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/osk_gui.cpp
# src/pathfinder/opf/opf_ship.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/smallmap_gui.h
# src/station_base.h
# src/station_cmd.cpp
# src/table/gameopt_settings.ini
# src/table/newgrf_debug_data.h
# src/table/settings.ini
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehiclelist.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
81315939b9
Codechange: Replaced SmallVector::Find() non-const with std::find()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
f5f33da126
Codechange: Implement OnTooltip event for custom window tooltips.
...
This avoids windows from needing to know or care about tooltip delay settings.
6 years ago
Patric Stout
e3c639a09f
Remove: ENABLE_NETWORK switch
...
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.
With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
6 years ago
Jonathan G Rennison
2bd33c1869
Fix viewport hovering when hover mode is set to right-click
6 years ago
Jonathan G Rennison
7ff252c58d
Merge branch 'master' into jgrpp
...
# Conflicts:
# Makefile.src.in
# findversion.sh
# projects/determineversion.vbs
# src/aircraft_cmd.cpp
# src/lang/dutch.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/linkgraph_gui.h
# src/order_cmd.cpp
# src/settings_gui.cpp
# src/smallmap_gui.cpp
# src/town_cmd.cpp
# src/viewport.cpp
# src/water_map.h
6 years ago
peter1138
56a6d7aec8
Fix #7227 : Don't apply mouse-hasn't-moved test to scrollbars.
6 years ago
Jonathan G Rennison
635ee89b86
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/economy.cpp
6 years ago
Peter Nelson
de9f54ccc1
Codechange: Change scrolling_scrollbar to mouse_capture_widget, and dispatch OnClick() event if widget is not a scrollbar.
...
This allows any widget to support mouse capture.
6 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
6 years ago
Joan Josep
548ec05a48
Add: News menu entry and shortcut for deleting all messages. ( #7240 )
6 years ago
Jonathan G Rennison
2142452305
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# Makefile.src.in
# findversion.sh
# projects/determineversion.vbs
# src/gamelog.cpp
# src/gamelog_internal.h
# src/lang/german.txt
# src/lang/korean.txt
# src/network/core/config.h
# src/network/network.cpp
# src/network/network_udp.cpp
# src/rev.h
# src/saveload/afterload.cpp
# src/saveload/company_sl.cpp
# src/saveload/depot_sl.cpp
# src/saveload/gamelog_sl.cpp
# src/saveload/misc_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/station_sl.cpp
# src/saveload/town_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/table/settings.ini
# src/viewport.cpp
6 years ago
Peter Nelson
9dc36057eb
Fix #7058 , Fix #7161 : Network chat messages did not expire.
6 years ago
Jonathan G Rennison
191afd93c1
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/settings.cpp
# src/station_cmd.cpp
# src/table/settings.ini
# src/vehicle_base.h
# src/widgets/dropdown.cpp
6 years ago
J0an Josep
9ce92521c1
Fix: If screen size changes, windows are relocated and dropdown may not fit the screen.
6 years ago
nikolas
d8ccad91f9
Fix: Some code and comment typos
...
Found with codespell
6 years ago
Jonathan G Rennison
e3d167f9f0
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# config.lib
# src/misc_gui.cpp
# src/network/network_gui.cpp
# src/settings_type.h
# src/smallmap_gui.cpp
# src/smallmap_gui.h
# src/station_cmd.cpp
# src/toolbar_gui.cpp
# src/vehicle_gui.cpp
# src/window.cpp
6 years ago
PeterN
89f0017a67
Fix #7050 : Missing guard around network chat message function for compiling with networking disabled. ( #7058 )
6 years ago
PeterN
5ff0c24993
Fix #6780 : Some windows didn't get updated from OnTick() ( #7048 )
6 years ago
Peter Nelson
c693463c29
Fix: Always draw dirty blocks, else fast-forward is super fast.
6 years ago
Peter Nelson
806e7d25dd
Change: Use GUITimer class instead of bare int/uints.
6 years ago
Peter Nelson
59fe4f28c8
Change: Animate text effects by real time instead of game ticks.
6 years ago
Peter Nelson
ead9c9eab5
Change: Switch various window timers to real time instead of game ticks.
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
Jonathan G Rennison
0e7519f33e
Merge branch 'more_cond_orders-sx' into jgrpp
...
# Conflicts:
# config.lib
# projects/openttd_vs100.vcxproj
# projects/openttd_vs100.vcxproj.filters
# projects/openttd_vs80.vcproj
# projects/openttd_vs90.vcproj
# src/order_gui.cpp
# src/order_type.h
# src/saveload/afterload.cpp
# src/saveload/extended_ver_sl.cpp
6 years ago
Juanjo
9e30054de9
Codechange: Use window class as expected.
6 years ago
Jonathan G Rennison
e735c1a51a
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/aircraft_cmd.cpp
# src/autoreplace_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_rail.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.cpp
# src/script/api/ai/ai_station.hpp.sq
# src/script/api/game/game_station.hpp.sq
# src/script/api/script_station.hpp
# src/track_func.h
# src/vehicle_base.h
6 years ago
Charles Pigott
ca5f73b196
Codechange: Turn a define into a constant
6 years ago
Charles Pigott
b5028efc1f
Fix: Protect against a few out of bounds or uninitialised usage errors
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
Jonathan G Rennison
f59535c0b7
Merge branch 'tracerestrict-sx' into jgrpp
...
# Conflicts:
# src/train_cmd.cpp
6 years ago
Jonathan G Rennison
60cc1a48ac
Refresh trace restrict slots window as with the train list window
6 years ago
Jonathan G Rennison
035f5622b9
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_cmds.cpp
# src/landscape.cpp
# src/linkgraph/linkgraphschedule.cpp
# src/openttd.cpp
# src/roadveh_cmd.cpp
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/vehicle.cpp
# src/viewport.cpp
# src/window_type.h
6 years ago
Niels Martin Hansen
2a868b9f3b
Feature: Framerate display window ( #6822 )
...
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
6 years ago
Jonathan G Rennison
6573a67b69
Change window allocation/destruction to avoid undefined behaviour
...
Create a new window base class which holds the front/back pointers
and the window class.
This fixes the voluminous warning spam about deleted windows when using
UndefinedBehaviorSanitizer.
6 years ago
Jonathan G Rennison
03b0931c57
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# src/debug.cpp
# src/saveload/saveload.cpp
6 years ago
Alexander Weiss
2406500140
Fix: [OSX] Minor 2D scrolling fixes ( #6793 )
...
* Codechange: Check for scrollwheel_scrolling first when scrolling viewport instead of first setting normal values and then overwriting them.
* Fix #6558 : [OSX] Reset 2D scrolling values when not scrolling to prevent unintended window focus changes
* Change: [OSX] Include initial scrolling movement when using 2D scrolling to make it more responsive
* Fix: [OSX] 2D scrolling not working when setting viewport scroll behaviour to use left mouse button
6 years ago
Jonathan G Rennison
fe1e0a9d59
Merge branch 'enhanced_viewport_overlay' into jgrpp
6 years ago
Jonathan G Rennison
64815c0d8a
Improve performance of show scrolling viewport on map
6 years ago
Jonathan G Rennison
56be293107
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/blitter/32bpp_anim.cpp
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_anim_sse2.cpp
# src/blitter/32bpp_base.cpp
# src/blitter/32bpp_base.hpp
# src/ground_vehicle.cpp
# src/linkgraph/linkgraph_gui.h
# src/main_gui.cpp
# src/newgrf_house.cpp
# src/newgrf_house.h
# src/town_cmd.cpp
# src/vehicle_base.h
# src/viewport_gui.cppp
6 years ago
Alexander Weiss
e1a164b531
Change: [OSX] Setting mouse-wheel to scroll the map does not disable pinch to zoom
6 years ago
Jonathan G Rennison
ad1c402ad8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/debug.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.cpp
# src/settings_type.h
# src/town_cmd.cpp
# src/window.cpp
7 years ago
PeterN
cfe6a8ea4f
Add: Replace independment map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling. ( #6756 )
7 years ago
Jonathan G Rennison
864d94d2c5
Merge branch 'save_ext' into enhanced_viewport_overlay
...
# Conflicts:
# src/industry_cmd.cpp
# src/vehicle.cpp
7 years ago
Jonathan G Rennison
8ab6522e7c
Add a monotonically incrementing counter to UpdateWindows calls
...
This is for checking draw cache validity
7 years ago
Jonathan G Rennison
740e4543c3
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/industry_cmd.cpp
7 years ago
michi_cc
e856e3cca8
(svn r27934) -Fix (r27900): Warning about unsigned unary minus.
7 years ago
michi_cc
43aa179586
(svn r27934) -Fix (r27900): Warning about unsigned unary minus.
7 years ago
Jonathan G Rennison
5282394b04
Do not attempt to perform viewport scrolling in game bootstrap mode.
...
Do not increase date in bootstrap mode
7 years ago
Jonathan G Rennison
f77a368268
Merge branch 'crashlog_improvements' into jgrpp
7 years ago
Jonathan G Rennison
4a6ddb2d50
Merge branch 'cpp-11' into crashlog_improvements
...
# Conflicts:
# config.lib
7 years ago
Jonathan G Rennison
2574e46df8
Merge branch 'save_ext' into enhanced_viewport_overlay
...
# Conflicts:
# src/smallmap_gui.cpp
7 years ago
frosch
3e2ec8a545
(svn r27901) -Codechange: GetWindowZPriority only needs a WindowClass; this way it can also be used for WindowDesc before a Window instance is created. (3298)
7 years ago
frosch
09abccd316
(svn r27901) -Codechange: GetWindowZPriority only needs a WindowClass; this way it can also be used for WindowDesc before a Window instance is created. (3298)
7 years ago
frosch
5aecfd11f0
(svn r27900) -Change [FS#6568]: Remove the gap between windows when positioning them after opening.
...
-Fix: Make automatic window-positioning RTL-aware.
-Fix: Automatic window-positioning now uses GUI-scale/style dependent sizes/distances instead of fixed pixel values.
7 years ago
frosch
80dffae130
(svn r27900) -Change [FS#6568]: Remove the gap between windows when positioning them after opening.
...
-Fix: Make automatic window-positioning RTL-aware.
-Fix: Automatic window-positioning now uses GUI-scale/style dependent sizes/distances instead of fixed pixel values.
7 years ago
Jonathan G Rennison
f34833f111
Merge branch 'improved_breakdowns' into jgrpp
...
# Conflicts:
# src/vehiclelist.cpp
7 years ago
frosch
a47fb85cd8
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
7 years ago
frosch
b4b98e5165
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
7 years ago
Jonathan G Rennison
8317eac918
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# src/lang/german.txt
# src/lang/korean.txt
# src/lang/traditional_chinese.txt
# src/window.cpp
8 years ago
Jonathan G Rennison
83091f55da
Merge branch 'vehicle_group_info' into jgrpp
8 years ago
peter1138
95cab27381
(svn r27826) -Fix (r27825): Wrong code style
8 years ago
peter1138
65d77ff317
(svn r27826) -Fix (r27825): Wrong code style
8 years ago
peter1138
0e68f9db70
(svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire)
8 years ago
peter1138
d934ef9b00
(svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire)
8 years ago
peter1138
48b9cbbb76
(svn r27816) -Fix [FS#6421]: Do not search directories when opening ini files as we already have their full path.
8 years ago
peter1138
73ea8cdb21
(svn r27816) -Fix [FS#6421]: Do not search directories when opening ini files as we already have their full path.
8 years ago
Jonathan G Rennison
064a36b319
Merge branch 'crashlog_improvements' into jgrpp
8 years ago
Jonathan G Rennison
102405e082
Fix recursive faults in Window crash logger due to message box event loop.
8 years ago
Jonathan G Rennison
5c7f36ef4b
Merge branch 'enhanced_viewport_overlay' into jgrpp
...
Further fixes for viewport lines/marker for multiplayer clients.
# Conflicts:
# src/lang/russian.txt
8 years ago