Commit graph

9515 commits

Author SHA1 Message Date
marmare314 e1931d216a Switch order in which envelope points are selected
When multiple envelope points could be selected, switch the order
such that the one that is visible is selected first.
2023-08-10 08:16:15 +02:00
Dennis Felsing 2ea102ac9f
Merge pull request #6984 from Robyt3/Settings-Controls-Localizable
Use `Localizable` instead of `Localize` inside comment
2023-08-08 21:18:13 +00:00
Robert Müller bfb64a47e6 Improve dbg_tuning, refactor CDebugHud::RenderTuning
Use different colors to highlight tuning parameters when using `dbg_tuning`:
- red: value changed globally
- blue: value changed only in current zone
- green: value changed globally but reset to default by tune zone
- grey: value unchanged globally and in current zone

In addition to this, with `dbg_tuning 1` the unchanged parameters and the velramp graphs are not shown anymore. With `dbg_tuning 2` all parameters and graphs are shown as it was previously the case with `dbg_tuning 1`.

The position of the debug information is adjusted so it overlaps less with the HUD. When many tuning parameters are shown, the parameters now wrap to another column instead of extending beyond the height of the screen.

Headers are also added to each column.
2023-08-08 21:16:17 +02:00
Robert Müller 738187d94e Refactor CDebugHud::RenderNetCorrections, improve layout
Also show current tune zone.

Show value on every line instead of having some lines without a value.

Improve labels.

Reduce duplicate code and improve readability.
2023-08-08 20:31:48 +02:00
Robert Müller 51e1f9d88f Refactor CDebugHud::RenderHint
Replace magic numbers with constants.
2023-08-08 20:31:48 +02:00
Robert Müller 30d3d4f94c Rename GetTunes to GetTuning and return const pointer
No need to copy all tuning parameters. Consistent naming with prediction code where `GetTuning` is also used.
2023-08-08 20:31:48 +02:00
Robert Müller b98d519744 Use textrender for graphs, refactor CGraph::Render
Use textrender for rendering debug graph labels instead of using the debugging font and quad text.
2023-08-08 20:31:47 +02:00
Robert Müller 262196bd2c Use Localizable instead of Localize inside comment 2023-08-08 20:26:56 +02:00
Edgar 43d3d6a876
avoid nullptr checks by initializing the pointers 2023-08-08 16:47:49 +02:00
Edgar 8d4f468edd
fix too long console commands not rendering help 2023-08-08 16:42:24 +02:00
Edgar 50938a8a58
don't send empty chat messages 2023-08-07 17:07:12 +02:00
Zwelf 18dff9ef46 Fix /load from backup database
Saves were deleted without the team getting its state when /load and
/save both happened during mysql server not reachable.

Before this fix, the saves were only in the DDNet log output for
recovery, not in any database anymore.

`Write::BACKUP_FIRST` is 0 so always false, so the previous code
didn't harm other code paths (especially `Write::NORMAL`).
The saves were tried to retrieve two times from the database, therefore
at the second time it didn't exist anymore. One time erroneously in
`Write::BACKUP_FIRST` and the second time in `Write::NORMAL_FAILED`.

Fixes #6924
2023-08-07 15:35:39 +02:00
Robert Müller c4dcdad5cc Fix crash when using goto_tele in map without tele layer
The check for `goto_switch` is added for completeness but not strictly necessary, as this is also checked in `GetSwitchNumber`.
2023-08-06 23:41:15 +02:00
Robert Müller 2ea82730ae Fix client crash with more than MAX_VOTE_OPTIONS vote options
The server does not allow adding more than `MAX_VOTE_OPTIONS` vote options, so the client will now also refuse to add more options than that.

Supersedes #6930.
2023-08-06 17:07:06 +02:00
Edgar 8c49c2ea4b
Merge pull request #6952 from Robyt3/TextRender-Font-Index-File
Add font index, support font family variants depending on language
2023-08-05 15:49:12 +00:00
Robert Müller 92dc3d4a0f Fix emotes sometimes being shown for others tees
The `Translate` function modifies the first argument, so the client ID keeps changing when the function is being used in a loop. Additionally, calling `Translate` manually is not necessary for messages, as client IDs in messages are already automatically translated when using `SendPackMsg`. Both faults can cause emoticons to appear on the wrong players when the emote spamprotection limits emotes to nearby players.
2023-08-05 15:54:04 +02:00
Robert Müller 43739ea9aa When quitting/restarting client clear screen and render message
When quitting or restarting the client, clear the screen and render a message "Quitting. Please wait…" or "Restarting. Please wait…" respectively.

