Commit graph

20333 commits

Author SHA1 Message Date
Dennis Felsing be2e49e1f6
Merge pull request #8801 from Robyt3/Client-Touch-Input-Emote-Spectate
Add touch support to emoticon selector and spectator menu, minor refactoring
2024-08-24 15:05:18 +00:00
Dennis Felsing 4786419fee
Merge pull request #8802 from Robyt3/Android-Building-Small-Fixes
Minor improvements to Android building
2024-08-24 15:05:16 +00:00
Robert Müller 24356bd029 Set debuggable flag in Gradle debug build
So the debug build of the app can be debugged.
2024-08-24 13:44:52 +02:00
Robert Müller e46d2375ba Add note to Android README about using stable rust version 2024-08-24 13:44:47 +02:00
Robert Müller 9b90588ccc Pin curl version to 8.8.0 for Android to fix library building 2024-08-24 13:44:40 +02:00
Dennis Felsing e9a9261d1e
Merge pull request #8799 from Robyt3/Client-Menu-Ingame-Margin-Fix
Fix inconsistent margin in ingame menu, minor refactoring
2024-08-24 11:26:18 +00:00
Robert Müller ed9720f1be Minor refactoring of emoticon selector rendering
- Extract variable `ScreenCenter`.
- Rename variables `i` to `Emote`.
- Move variable declarations closer to their usages.
2024-08-24 13:23:23 +02:00
Robert Müller 3bda76ff1f Add touch support to emoticon selector and spectator menu
Support using emoticon selector and spectator menu with touch inputs. Touching in the emoticon selector activates the selected (eye) emote and closes the emoticon selector. The spectator menu is kept open when using it for more convenience. The emoticon selector and spectator menu can be closed by touching anywhere outside of them.

Additionally, the emoticon selector and specator menu can now be closed by pressing the Escape key (i.e. the back button on Android). This made it necessary to change the order of the components for input handling, so the ingame menu will handle the Escape key after the emoticon selector and spectator menu. This also means that the Escape key can now be used to close the selector/menu when they are stuck open, which was previously delayed until ingame menu or console were opened and closed.
2024-08-24 13:21:58 +02:00
Robert Müller 93675799e8 Fix inconsistent margin in ingame menu, minor refactoring
The additional margin left of the Spectate and Join game buttons is unnecessary.

Avoid reusing `s_SpectateButton` variable for different buttons.

