Respect the intratick when displaying the player position, speed and angle, to fix this information always being shown for the next tick. See #6417. This does not resolve the issue yet, as there are more HUD and player elements that need to make use of the intratick.
Fix highlighted text of server browser entries not being refresh correctly when switching tabs.
This also reduces lag when switching tabs, as the UI elements for all tabs are now cached and don't need to be recreated when switching.
Regression from #7203.
Replace existing hard-coded support for two "networks" with support for a dynamic list of "communities" which are indexed by a string-ID, though right now the DDNet and KoG communities are still hard-coded. The communities now also support an arbitrary number of associated countries, types and servers. This is a refactoring to prepare for getting the list of communities dynamically from the server and removing the DDNet and KoG tabs from the serverbrowser.
New UI elements were being created for every server info after refreshing the server list. At the same time, old UI elements were not being deleted when the server info objects are deleted. The use of `mutable` for this purpose was also rather unclean.
Now, a separate `std::vector` of UI elements is kept for all server browser entries, instead of associating the UI elements directly with the server info.
Move the "Filter", "Info" and "Friends" tabs to the top, above the tab content. Use icons instead of text for the tabs. Use animator to animate the tabs on mouse-over. Closes#6613.
Make spacings, corners and font sizes used in the filter, details and friends tabs more consistent.
Remove some unnecessary dark UI rect backgrounds.
Improve alignment of the number of friends with the heart icon for entries in the server list.
Improve layout of countries and types filters. Make the filters scrollable when there are many entries.
Refactor most of the server browser in preparation for replacing the DDNet and KoG tabs with a community filter, which will work like the countries and types filters. Split rendering of different server browser sections into multiple functions to improve readability. Reduce duplicate code for the countries and types filters.
Remove `Is` from the getter names for the same reason that removing `Get` from the name is preferred. The word `Is` was inconsistently used as a prefix in `CScrollRegion` but as an infix in `CListBox`.
- Remove unnecessary variable `Page`.
- Use `IGraphics::CORNER_NONE` instead of `0` and instead of the inconsistent-looking `CORNER_BR` for the KoG-button.
- Simplify UI rect layout.
The world tuning is a part of the world. This way the entities implementation
use the same API as available on the client side.
This change is a step toward unified/shared world logic for client and server.
Make the skipping duration adjustable with a dropdown menu. The dropdown menu includes the durations 1s, 5s, 10s, 30s, 1m, 5m and 10m. The default duration is 5s. Skipping durations longer than the current demo are not shown. The dropdown menu is only shown if two or more durations would be shown.
Add buttons for skipping the duration, which was previously only possible with the hotkeys.
Add Ctrl+Left/Right hotkeys for skipping to chapters.
Add Shift+Left/Right hotkeys for adjusting the skipping time.
The Left/Right arrow keys and the J/L keys work identically for all hotkeys now.
Ignore ctrl, shift and alt keys for demo speed changes with the mouse wheel, to better support actions like zooming being bound to alt+mousewheel etc.
Also handle keypad enter key for play/pause like the normal return key.
Use arrow up/down icon for speed adjustment buttons, so that the "backward/forward" icons can be used for duration skipping instead.
Closes#7064.
The DDTeam colors were previously generated in HSL by taking the team index and multiplying it by 360/64° to calculate the hue, which results in team colors being evenly distributed over the entire color range like a rainbow. However, this causes colors of adjacent teams to be very similar and therefore hard to distinguish.
Now, the hue is calculated by multiplying the team index with the golden angle (~137.50776°) and taking the modulo 360° of that. Due to the properties of the golden angle, this can generate never repeating sequences of unique colors where the adjacent colors are very distinct.
Duplicate code is reduced by adding the `CGameClient::GetDDTeamColor` function.
Reduce the space reserved for the label by the space for the dropdown icon instead of rendering the label behind the icon.
This is more noticeable with smaller dropdown menu buttons, which will be used in the future.
1. Regardless of the pause the message is CL_SETTEAM and there is no
reason to match it against other messages.
2. Another implementation can save the wanted team and apply it later.
When the buffer of a lineinput is modified externally, the cursor offset and selection are not updated, which causes them to be rendered wrong and also causes the assertion error "Selection and cursor offset got desynchronized" when changing the selection of a lineinput.
Check if maximum number of lines has been reached before starting a new line, to prevent the text cursor from reporting the wrong number of lines and text height in that case.
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.
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.
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.
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.
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.
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.
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.
The log message is otherwise shown multiple times when starting the client.
Now it's only shown when the `record` command is used manually, i.e. not for automatically recorded demos anymore.
When the text cursor/selection mode is set to calculate, values of `-1` are used when the selection is empty. These values were not being handled anymore due to a regression from #7028. This was causing the selection to be set to the last position instead, which was causing text to subsequently be inserted there instead of at the cursor position.
An assertion is added to ensure that the selection cannot be desynchronized from the cursor position anymore.
Closes#7099.
CGameClient::OnPredict() says "don't predict anything if we are paused"
and yet we predict different stuff based on CGameClient::Predict() result
which leads to flickering here and there (e.g. for projectiles and characters).
Render a pause/play icon in the center of the screen when pausing/unpausing while the menu is not active.
The icon fades in and out over 0.5 seconds and slightly increases in size over that time.
When starting demo rendering with initial pause, the pause indicator is rendered continuous until playback is first started, to ensure that the initial pause state is communicated clearly to the user. The initial pause indicator is not included in the rendered demo, but pausing and unpausing later during demo rendering will cause it to be included in the video, same as other UI elements. Closes#7044.
The config variable `cl_demo_show_pause` (`0/1`, default `1`) is added to hide the pause indicator entirely, for example to render a demo with multiple pauses without the indicator.
The pause indicator and also the existing speed indicator are not rendered (anymore) while the menu is active, as the menu already contains this information.