Previously the last frame would keep getting shown while the client is busy with cleanup tasks. Rendering a final message before the client window stops being updated provides a cleaner user experience.
2023-08-03 17:24:09 +02:00
Robert Müller d642abd722 Add font index, support font family variants depending on language
Add `fonts/index.json` which specifies:

- List of all font files that should be loaded (filenames).
- Default font (specified by family name or by family and style name).
- Font variants for different languages, using the name of the language file as key.
- Fallback fonts.
- Icon font.

There are characters (e.g. all in `刃直海角骨入`) that look different depending on the language of the content being Japanese, Simplified Chinese, Traditional Chinese and Hangul, because Unicode uses the same codepoint for characters regardless of the language. To render these characters correctly, the active variant font is switched depending on the selected language.

The `ITextRender` interface is changed so the current language variant can be set using `SetFontLanguageVariant` and the default and icon fonts can be toggled using `SetFontPreset`. The class `CFont` is removed entirely.

The text render is restructured: The font faces and font atlas are now managed by a separate class `CGlyphMap` like on upstream. As the text fill and outline textures always have the same size, the texture skyline only needs to be stored once and free positions in the atlas only need to be calculated once for each glyph instead of separately for the fill and outline textures.

The font files and their licenses are also updated:

- Update Source Han Sans to version 2.001.
- Update Glow Sans Japanese Compressed to version 0.93.
- Update Deja Vu Sans to version 2.37.
- Update Font Awesome icons font to March 2023 version.

Closes #6881.
2023-08-01 19:30:25 +02:00
Edgar 27e846f8db
Merge pull request #5434 from heinrich5991/pr_ddnet_loglevels
Add separate log levels for each output
2023-08-01 09:20:06 +00:00
Edgar b909cfadd8
Merge pull request #6943 from Robyt3/Editor-shared_ptr-Refactoring
Use `std::shared_ptr` for editor resources, fix crashes with brush
2023-08-01 09:13:59 +00:00
devdenn 4ea46f2df9 Fix malformed lines in some translation files 2023-07-29 19:13:24 +02:00
Robert Müller 88bb44ac93
Merge pull request #6944 from Marmare314/boxselect-envelopes
add box selection to envelope editor
2023-07-29 13:47:38 +00:00
marmare314 93e95bbd38 add box selection to envelope editor 2023-07-29 15:10:14 +02:00
Robert Müller 3b273500c5
Merge pull request #6942 from heinrich5991/pr_ddnet_game_settings_cleanup
ResetServerGameSettings → ResetGameSettings, remove flag argument
2023-07-29 08:48:05 +00:00
Robert Müller 6f03aabb34 Use std::shared_ptr for editor resources, fix crashes with brush
Simplify memory management of groups, layers, images, sounds and envelopes by using `std::shared_ptr` for all of them.

Clear brush when creating a new map to prevent crash due to unloaded textures being used in tile layer. Closes #6935.

Also fix crash when restoring a saved brush after removing an image that is being used by it.
2023-07-28 21:17:19 +02:00
marmare314 862c0ca2fc make point hitbox bigger 2023-07-28 17:47:28 +02:00
Robert Müller 5b10547aec
Merge pull request #6916 from Vy0x2/pr-poc-mv-clean
Minor improvements to Multi-View
2023-07-28 15:00:42 +00:00
Robert Müller 88cf4c4ccb
Merge pull request #6923 from Marmare314/envelope_grid
Add grid to envelope editor
2023-07-28 14:42:53 +00:00
devdenn 1c231a0dbd Minor improvements to Multi-View
Dont save the Multi-View variables
Multi-View can not longer be activated again after already active
Fix cl_multiview_use_freeview variable config
Players who killed will be removed from Multi-View even if the spec mode is not active
Multi-View personal zoom will be reseted when enabling Multi-View
Fix bug where a kill in a team will be taken into account
Improve the solo player experience in Multi-View
2023-07-28 16:34:35 +02:00
marmare314 babdbc4b17 add grid to envelope editor 2023-07-28 16:18:56 +02:00
heinrich5991 a94b5c35bf ResetServerGameSettings → ResetGameSettings, remove flag argument
The old code looked pretty weird. It checked for `CFGFLAG_SERVER |
CFGFLAG_GAME` being set above, and then used the passed-in parameter to
find the command. I think it'd be better to just look for `CFGFLAG_GAME`
and then find the command using `CFGFLAG_GAME`.
2023-07-28 16:12:21 +02:00
heinrich5991 03fd1b440b
Merge pull request #5398 from AssassinTee/feature/elasticity-tuning
implement tuning values for elasticity
2023-07-28 13:58:42 +00:00
Marvin Winkens e1ba77d3dc implement tuning values for elasticity
implement tuning values for elasticity