Use `TEAM_RED` instead of `0` when joining game in non-team server.
2024-08-24 12:21:23 +02:00
Dennis Felsing 3cf3e2339d
Merge pull request #8796 from ZucchiniEnjoyer/update-belarusian-18.4
Update belarusian translation for 18.4
2024-08-23 22:00:10 +00:00
Pavukoplov 7ee735a274 Update belarusian translation for 18.4 2024-08-24 00:03:29 +03:00
Dennis Felsing 5dff5e9e81
Merge pull request #8795 from furo321/cjsonwriter-master
Use `CJsonWriter` for creating server info JSON
2024-08-23 18:25:44 +00:00
furo f897af8dbb Use CJsonWriter for creating server info JSON 2024-08-23 20:07:11 +02:00
Dennis Felsing 96beaf2eca
Merge pull request #8793 from furo321/proof-borders-desc
Improve "Proof borders" description
2024-08-23 17:52:11 +00:00
Dennis Felsing b1914e972a
Merge pull request #8794 from furo321/fix-team0mode-bug
Don't keep `m_DDRaceState` and `m_StartTime` of teammate in team0mode after death
2024-08-23 17:12:09 +00:00
furo b9a794121a Don't keep m_DDRaceState and m_StartTime of teammate in team0mode after death 2024-08-23 18:40:15 +02:00
furo a01e5e7151 Improve "Proof borders" description 2024-08-23 17:06:59 +02:00
Dennis Felsing 37fd57ccb8
Merge pull request #8791 from ChillerDragon/pr_censor_save_code_fix
Fix save code not being censored in streamer mode
2024-08-23 11:39:36 +00:00
ChillerDragon 56b56ef2b9 Fix save code not being censored in streamer mode
Closed #8790
2024-08-23 19:20:15 +08:00
Dennis Felsing 0013615da1
Merge pull request #8789 from Robyt3/Client-UI-Convenience
Add `CUIRect::TopLeft` and `Size` convenience functions
2024-08-22 22:43:59 +00:00
Robert Müller 4d09332b83 Add CUIRect::TopLeft and Size convenience functions 2024-08-22 21:52:27 +02:00
Dennis Felsing e81a561702
Merge pull request #8787 from lolipodass/patch-9
Update russian.txt to match wiki
2024-08-22 18:14:06 +00:00
lolipodass a3c8949d40
Update russian.txt to match wiki
fix names like in https://wiki.ddnet.org/wiki/Dummy/ru
and https://wiki.ddnet.org/wiki/Common_Terminology/ru#Тии
2024-08-22 20:55:40 +03:00
Dennis Felsing 0ba6d998a4
Merge pull request #8786 from ChillerDragon/pr_fix_doubled_06_sounds
Fix sounds being doubled in 0.6
2024-08-22 12:00:06 +00:00
ChillerDragon 804a91ced0 Fix sounds being doubled in 0.6
Closed #8785
2024-08-22 19:41:14 +08:00
Dennis Felsing 5210d77f92
Merge pull request #8781 from def-/pr-fix
Disallow save with draggers
2024-08-22 09:38:46 +00:00
Dennis Felsing f796309cc8 Fix save/swap with draggers 2024-08-22 00:47:06 +02:00
Jupeyy fe9c2d305f
Merge pull request #8784 from Robyt3/Android-Backbutton-Handling-Revert
Revert "Quit if Android back-button is pressed 3 times within 1 second"
2024-08-21 17:54:23 +00:00
Robert Müller 499ad48ee6 Revert "Quit if Android back-button is pressed 3 times within 1 second"
This reverts commit 91848f0be6.

This was prone to accidental usage. The user interface is now usable with touch input, so this additional method to quickly and cleanly quit the game is not necessary anymore.
2024-08-21 19:30:59 +02:00
Dennis Felsing 4dc7346b4f
Merge pull request #8783 from Robyt3/Menus-Skin-ColorPicker-Cleanup
Use HSLA scrollbar color picker for 0.7 tee settings, refactor HSLA scrollbar color picker rendering
2024-08-21 17:10:27 +00:00
Robert Müller 992f235f05 Use HSLA scrollbar color picker for 0.7 tee settings
Use the same HSLA scrollbar color picker for the 0.7 tee settings as for the 0.6 tee settings. Use the correct darkest lighting value for 0.7 skin color pickers instead of not clamping the lighting value in the color picker.
2024-08-21 18:05:51 +02:00
Robert Müller ce0e52851c Refactor CSkins7::GetColor function
Use existing color constructor to conditionally unpack the alpha component instead of doing this separately.

Make `DARKEST_COLOR_LGT` a `float` constant instead of using an `enum` to simplify the usage.
2024-08-21 17:57:56 +02:00
Robert Müller abf8fac568 Refactor HSLA scrollbar color picker rendering
Rename `CMenus::RenderHSLScrollbars` function to `RenderHslaScrollbars`.

Pass darkest light value as `float` to the `RenderHslaScrollbars` function to add support for different values, instead of enabling the clamping with a `bool` parameter. Previously, this parameter was always set to `true`, as this type of color picker is only used for skins.

Remove unnecessarily complicated code for rendering unclamped lighting scrollbar. The code can be simplified by considering the darkest lighting value as a variable.

Let the `RenderHslaScrollbars` function return `true` if the color was changed to simplify the usage. The function previously returned the color but this value was unused.

