Commit Graph

27561 Commits

Author SHA1 Message Date
PeterN
ebc451b071
Fix #10987: Double-close of dropdown stopped land-info tool working as default. (#11000)
Clicking and releasing on the query toolbar icon is meant to select the land-info tool.

This did not work as during closing a window, OnFocusLost() is called, which then closes the window again. These two calls toggled the land-info tool one and off in the same action.

Resolve by not calling Window::Close in OnFocusLost() if the window is already closing.
2023-06-12 08:42:02 +01:00
Rubidium
613ad80581 Codechange: remove need for GetDParamX 2023-06-12 09:12:11 +02:00
Rubidium
82b434b589 Codechange: rename function to better describe what it is doing 2023-06-12 09:12:11 +02:00
Rubidium
f86500df92 Codechange: remove need for SetDParamX 2023-06-12 09:12:11 +02:00
Rubidium
6c6f365d2f Codechange: remove offset parameter for copying DParams in and out 2023-06-11 17:03:31 +02:00
Rubidium
d42ef3a0ef Codechange: inject the query window caption into the widget 2023-06-11 17:03:31 +02:00
Patric Stout
6869f387ba
Fix 07add7a9: [Win32] use full monitor resolution for fullscreen (#10985)
On Windows in fullscreen you cannot reach the top with
the cursor for the halve of the height of your toolbar.

Additionally, on Win10 in fullscreen you can see the actual toolbar.
2023-06-11 12:00:02 +02:00
PeterN
2097719f26
Fix: Don't restore backed up vehicle name if it's no longer unique. (#10979) 2023-06-09 21:18:55 +00:00
Rubidium
6d597879d0 Codechange: let ReadLine return a string instead of passing a buffer 2023-06-09 19:58:29 +02:00
Rubidium
81f957b9f8 Codechange: use std::string to find the executable's working directory 2023-06-09 19:58:18 +02:00
merni-ns
1be668c2e4
Fix #10975: Clear a non-head engine's name (#10976) 2023-06-09 16:09:36 +01:00
Rubidium
66a984afd7 Codechange: rename function to better describe its functionality 2023-06-09 06:41:52 +02:00
Rubidium
48dcb79145 Cleanup: remove seprintf and vsnprintf 2023-06-09 06:41:33 +02:00
Rubidium
13cdf5fffa Codechange: use std::filesystem::path for the language file's path 2023-06-08 23:20:28 +02:00
Rubidium
97dd84d1e0 Codechange: move saveload string fixing code to saveload 2023-06-08 20:36:27 +02:00
Rubidium
3f35787458 Codechange: replace stredup + StrMakeValidInPlace with std::string + StrMakeValid 2023-06-08 19:32:15 +02:00
Rubidium
e762855201 Cleanup: remove str_strip_colours; StrMakeValid also removes the colours
Essentially str_strip_colours followed by StrMakeValid makes the calling of
str_strip_colours useless, as StrMakeValid would have removed them too.
2023-06-08 19:32:15 +02:00
mrmbernardi
35ef6c1723
Feature: [GS] Goal destination can be updated (#10817) 2023-06-08 18:00:31 +01:00
Rubidium
9408ab4799 Codechange: only one '\0' is required 2023-06-08 18:51:02 +02:00
Rubidium
2ae7367024 Codechange: replace StrMakeValidInPlace with StrValid 2023-06-08 18:29:44 +02:00
Rubidium
4ca23a19b6 Cleanup: char-pointer variant of strtolower 2023-06-08 18:09:11 +02:00
PeterN
b49bd86a46
Fix dec7ff6b0c: Dropdowns couldn't be closed by pressing the parent button. (#10954)
Since dropdowns self-close, the detection of re-clicking a dropdown
button no longer worked, as the dropdown is already closed.

Instead set (and then test) a flag on the parent widget to indicate that
the dropdown closed. This method avoids looping windows on every click.
2023-06-07 19:01:30 +01:00
Rubidium
b2a8d8aea4 Codechange: use std::string for Windows' ISO code mangling 2023-06-07 08:27:18 +02:00
Rubidium
a541b8217d Codechange: use fmt::format to build Squirrel error message 2023-06-07 08:02:58 +02:00
Rubidium
5e9a1eb790 Codechange: use fmt::format to construct error message 2023-06-07 08:02:58 +02:00
Rubidium
4de9b8a988 Codechange: use fmt::format to create desync dump savegames 2023-06-07 08:02:58 +02:00
Rubidium
d5c0d3beb7 Codechange: unify the formatting of the game's caption 2023-06-07 08:02:46 +02:00
PeterN
9fa1984ef0
Codechange: IniGroup::GetItem() can now be const. (#10966) 2023-06-06 22:39:37 +00:00
PeterN
f249715db3
Fix #10964: Missing FontConfig format for language. (#10965) 2023-06-06 22:38:11 +00:00
PeterN
eda3defcb5
Codechange: Pass language for font detection as std::string. (#10964) 2023-06-06 20:55:56 +00:00
PeterN
7a0b6b7ddf
Codechange: Remove Freetype bits on Win32/OSX. (#10960)
These platforms have their own specific font rendering.
2023-06-06 19:43:27 +01:00
translators
316a434933 Update: Translations from eints
english (au): 6 changes by krysclarke
russian: 4 changes by Ln-Wolf
danish: 5 changes by bscargo
portuguese: 7 changes by azulcosta
2023-06-06 18:40:40 +00:00
Rubidium
617cacd542 Fix #10961, 52a7c69: incorrect order of parameters to gamelog revision constructor 2023-06-06 20:26:26 +02:00
Rubidium
a47de4b2ab Cleanup: remove DRAW_STRING_BUFFER constant 2023-06-06 18:08:11 +02:00
Rubidium
96fef9f643 Codechange: allocate enough memory to layout the strings 2023-06-06 18:08:11 +02:00
Rubidium
1fa432ca92 Codechange: replace C-style string building with C++-style building 2023-06-06 18:08:11 +02:00
Rubidium
ca1e34c121 Codechange: use std::string to build ScriptText's encoded text 2023-06-06 18:07:54 +02:00
Rubidium
e32f0aa20b Cleanup: minimum string length for town name generator is not needed anymore 2023-06-05 23:26:12 +02:00
Rubidium
edb21620ea Cleanup: remove unneeded checks on remaining buffer size 2023-06-05 23:26:12 +02:00
Rubidium
affceea0ae Codechange: switch StringBuilder to use std::string as backend 2023-06-05 23:26:12 +02:00
Rubidium
ce8933d63e Add: std::back_insert_iterator<std::string> Utf8Encode function 2023-06-05 23:26:12 +02:00
Rubidium
55dfca1936 Codechange: replace seprintf with C++ style formatting 2023-06-05 23:25:59 +02:00
Rubidium
fbd71a9d72 Codechange: replace C-style string processing with C++-style for the listing callbacks 2023-06-05 23:25:49 +02:00
translators
433ec6b5bd Update: Translations from eints
korean: 2 changes by telk5093
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
turkish: 2 changes by EndChapter
french: 2 changes by glx22
portuguese: 2 changes by azulcosta
2023-06-05 18:42:37 +00:00
PeterN
64d6ad50f9
Codechange: Split GetItem with GetOrCreateItem. (#10952)
`IniGroup::GetItem()` returns nullptr if the item does not exist, but does not if the create parameter is set to true. Resolve CodeQL warnings with `GetOrCreateItem()` which returns a reference to the item instead.
2023-06-05 18:29:52 +00:00
Patric Stout
3b1407d240
Feature: allow to do a hostile takeover of an AI company (in singleplayer) (#10914)
With the removal of the share-system, you could no longer make an
AI disappear in a single player game. At least, not without going
into the console.
2023-06-05 19:32:22 +02:00
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.
2023-06-05 18:12:30 +01:00
rubidium42
921f5afc4d Codechange: Apply suggestions from code review 2023-06-05 17:07:39 +02:00
Rubidium
2dd2b698d2 Codechange: convert C-style GetTownName API to std::string returning API 2023-06-05 17:07:39 +02:00
Rubidium
14915526ad Cleanup: remove stre-style GetString 2023-06-05 11:23:31 +02:00