add grounded check to movebox and give jump back when bouncing

fix styling issues

fix jumps being given back at ceilings
2023-07-28 15:35:45 +02:00
Robert Müller b33c9ca977
Merge pull request #6934 from Marmare314/zoom-reset-big-values
handle big value ranges on envelope zoom reset
2023-07-28 13:25:46 +00:00
Robert Müller c2379591e0
Merge pull request #6941 from Marmare314/zoom-adaption
improve offset adaption for envelope zoom
2023-07-28 12:16:56 +00:00
Robert Müller 8b209f036e
Merge pull request #6872 from Marmare314/envelope_contextmenu
Multiple selection in envelope editor
2023-07-28 11:11:02 +00:00
marmare314 f3353e8062 improve offset adaption for envelope zoom
The offset adaption was not correct. Close to the origin it was not really noticeable,
but further away the points shifted offscreen when zooming.
2023-07-28 12:50:12 +02:00
marmare314 62ee646283 allow multiple selection in envelope editor 2023-07-28 12:41:25 +02:00
Robert Müller fd13ae5fd5
Merge pull request #6928 from sjrc6/pr-fix-gamesettings-crash
Fix client crash in ResetServerGameSettings
2023-07-27 18:45:41 +00:00
Tater 6bb2696c8b Fix crash in ResetServerGameSettings 2023-07-27 13:26:11 -05:00
marmare314 d964a3d327 handle big value ranges on envelope zoom reset 2023-07-27 19:47:06 +02:00
marmare314 873a8543df calculate zoom factor correctly for target zoom 2023-07-27 18:36:58 +02:00
Robert Müller 22bd19be06
Merge pull request #6920 from Marmare314/layer-drag-bug
reset layer dragging status if no buttons were pressed
2023-07-26 09:01:38 +00:00
marmare314 be861664bc reset layer dragging status if no buttons were pressed 2023-07-26 09:34:36 +02:00
marmare314 3010633099 improve envelope y offset on reset for small value ranges 2023-07-26 00:10:15 +02:00
Robert Müller 71500fd60c Improve server settings editor and status bar
Use icons for all server settings buttons. Rearrange and group buttons.

Show buttons in disabled state when they are not useable instead of hiding them.

Remove checker background from server settings list.

Overhaul hotkeys, also show hotkeys in the tooltips:
- Enter: add command
- Alt+Enter: update command (previously M)
- Alt+Up/Down: move command up/down (previously no hotkey)
- Delete: delete command

Don't activate command lineinput when selecting, moving or deleting elements, as this prevents the listbox from accepting the delete hotkey.

Fix server settings listbox being active while file dialog is open.

Ensure extra editor dragbar area matches the respective toolbar size.

Remove spacing on the left side of extra editors to improve alignment.

Increase status bar button sizes and make them consistent.

Use `enum` to track active extra editor instead of using multiple `bool`s.

Disable extra editor buttons when tile picker is shown, as the extra editors are not rendered in this case.
2023-07-25 21:21:54 +02:00
Robert Müller 177f7485c2 Render editor status bar except tooltip behind popups
So that buttons in the status bar cannot be used while a popup or the file dialog is open.

The tooltip still has to be rendered after popup menus, as popup menus can set the tooltip, which would otherwise not be shown.
2023-07-25 20:17:36 +02:00
Robert Müller b412153341 Ignore listbox hotkeys when modifier, shift or alt pressed
So other components can use these combinations together with a listbox.
2023-07-25 20:17:36 +02:00
Robert Müller d8c05115c9 Add constructor for CSetting and use emplace_back 2023-07-25 20:17:27 +02:00
Tater 4fe7aaa43f execute CFGFLAG_GAME configs on the client 2023-07-24 19:15:29 -05:00
marmare314 d4110529e4 implement zoom and drag in envelope editor 2023-07-24 22:58:26 +02:00
heinrich5991 4f103d5a4c Revert "Allow server to redirect clients"
Discussion wasn't finished:
https://github.com/ddnet/ddnet/pull/6757#issuecomment-1648565562.

