Commit graph

17761 commits

Author SHA1 Message Date
Robert Müller fe95919f63 Support longer lines being rendered in console
Don't truncate console lines at 255 bytes anymore. Especially lines containing many Unicode characters would be adversely affected by this limitation.

Instead, truncate console lines after 10 wrapped lines are rendered. Rendering too many lines at once currently breaks the console scrolling. Rendering an ellipsis is currently not possible when rendering text with a maximum line count.

Increase buffer sizes to handle long (esp. invalid) command inputs.

Closes #7132.
2023-09-06 19:16:00 +02:00
Dennis Felsing f136bfa359
Merge pull request #7138 from furo321/pr_ctrlf_editor
Add CTRL+F to load map prompt
2023-09-06 14:23:19 +00:00
Alexander Akulich 07d8d591c8 Add NO_SKIN_CHANGE_FOR_FROZEN game info flag
The flag is wanted for mods which use freeze state but need or want
to keep the player skins (the skin is critical for some mods).
2023-09-06 16:50:06 +03:00
furo f71a2e017a Add CTRL+F in load map prompt 2023-09-06 15:29:07 +02:00
ChillerDragon 5a8e67b323 Fix 0.7 clients not being able to join after slot change
If the player slots update the 0.7 clients have to be informed
about it. Otherwise the client can block the join button
if the outdated playerslots are filled already.
2023-09-06 12:50:16 +02:00
heinrich5991 1abd09fbc4
Merge pull request #7112 from Robyt3/UI-Tooltip-Fix
Fix some menus tooltips not working anymore
2023-09-06 10:35:20 +00:00
heinrich5991 d2a12e01c1
Merge pull request #7126 from Robyt3/Graphics-Format-PixelSize
Add `CImageInfo::PixelSize` function, use `enum EImageFormat`
2023-09-06 09:57:59 +00:00
heinrich5991 86e0e9539d
Merge pull request #7135 from Moiman/typos
Fix typos
2023-09-05 21:04:33 +00:00
Harri Nieminen 4d9ff1d904 Fix typos
Found by codespell
2023-09-05 22:32:09 +03:00
Dennis Felsing f44204da87
Merge pull request #7133 from Robyt3/Windows-Pipe-Refactoring
Improve Windows pipe (FIFO) support
2023-09-05 19:22:03 +00:00
Robert Müller 1604784669 Improve Windows pipe (FIFO) support
Use `WaitForPipeDrain` to deterministically wait for the pipe to drain instead of using `Start-Sleep`.

Use `Dispose` instead of `Close` to properly flush and close the pipe stream.

Add error handling for connection timeout and I/O errors.

Handle `ERROR_BROKEN_PIPE` separately when peeking at pipe, as this happens when the pipe is disconnected immediately after connecting it or after reading the previous message.

Don't ignore `ERROR_BAD_PIPE` anymore, as the pipe should never be in a disconnected (i.e. bad) state at this point of the function.
2023-09-05 19:15:09 +02:00
Dennis Felsing 228d9967cb
Merge pull request #7130 from Robyt3/Menus-Connect-Popup-Ellipsis
Truncate IP with ellipsis in connecting popup
2023-09-04 20:04:42 +00:00
Robert Müller b4fa20599e Truncate IP with ellipsis in connecting popup 2023-09-04 21:16:27 +02:00
Robert Müller dde45f7a40 Add CImageInfo::PixelSize function, use enum EImageFormat
Use `enum EImageFormat` type for image format literals and variables.

Add `PixelSize` function to get the number of bytes/color channels per pixel for a specified image format.

Remove unused store format argument of texture loading functions. All textures are automatically being stored as RGBA, so the argument was unused. Also remove the therefore unused `FORMAT_AUTO`.

Rename variables consistently to `PixelSize` and use `size_t`, instead of mixing different names like `BPP` and `ColorChannelCount`.

Validate image format loaded from maps using `CImageInfo::ImageFormatFromInt`. Add `FORMAT_ERROR` to represent invalid formats.

Remove redundant `PixelSize` parameter from graphics backends and commands, which can be derived from the texture format.

Fix memory leak when RGB image data is being converted to RGBA format when saving map in editor.
2023-09-03 20:40:28 +02:00
Dennis Felsing 3ff799770c
Merge pull request #7125 from Vy0x2/pr-fix-mv-default-zoom
Remove setting default zoom after leaving multiview, fixes #7113
2023-09-02 20:00:47 +00:00
Dennis Felsing a17798aaa7
Merge pull request #7123 from Robyt3/ImageLoader-Refactoring
Minor refactoring of the image loader
2023-09-02 20:00:14 +00:00
Dennis Felsing 3ef4bf803a
Merge pull request #7122 from Robyt3/Editor-Automap-Files-Subfolder
Move editor automap `.rules` files to separate subfolder
2023-09-02 19:59:57 +00:00
devdenn 533d401ea5 Remove setting default zoom after leaving multiview 2023-09-02 16:57:24 +02:00
Robert Müller ab6262d7ce Use nullptr instead of NULL 2023-09-02 12:07:46 +02:00
Robert Müller 872d6c9e5e Move variable declarations closer to usage/definition 2023-09-02 12:05:31 +02:00
Robert Müller ead33ba05a Add debug messages for all error cases in LoadPNG 2023-09-02 12:01:06 +02:00
Robert Müller 16bc489afb Move editor automap .rules files to separate subfolder
For better organization of the `data/editor` folder.
2023-09-02 11:41:46 +02:00
Dennis Felsing 22cc32113b
Merge pull request #7120 from Robyt3/Flags-Codes-Update
Update displayed country codes of flags
2023-09-01 21:43:56 +00:00
Dennis Felsing 54134d6d38
Merge pull request #7119 from Robyt3/UI-Progress-Spinner-Editor
Add progress spinner to UI, show progress spinner while saving map in editor
2023-09-01 23:43:16 +02:00
Robert Müller 8001b6fde9 Update displayed country codes of flags
Update the country codes which are displayed for the flags in the UI. This only changes the names which are displayed in the UI but not how flags are communicated between server and client.

