PeterN
a044e8e007
Fix: Scale minimum visible caption by interface scale. ( #10180 )
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
b5693becdc
Add: Define scaled WidgetDimensions.
...
Includes RectPadding container.
2 years ago
Jonathan G Rennison
64b437fa89
Fix: Data race with mixer thread performance measurements
2 years ago
Nicolas Chappe
864771ca09
Feature: [Linkgraph] Show a tooltip with statistics when hovering a link
2 years ago
Nicolas Chappe
7c79a2a767
Change: Do not generate hover events at each frame
2 years ago
Nicolas Chappe
e660860d4b
Codechange: Simplify logic of mouse loop
2 years ago
Bouke Haarsma
45d98f689a
Fix #9993 : Handle DPI changes on macOS and Windows
2 years ago
PeterN
69527abb6f
Fix 9aef7b8c: Don't dispatch hover event if already hovering. ( #10042 )
...
This fixes the timed tooltip window being (invisibly) destroyed and
reconstructed every frame.
This also affects the unused OnHover() window event.
2 years ago
Danny de Bruijne
753b1d7e15
Feature: Add selected toolbar buttons to MacBook Pro Touch Bar
3 years ago
Patric Stout
fa1e27994d
Feature: allow the use of TURN to connect client and server together
...
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.
It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
3 years ago
Patric Stout
66dc0ce196
Codechange: C++-ify the usage of IniFile in settings.cpp
...
Instead of creating the object on heap and use a pointer, create
the object on stack and use a guaranteed-not-null pointer.
The size of IniFile doesn't warrent the forcing to heap.
Additionally, use a subclass instead of a function to do some
initial bookkeeping on an IniFile meant to read a configuration.
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
3 years ago
glx22
e66e25ff71
Fix #9269 , f6d5c01: Hide windows without abusing WC_INVALID
3 years ago
Rubidium
7755f81bb8
Codechange: make explicit that virtual functions in a con/destructor are resolved statically
...
This as during construction the sub class has not been initialized yet, and
during destruction the sub class has already been destroyed, so the overriding
virtual function would be accessing uninitialized data.
3 years ago
frosch
f6d5c0136e
Codechange: make Window destruction not rely on undefined behavior.
3 years ago
frosch
f96f113951
Codechange: use IterateFromBack/Front only if the order is important.
...
Use Iterate if the order does not matter.
3 years ago
frosch
22567a1f43
Codechange: use iterators instead of 'subranges' when iterating from a specific window.
...
Using iterators makes it easier to include or exclude the start window in the iteration.
3 years ago
frosch
95abdfdef9
Cleanup: remove unneeded labels and gotos.
...
The window list supports deletion of arbitrary windows, while iterating over it.
3 years ago
Peter Nelson
d8e06e590a
Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
...
Similar code is already repeated in other locations.
3 years ago
Peter Nelson
52b16237ad
Codechange: Don't update window contents if scrollbar position has not moved.
3 years ago
Peter Nelson
8321ef0061
Codechange: Set specific widgets dirty instead of window.
3 years ago
Peter Nelson
4791ff2862
Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
3 years ago
glx22
14e92bd8e2
Codechange: Replace window related FOR_ALL with range-based for loops
3 years ago
Didac Perez Parera
0cb99c5523
Codechange: nullptr deletion in DeleteWindowById ( #8941 )
3 years ago
Patric Stout
853bfc3562
Codechange: replace _realtime_tick with std::chrono for mouse events
3 years ago
Michael Lutz
8906e9e0fd
Codechange: Consistently use screen size and not driver resolution for determining window sizes.
3 years ago
glx
c0d7949d7c
Fix: Don't use a timer for hundredth tick determination
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Michael Lutz
dd138fc460
Codechange: Stringify config file paths.
4 years ago
Charles Pigott
cfa1b1e006
Fix: Compile warnings when asserts are disabled
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
TechGeekNZ
ee570e1b6d
Cleanup: Fix typos in code comments.
4 years ago
TechGeekNZ
8652a4db76
Cleanup: Give `SetDirtyBlocks` a more descriptive name.
4 years ago
glx
341941af85
Fix #7952 : don't try to access destroyed QueryStrings
4 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
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
peter1138
82989ef076
Fix: Clicking on scrollbar 'thumb' moved position up instantly.
5 years ago
glx
410b81537c
Fix 801cbea9c: operator< is not always the best idea
...
Also removes unused and anyway broken SmallMap::SortByKey() function.
5 years ago
glx
801cbea9cc
Codechange: use std::sort() for all std::vector types
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
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
81315939b9
Codechange: Replaced SmallVector::Find() non-const with std::find()
5 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
5 years ago