This reverts commit 9d2f4318d5.
2023-07-24 22:51:27 +02:00
heinrich5991 85566fbe92 Add separate log levels for each output
`stdout_output_level` for printing to stdout, `console_output_level` for
printing to local console and remote console and `loglevel` for the log
file.

Keep the old log level filters 0 for info and more severe, 1 for debug
and more severe and 2 for trace and more severe, introducing -1 for
warn, and -2 for error. -3 will show no log messages at all.
2023-07-24 22:43:05 +02:00
heinrich5991 e432dbb750
Merge pull request #6757 from ChillerDragon/pr_redirect
Allow server to redirect clients
2023-07-24 20:21:21 +00:00
heinrich5991 e6725a9668
Merge pull request #6907 from Robyt3/Editor-File-Save-Default-Value
Set default name when saving map under new name or as copy
2023-07-24 19:01:12 +00:00
Robert Müller 566324c1f8 Fix "Multiplication result converted to larger type" alerts
Introduced by #6899.
2023-07-24 20:06:08 +02:00
Robert Müller eb8619e104 Set default name when saving map under new name or as copy
When using "Save as" and "Save copy" set the default map name in the file dialog to the name of the current map.
2023-07-24 19:02:43 +02:00
Tater d2d273b6e0 Respect ALLOW_HOOK_COLL flag 2023-07-23 15:54:18 -05:00
Tater a998363978 Use local inputs for direction arrows and aim line toggle 2023-07-22 22:57:20 -05:00
Edgar d11048ad36
Merge pull request #6903 from Robyt3/Game-Console-Antistatic
Support selecting text in both consoles at the same time, refactoring
2023-07-22 19:25:10 +00:00
Robert Müller e174c0bc08 Support selecting text in both consoles at the same time
Change static variables to member variables and move member variables from overall console class to the console instance class, so selection is tracked separately for console instances.
2023-07-22 13:49:53 +02:00
Robert Müller db62f5b189 Use IClient::GlobalTime instead of CConsole::TimeNow
Both functions track the time in seconds that has passed since some instant as a `float`. The specific start time is not relevant for calculations, therefore `IClient::GlobalTime` can be used instead of `CConsole::TimeNow`.
2023-07-22 13:46:58 +02:00
Robert Müller d02904feea Fix inaccurate envelope calculation
Use `double` instead of `int` to represent the time in milliseconds in envelope calculation.

This fixes step-ladder patterns appearing with bezier curves and artifacts appearing when two points are very close together in time.
2023-07-21 17:45:44 +02:00
Robert Müller 21bbc8be61 Improve filename length check for images
Only add assertion to prevent empty filename, as this causes Valgrind to crash.

Handle empty filename used for special null-image separately in gameclient.
2023-07-20 21:58:16 +02:00
ChillerDragon 1c023772f3 Init variables used by goto_switch and goto_tele 2023-07-20 20:26:15 +02:00
marmare314 972fc717a6 keep selection when moving layers fixes #6787 2023-07-19 15:24:00 +02:00
marmare314 c9bd00b2ec make all quadpoints selectable with boxselect 2023-07-19 13:20:42 +02:00
heinrich5991 27b812287e
Merge pull request #6871 from Robyt3/UI-LastActiveItem-Cleanup
Remove usages of `CUI::LastActiveItem`
2023-07-19 10:54:07 +00:00
Robert Müller 3991d19966
Merge pull request #6887 from ChillerDragon/pr_goto_switch_tele
Add ``goto_switch`` and ``goto_tele``
2023-07-18 17:18:00 +00:00
ChillerDragon fb8d2a18d5 Add `goto_switch and goto_tele`
Set the clients view to a given teleporter or switch number
2023-07-18 14:34:51 +02:00
Robert Müller 6ee3928665 Fix ingame animations not using correct envelope points anymore
Add `CMapBasedEnvelopePointAccess::SetPointsRange` function so the start point and number of points that should be considered when using this envelope point storage can be configured. In the editor, this range always includes all points, as each envelope directly stores only its own points, so animations were rendered correctly there. However, all points are stored in one array when loading them from the map file (i.e. when rendering the map ingame), so the start point and number of points specified for the envelopes have to be considered when accessing their envelope points.