Use `IGraphics::SetColor4` function instead of `IGraphics::SetColorVertex` when possible. Rename variables `Array` to `aColorVertices`. Use `std::size` instead of hard-coding array sizes.
2024-08-21 17:57:56 +02:00
Robert Müller 01d2b3e3bc Highlight hovered and active color picker scrollbar handle
Add visual feedback to color picker scrollbar handle being hovered and active.
2024-08-21 17:57:56 +02:00
Dennis Felsing db9b5f5b61
Merge pull request #8782 from ChillerDragon/pr_fix_sixup_sounds
Fix sixup sounds
2024-08-21 15:07:33 +00:00
ChillerDragon dcd1fefa7e Never send sounds to sixup that are played on the client side
Closed #2523
2024-08-21 22:02:39 +08:00
ChillerDragon 00b9eab2ce Rename CHAT_SIX/SEVEN to more generic FLAG_SIX/SEVEN 2024-08-21 21:33:34 +08:00
Dennis Felsing 1ebfe269aa
Merge pull request #8780 from ChillerDragon/pr_ed_fix_prop_clamp
Fix editor properties not being clamped on + and - button click
2024-08-21 13:10:34 +00:00
ChillerDragon 99ae72c143 Fix editor properties not being clamped on + and - button click
Closed #8778
2024-08-21 19:48:10 +08:00
Dennis Felsing 54271aef2a
Merge pull request #8776 from Robyt3/Base-Semaphore-macOS-Unique-Name
Make macOS semaphore names more unique, improve assertion
2024-08-20 18:50:17 +00:00
Robert Müller 839c511af4 Make macOS semaphore names more unique, improve assertion
On macOS, semaphore names are global and processes can open semaphores of other processes by using their name. It was possible that multiple client/server processes randomly tried to create semaphores with the same memory address, which would cause them to have the same name. In that case, `sem_open` would fail because `O_EXCL` prevents creating semaphores if the name is already used.

This is made more unlikely by also including the PID in the semaphore name. Additionally, the semaphore name is prefixed with `/` to more closely follow the construction rules for semaphore names. In particular, the behavior is implementation-defined if the name is not prefixed with a slash.

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_open.html

Closes #8773.

More details are added to the assertion error message in case this does not end up fixing the issue.
2024-08-20 20:25:56 +02:00
Dennis Felsing 580b2690a0
Merge pull request #8774 from heinrich5991/pr_ddnet_no_ban_vpn
Don't show "you've been banned" for VPN bans
2024-08-20 15:32:59 +00:00
heinrich5991 87aa251d73 Don't show "you've been banned" for VPN bans
Players are supposed to turn of their VPN or complain to the admins if
they get banned for using a VPN. Calling this "banned" seems to be
confusing, as players ask for an unban even after they turned off the
VPN.
2024-08-20 16:51:37 +02:00
Dennis Felsing 238e7495d2
Merge pull request #8771 from SoulyVEVO/pr_07_fix_feet_offset
fix 0.7 feet offset
2024-08-20 07:22:17 +00:00
Robert Müller 30f49201e5
Merge pull request #8764 from ChillerDragon/pr_cfgcol_07_marking
Use color type for 0.7 marking configs
2024-08-20 05:53:33 +00:00
ChillerDragon ef2db30bef Make 0.7 skin color variables unsigned to get rid of the casts 2024-08-20 11:49:04 +08:00
ChillerDragon 15713d7859 Use color type for 0.7 marking configs 2024-08-20 11:23:26 +08:00
Dennis Felsing 1dd2f3a4af
Merge pull request #8772 from Robyt3/Client-Input-Clipboard-String
Use `std::string` for `IInput::GetClipboardText`
2024-08-19 17:25:43 +00:00
Robert Müller 40fbc2140b Use std::string for IInput::GetClipboardText
Simplify clipboard handling by returning an `std::string` and freeing the string returned by SDL immediately, so the clipboard data does not stay in memory unnecessarily after the clipboard has been used until the clipboard data is requested again.

Fix possible TOCTOU when pasting from the clipboard into a lineinput, due to the clipboard data being requested twice.
2024-08-19 19:03:49 +02:00
Souly 4fb3027bd7
fix 0.7 feet offset
fix 0.7 feet offset
2024-08-19 15:34:44 +02:00