Peter Nelson
61407840c6
Codechange: Remove STR_BLACK_RAW_STRING.
2023-05-05 07:07:54 +01:00
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
2023-05-05 07:07:54 +01:00
Peter Nelson
5e185d5328
Codechange: Draw tooltip text in black.
2023-05-05 07:07:54 +01:00
PeterN
003bab3c8a
Change: Size space for editbox clear button by interface scale. ( #10749 )
2023-04-30 23:11:00 +01:00
Rubidium
7b539fa7c9
Fix: fmt's {:#04X} yields '0X00', not '0x0000'
...
Technically the 0X vs 0x is not a big problem, just not pretty. However, the
length also including the 0x results in unexpected behaviour, so it probably
better to not use it.
2023-04-20 21:39:57 +02:00
Patric Stout
1ba4dcc924
Codechange: migrate all Window-related timers to the new framework
...
This means we also say goodbye to GUITimers.
2023-04-15 13:58:55 +02: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
PeterN
73474b08fe
Fix: Clicking on editbox clear button didn't take account of padding. ( #10583 )
2023-03-31 16:07:15 +01:00
Tyler Trahan
066ae6f3fb
Codechange: Simplify some CodeQL-flagged trivial switches
2023-03-25 18:03:16 -04:00
Rubidium
580d0a6343
Codechange: make use of Tile in for all direct map accesses
2023-02-28 07:11:48 +01:00
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2023-01-28 20:33:02 +01:00
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.
2023-01-14 21:15:23 +01:00
PeterN
23eec0b7b3
Fix #8971 : Resize QueryStrings with interface scale change. ( #10281 )
...
* Fix: Use width of caret symbol '_' for text entry.
This replaces an arbitrary pixel width with the space actually required.
* Fix #8971 : Update QueryString sizes with interface scale change.
2022-12-25 00:40:55 +00:00
PeterN
485368f607
Fix: Missing extra padding when drawing tooltip text. ( #10201 )
...
* Fix: Missing extra padding when drawing tooltip text.
This padding is included when calculating the size of the tooltips, the
difference caused a mismatch in height for some tooltips.
* Codechange: Don't draw grey panel underneath tooltip.
This removes the default framerect padding so it is now added explicitly.
SetMinimalSize is also removed as this is overridden in UpdateWidgetSize
anyway.
2022-11-29 18:55:02 +00:00
Tyler Trahan
b846c574d7
Update: Developer credits ( #10190 )
2022-11-24 16:08:33 -05:00
Peter Nelson
dff03124e5
Change: Use modalpopup padding for error/query windows.
2022-11-12 18:28:39 +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
cb059fc081
Change: Use Rect for QueryString editor.
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
Peter Nelson
eb4ba1991b
Change: Use CenterBounds function in more places.
...
CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
2022-11-12 18:28:39 +00:00
Nicolas Chappe
65530a76f6
Codechange: Allow use of SetDParam for tooltips
2022-10-18 22:03:39 +02:00
Patric Stout
8ac0ab47b0
Update: to all the friends we have lost and those we have gained ( #10000 )
2022-09-04 22:01:08 +02:00
Charles Pigott
146827c458
Fix #9877 : GS could trigger 'Cost: 0' cost message ( #9878 )
2022-05-05 19:51:56 +01:00
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
e740c24eb7
Codechange: Template DoCommand 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.
2021-12-16 22:28:32 +01:00
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
2021-06-13 12:45:45 +02:00
Michael Lutz
418e0ea85f
Codechange: Use dynamic string list for contents of land info window.
2021-06-12 22:30:38 +02:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
2021-05-29 21:08:25 +02:00
Patric Stout
ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) ( #9304 )
...
This to be more explicit the function changes the value, and not
returns yes/no.
2021-05-29 11:21:38 +02:00
frosch
f96f113951
Codechange: use IterateFromBack/Front only if the order is important.
...
Use Iterate if the order does not matter.
2021-05-12 23:22:41 +02:00
Peter Nelson
8321ef0061
Codechange: Set specific widgets dirty instead of window.
2021-05-08 09:52:54 +01:00
PeterN
08781d96ed
Fix: Query windows may be partially drawn initially. ( #9184 )
...
Query window was not marked dirty after being moved on init. It was then marked dirty once the white border flash completed.
2021-05-03 16:39:20 +01:00
glx22
14e92bd8e2
Codechange: Replace window related FOR_ALL with range-based for loops
2021-04-29 21:08:24 +02:00
Leif Linse
3b9b177b36
Update: Developer credits ( #9091 )
2021-04-24 17:49:37 +01:00
Peter Nelson
59b6e46bce
Fix: Adjust scrolling interval of credits to account for text line height
2021-04-10 22:36:30 +02:00
Jonathan G Rennison
3ede756d23
Fix: Viewport drag tooltips not being removed when dragging over other windows
2021-04-08 19:34:45 +02:00
Jonathan G Rennison
ae94b2d296
Fix: Viewport drag tooltip flickering when dragging outside window
2021-04-08 19:34:45 +02:00
Patric Stout
ac2b5e57cf
Fix: mention our websites with https:// (instead of http://) ( #8657 )
...
It is 2021. Nobody should advertise http anymore. Not even us.
2021-02-08 19:07:34 +01:00
frosch
e339188ded
Add: a go-to-location button to the LandInfo window.
2021-01-11 22:15:58 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Patric Stout
62cdadb582
Change: move "give money" from client-list to company window
...
This is a much better location for this button, as you send
money from one company to another company, not from player
to player.
This is based on work done by JGRPP in:
f820543391
and surrounding commits, which took the work from estys:
https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311
We did modify it to fix several bugs and clean up the code while
here anyway.
The callback was removed, as it meant a modified client could
prevent anyone from seeing money was transfered. The message
is now generated in the command itself, making that impossible.
2021-01-05 21:56:24 +01:00
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
2020-12-27 10:55:42 +00:00
Patric Stout
68f9925cd4
Codechange: use \u to indicate unicode chars in strings ( #8379 )
...
With \x, we sometimes had to do the "" trick, as the length is not
predefined. With C++11 bringing \u to the specs, which has a preset
length, we no longer need the "" trick.
We set the strings to u8, to ensure all compilers use UTF-8 encoding
for the \u characters.
This was triggered by newer CLangs, which start to warn if you
use "" in the middle of a string, wondering if that was your
intention. It is a good question. And this is our answer :)
2020-12-14 20:25:01 +01:00
glx
e0d20a44d2
Codechange: Use a dynamic copyright year
2020-05-06 09:54:36 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Charles Pigott
a407db54cf
Add: Me
2019-10-28 23:52:54 +01:00
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
2019-05-01 21:36:27 +02:00
Niels Martin Hansen
d5841109f0
Fix dcb2571: Missing override keywords
2019-04-25 17:45:00 +02:00
Niels Martin Hansen
a64bd6e22c
Fix: Also breaking for warning text in set company password
2019-04-24 17:40:11 +02:00
Niels Martin Hansen
08284e005d
Fix: Automatic line breaking of the warning
2019-04-24 17:40:11 +02:00
Niels Martin Hansen
dcb2571888
Add: Warn players that company passwords are not truly secure
2019-04-24 17:40:11 +02:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
peter1138
4da83d2f66
Fix #7386 : Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.
...
Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
2019-03-20 23:00:32 +00:00
Peter Nelson
806e7d25dd
Change: Use GUITimer class instead of bare int/uints.
2019-01-11 11:56:21 +00:00
Peter Nelson
2a8fa5fef9
Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks.
2019-01-11 11:56:21 +00:00
Niels Martin Hansen
68e6b5531a
Update: Developer credits
2018-11-17 21:05:07 +01:00
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
Niels Martin Hansen
350395a6c2
Fix: Missing m8 data in console when using Query tool
...
When map array 8 was added, the Query tool wasn't updated to also
print the value there to the console, in debug builds.
2018-10-30 16:33:07 +01:00
Miguel Horta
42b00c3b39
Fix #6938 : Don't change company value to perform cost estimations ( #6939 )
...
These meddling kids dared to play with magic, but the ancients texts
weren't ready for that.
Refactors logic to estimate costs that dated to even before OpenTTD 0.1;
2018-10-13 13:34:57 +02:00
Jonathan G Rennison
71450881fc
Codechange: Avoid call to memcpy using null pointer in TooltipsWindow constructor
...
Strictly speaking, calling memcpy with src as a nullptr is undefined behaviour
and the optimiser is entitled to delete any null ptr checks which occur afterwards.
This removes the warning emitted by UndefinedBehaviorSantizer.
2018-06-07 09:49:26 +01:00
Michael Lutz
b91e85003e
Fix: Theoretical string overflow when building the cargo acceptance list for the land info window.
2018-06-03 22:36:27 +02:00
frosch
ebe6564e8b
(svn r27979) -Add: adf88 to readme
2018-03-11 12:18:30 +00:00
frosch
b4b98e5165
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
2017-08-13 18:38:42 +00:00
frosch
10293c5fb1
(svn r27686) -Change: List railtype of rail tiles explicitly in the tile info window.
2016-12-09 21:27:22 +00:00
frosch
3cb7d9703b
(svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites.
2016-08-15 18:33:08 +00:00
matthijs
53982003ee
(svn r27560) -Fix: typos in comments and string
2016-05-11 20:48:46 +00:00
michi_cc
2b8bb12d62
(svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists.
2015-08-10 20:24:13 +00:00
frosch
a8080b6256
(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad().
2015-02-01 20:54:24 +00:00
frosch
c9114af706
(svn r27131) -Fix: Dropdown- and tooltip-windows should not steal the focus.
2015-02-01 12:23:39 +00:00
rubidium
8739a7b7d0
(svn r27037) -Fix [FS#6150] (r26878): m6 was moved from Tile To TileExtended, but it wasn't properly removed from Tile (patch by Juanjo)
2014-10-23 17:13:44 +00:00
peter1138
3730ed67cb
(svn r27023) -Codechange: Scale tooltip size by UI scale.
2014-10-18 16:11:40 +00:00
peter1138
ffe820c792
(svn r26924) -Codechange: Fit YES/NO query window buttons to window, instead of unaligned.
2014-09-26 16:15:50 +00:00
rubidium
04e2324b8f
(svn r26873) -Change: split type_height into a type and height array (ic111)
2014-09-21 11:14:58 +00:00
planetmaker
bcb9c64ac8
(svn r26709) -Fix (r15892 and others) [FS#6069]: [OSX] Compilation fails with some lzo2 versions if we define __LP64__ as 0 instead of checking whether it is defined (kernigh2)
2014-07-30 20:19:29 +00:00
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
2014-04-25 15:40:32 +00:00
rubidium
5b82822c12
(svn r26486) -Codechange: replace a number of snprintfs with seprintf
2014-04-23 21:12:09 +00:00
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
frosch
f0e7f9982a
(svn r26277) -Add [FS#5849]: Display speed limit also for road bridges in the TileInfo window.
2014-01-26 13:50:10 +00:00
michi_cc
30867c487f
(svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string.
2013-08-05 20:37:53 +00:00
michi_cc
e2ec0ddb03
(svn r25690) -Change: [OSX] Position the candidate window at the caret position.
2013-08-05 20:37:48 +00:00
michi_cc
64d2fc4d1e
(svn r25683) -Add: Support for a marked/selected range to the textbuf.
2013-08-05 20:37:22 +00:00
michi_cc
da09fd3077
(svn r25681) -Change: [Win32] Position the IME composition window at the caret position.
2013-08-05 20:37:14 +00:00
michi_cc
b911f4a452
(svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers.
2013-08-05 20:36:24 +00:00
fonsinchen
f9b08b1aec
(svn r25375) -Update: add fonsinchen to credits
2013-06-09 13:31:59 +00:00
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
2013-05-26 19:25:01 +00:00
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
2013-05-26 19:23:42 +00:00
frosch
c2c50b0c50
(svn r25092) -Codechange: Deduplicate keyboard handling between console and editboxes.
2013-03-17 13:05:45 +00:00
frosch
579ee7a592
(svn r25089) -Codechange: Move CharSetFilter from QueryString to Textbuf.
2013-03-17 13:04:10 +00:00
rubidium
446d50f658
(svn r25011) -Codechange: allow vehicle transfer and profit text effects to be shown at the same time (fonsinchen)
2013-02-17 14:50:54 +00:00
rubidium
e65a710986
(svn r24960) -Fix [FS#5423]: inconsistencies in the "thanks to" lists
2013-02-02 20:19:17 +00:00
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
2013-01-08 22:46:42 +00:00
frosch
5b2da98ca3
(svn r24785) -Add: Various methods to open the OSK. (based on patch by Eagle_rainbow)
2012-12-05 19:34:25 +00:00
frosch
5dfd5e58ee
(svn r24774) -Fix: Invert the focus handling of the OSK. Keep the focus at the OSK and close it on losing focus. This makes the editbox in the OSK behave correctly.
2012-11-28 21:14:28 +00:00
frosch
155a9d784c
(svn r24772) -Codechange: Call Window::OnEditboxChanged only when the content changes, not when only moving the cursor.
2012-11-28 20:54:56 +00:00
frosch
5e8238c75c
(svn r24748) -Add: Clear button to all editboxes.
2012-11-14 22:50:56 +00:00
frosch
aed11012d4
(svn r24746) -Cleanup: Remove weird lowering of editboxes.
2012-11-14 22:50:49 +00:00