Closes #6886.
2023-07-18 12:43:31 +02:00
Robert Müller 47f4f21266 Remove usages of CUI::LastActiveItem
Use `CLineInput::GetActiveInput` and `CLineInput::IsActive` instead for consistency.

The last active item pointer is now only tracked internally in `CUI` to deactivate the active line input when it's no longer used in the UI.
2023-07-16 20:49:03 +02:00
Robert Müller 8abf9a7549 Use temporary file when saving editor map
Write the map to a temporary file first. When the map was saved to the temporary file successfully, first delete the existing map file having the real filename, then rename the temporary file to the real filename.

If deleting or renaming fails, show an error message popup and log an error message to the console.

The implementation is consistent with the way temporary files are utilized by Microsoft Word, so this should work on Windows.

See: https://support.microsoft.com/en-us/topic/description-of-how-word-creates-temporary-files-66b112fb-d2c0-8f40-a0be-70a367cc4c85

Different from #4482, this first deletes the old map file before renaming the temporary file. Although it appears that renaming a file would also override the target file, it could be that this does not work on all systems. Additionally, this adds descriptive error messages in the cases of failure.

Closes #4476.

Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2023-07-16 20:26:11 +02:00
Robert Müller a7f29568a2 Rename variable df to Writer 2023-07-16 19:26:01 +02:00
heinrich5991 9c0c7550ba Don't support loading RGB images ingame
They're essentially unused and not supporting them ingame probably
allows to keep that part of the map format unused.

See https://github.com/ddnet/ddnet/pull/5737#issuecomment-1538284956 or
https://github.com/teeworlds/teeworlds/issues/2812.
2023-07-16 15:26:00 +02:00
Dennis Felsing 8d12bceae4
Merge pull request #5737 from Robyt3/Map-Format-Port
Support bezier envelope curves in maps and editor, forward compatiblity for upstream map item changes
2023-07-16 12:27:10 +00:00
Robert Müller 1acb94ffbf Use lambdas for editor index modify and sort functions
For cleaner code with less global state variables.
2023-07-16 13:29:48 +02:00
Robert Müller 54df98be37 Support loading CMapItemImage version 2
This map item version adds the `m_Format` field, which specifies the image format for embedded images. The default value is `CImageInfo::FORMAT_RGBA` for map items of the previous version.
2023-07-16 12:46:34 +02:00
Robert Müller 4ae0928b47 Support bezier envelope curves in maps and editor
Port map and editor support for `CURVETYPE_BEZIER` from upstream, i.e. support bezier curves with configurable in- and out-tangents for every envelope point.

The in- and out-tangents are represented by triangles and can be dragged in the envelope editor like the envelope points.

Support reading and writing the bezier information as a separate UUID-based map item. If the bezier information is not found, bezier will default to linear behavior. Old clients will still be able to read the new maps and ignore the unknown map item. The unknown curvetype will also be handled as linear by old clients.

Allow reading upstream maps that use `CMapItemEnvelope` version 3. On upstream, a different struct is used to store all envelope points including bezier information, which broke compatibility to old clients.

Fix holding Ctrl for slow envelope point editing not working for vertical movement.

Highlight the currently selected element (envelope point or bezier tangent marker) which is being used with the value/time edit boxes.

Hide the value/time edit boxes when no element is selected.
2023-07-16 12:46:34 +02:00
Robert Müller 32f2fe936a Extract CMap::ExtractTiles with more validation
To reduce duplicate code and to add validation for tile skip everywhere.

Add separate `CMapItemLayerTilemap::TILE_SKIP_MIN_VERSION` constant and change `CMapItemVersion::CURRENT_VERSION` back to the previous version, as maps with tile skip can be loaded but skip is not used when saving.
2023-07-16 12:46:33 +02:00
Robert Müller a92ab45c3c Also support loading maps with tilemap skip in front layer 2023-07-16 12:46:33 +02:00
oy 9c4b0c03b4 Finished skip tile based map loading 2023-07-16 12:46:33 +02:00
oy 19d78b9f40 Made client/server check for correct map version on load 2023-07-16 12:46:32 +02:00
devdenn 7f100e2620 Fix bug, increase dump_log max seconds to 10min 2023-07-15 14:57:12 +00:00
Robert Müller 53fad543c0 Fix editor modified state not updated for server settings changes
Closes #6856.
2023-07-15 10:10:26 +00:00
Robert Müller 9788763ce8 Use member instead of static variables in CGameClient 2023-07-15 10:09:18 +00:00
Robert Müller ba94727a8d Use member instead of static variables for confirm popup buttons
Otherwise this would cause issues when showing multiple confirm popups at the same time.
2023-07-15 10:08:05 +00:00
Robert Müller dd06e9ae1c Initially keep server list scrolled to the top
When first launching the client, keep the server list scrolled to the top instead of scrolling to the selected server.