- Use ISO 3166-2 subdivision codes:
   - England: XEN → GB-ENG
   - Northern Ireland: XNI → GB-NIR
   - Scotland: XSC → GB-SCT
   - Wales: XWA → GB-WLS
   - Catalonia: XCA → ES-CT
   - Galicia: XGL → ES-GA
- Use ISO 3166/MA exceptional reservation code:
   - European Union: XEU → EU
- Move South Sudan (SS) to official codes, as it was officially assigned in the year 2011.

Closes #7071.
2023-09-01 21:55:47 +02:00
Robert Müller 1ebd209f90
Merge pull request #7095 from Marmare314/refactor-a1
Refactor editor mapitems
2023-09-01 18:47:51 +00:00
Robert Müller eac1dc4533 Show progress spinner while saving map in editor 2023-09-01 19:26:34 +02:00
marmare314 59df1d86d4 move CEditorMap::HandleMapDrop to CEditor 2023-09-01 18:57:36 +02:00
marmare314 12d0608dfd let CEditorImage inherit CEditorComponent 2023-09-01 18:57:35 +02:00
marmare314 07fd8e6712 let CAutoMapper inherit CEditorComponent 2023-09-01 18:57:13 +02:00
Dennis Felsing 4c593bc222
Merge pull request #7117 from Robyt3/Chat-Clear-Fix
Fix chat history disappearing with `cl_showchat 1`
2023-09-01 07:27:07 +00:00
Dennis Felsing 67339009fd
Merge pull request #7118 from Robyt3/Browser-Hotkeys-Popup
Disable server browser hotkeys when popup menu is open
2023-08-31 21:05:07 +00:00
Robert Müller 147561e281 Add CUI::RenderProgressSpinner function 2023-08-31 22:40:09 +02:00
Robert Müller a4232198ed Add CUIRect::Center convenience function 2023-08-31 21:33:17 +02:00
Robert Müller 87a0461eb6 Disable server browser hotkeys when popup menu is open
Closes #7088.
2023-08-31 21:16:51 +02:00
Robert Müller c139ae0188
Merge pull request #7106 from furo321/pr_update_swedish_translations
Update Swedish translations
2023-08-31 20:33:34 +02:00
Robert Müller ddb9cdd251 Use DefaultTextColor/DefaultTextOutlineColor 2023-08-31 20:14:10 +02:00
Robert Müller cfcc2ff9bc Remove unused include 2023-08-31 20:14:10 +02:00
Robert Müller 933b4ad2ab Fix chat history disappearing with cl_showchat 1
Closes #7115.
2023-08-31 20:14:10 +02:00
heinrich5991 0da500400d
Merge pull request #7114 from def-/pr-country-flags
Update country flags by JuralBOZO (fixes #7090)
2023-08-31 13:32:17 +00:00
Dennis Felsing ba09a3a30d Update country flags by JuralBOZO (fixes #7090) 2023-08-31 11:15:14 +02:00
Robert Müller cbc1044b98 Fix some menus tooltips not working anymore
For some tooltips, the associated UI element ID was not being set as hot item, which is required for tooltips.

The tooltip for the "Dummy settings" checkbox was only present on the tee settings page but not on the player settings page.

Closes #7107.
2023-08-30 21:57:04 +02:00
Jupeyy 16115c204e
Merge pull request #7094 from Robyt3/Variable-Desc-Fixes
Remove `gfx_finish` config variable, remove `dbg_hitch` config variable, improve config variable descriptions, add missing descriptions
2023-08-30 18:28:25 +00:00
Robert Müller 98b3fe460a Fix typo in internal name of cl_assets_entities config variable
The name used in config is unchanged.
2023-08-30 20:07:12 +02:00
Robert Müller 943f98dc92 Improve config variable descriptions, add missing descriptions 2023-08-30 20:07:11 +02:00
Robert Müller 1028cedee3 Remove dbg_hitch config variable
This config variable was only settable in the server console but only read in the client, so it was effectively unusable. It also has no use case right now.
2023-08-30 20:07:11 +02:00
Robert Müller 31a80c976b Remove gfx_finish config variable
This config variable does not have any use case right now and only causes the rendering to be slowed down.
2023-08-30 20:07:11 +02:00
Dennis Felsing 693fec28ff
Merge pull request #7108 from h-kaan/update-turkish
Update turkish.txt
2023-08-30 17:57:31 +00:00
Dennis Felsing 7d6ec23437
Merge pull request #7109 from Robyt3/CLocConstString-Removal
Remove `CLocConstString`
2023-08-30 17:47:50 +00:00
Robert Müller bc82a450c3 Remove CLocConstString
This makes it more obvious where text is localized. This class was also broken for localized strings with context, since the member variable `m_ContextHash` was uninitialized.
2023-08-30 19:24:38 +02:00