Closes #6845.
2023-07-15 09:30:54 +00:00
Robert Müller cfdc696315 Delay "Ingame moved" warning in editor
Delay showing the warning for ingame movement until the player has stopped moving while the editor is open, so the warning doesn't show immediately when the player performs an action (like jumping) and opens the editor shortly after.

Closes #6852.
2023-07-14 22:34:33 +00:00
Robert Müller 65a64b6fc4 Fix server browser filter highlighting of non-ASCII text
By calculating the correct length of the string matched in the haystack using the added `end` parameter of `str_utf8_find_nocase`.

Closes #6850.
2023-07-14 17:18:21 +00:00
marmare314 974255b3ea fix quadpoint moving on selection 2023-07-14 07:49:16 +02:00
bors[bot] fc6bf6545b
Merge #6824
6824: Improve Multi-View UX r=Robyt3 a=Vy0x2

- [x] You can now see who you are spectating in the spectator menu and even add/remove people from it (left mouse button)
- [x] Teleports are now being processed slower (more smoothly)
- [x] Workaround for starting multi-view from free-view (chooses now the nearest player to be the focus)
- [x] Added two more important variables to be able to customize it for specific scenarios (youtubers)

before:
![screenshot_2023-07-09_18-34-29](https://github.com/ddnet/ddnet/assets/24738662/a2ff8b77-c626-4ac2-b200-1eea70f85213)
after:
![screenshot_2023-07-09_18-32-49](https://github.com/ddnet/ddnet/assets/24738662/a54f0b06-b228-43ac-a1fc-eab95e7d9c20)

Edit: Thats the feedback i got from people. Hope its okay.

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: devdenn <denispaul43@gmail.com>
2023-07-13 20:52:43 +00:00
devdenn 3f201a45e7 Improve Multi-View UX
keep a bit more care with who we choose to spectate when frozen
only show active team as clickable in the spec menu
enable switchting teams in Multi-View by closing the spec menu
make the whole spectator menu clickablefix naming
twerk symbols a bit
remove unused ui
add more multi-view variables
add slow acceleration when teleported, add indication in spec menu
make players clickable in spectator menu
change focus with the spectator menu
2023-07-13 18:10:34 +02:00
VoxelDoesCode 36d8dd587c Send KillMsg for started + unlocked teams 2023-07-13 11:39:07 -04:00
bors[bot] 8d9843d934
Merge #6840
6840: Fix enter not working in server browser when no server selected, fix enter not working in editor save dialog when no map selected r=def- a=Robyt3


## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-07-13 13:26:25 +00:00
Robert Müller 71ed093b9e Fix enter not working in editor save dialog when no map selected 2023-07-13 14:19:15 +02:00
Robert Müller 8fad911b8b Fix enter not working in server browser when no server selected 2023-07-13 14:19:00 +02:00
Robert Müller 6cfdbd9986 Handle editor input events in OnUpdate instead of OnRender
To make input handling consistent with the gameclient. Also skip input events that are not valid, same as in the gameclient, as this otherwise causes input events to be handled multiple times.
2023-07-12 17:27:37 +02:00
Robert Müller da2da7b36f Fix editor hotkeys triggering while some editboxes are active
Replace `CEditor::m_EditBoxActive` which only works with editboxes created from the editor with `CLineInput::GetActiveInput` which also works for editboxes which are created by generic UI functions, e.g. the value selector editboxes of color pickers.
2023-07-12 17:27:22 +02:00
bors[bot] c8eae4c512
Merge #6834
6834: Support showing multiple different error messages in editor r=def- a=Robyt3

Previously the same message popup context was used for all error messages. While multiple message popups could be opened at the same time, the message would always be the same for all, as the same buffer was used for all popups.

This is fixed by creating and destroying the message popup contexts dynamically, so there can be any number of message popups with different messages. Additionally, if a popup with an identical message is already open, it will first be closed and then reopened at the new position, to prevent duplicate message popups.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-07-11 21:30:03 +00:00