Commit graph

9184 commits

Author SHA1 Message Date
bors[bot] d433a2fd1d
Merge #6677
6677: Use icons for refresh and connect buttons, refactor `DoButtonMenu` r=def- a=Robyt3

Use less space for refresh and connect buttons to improve layout with 5:4 and 4:3 resolutions. Closes #5605. Closes #5878.

The "Refreshing..." text is replaced with combined refresh and ellipsis icons.

Alpha and saturation of the green color of the connect button are increased.

Move `CMenus::DoButtonMenu` to `CUI::DoButton_Menu`. Simplify usage by adding `SMenuButtonProperties` parameter object for all optional arguments. Remove unused `ColorHot` parameter.

Screenshots:
- Before:
![screenshot_2023-05-27_19-52-37](https://github.com/ddnet/ddnet/assets/23437060/3bf27f53-b034-4147-97ee-5c24a5b68457)
- After:
![screenshot_2023-05-27_19-51-07](https://github.com/ddnet/ddnet/assets/23437060/702a9c1c-be07-4cd6-94b5-b4b0fd9b4fa1)
- After (when refreshing):
![screenshot_2023-05-27_19-56-15](https://github.com/ddnet/ddnet/assets/23437060/0a456467-6550-4ce7-b756-56e3bbbc4f43)


## Checklist

- [x] Tested the change ingame
- [x] 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-05-27 19:53:09 +00:00
Dennis Felsing 7cdc92859e Version 17.0.1 2023-05-27 21:27:35 +02:00
Robert Müller 08e0a87ff1 Use icons for refresh and connect buttons, refactor DoButtonMenu
Use less space for refresh and connect buttons to improve layout with 5:4 and 4:3 resolutions. Closes #5605. Closes #5878.

The "Refreshing..." text is replaced with combined refresh and ellipsis icons.

Alpha and saturation of the green color of the connect button are increased.

Move `CMenus::DoButtonMenu` to `CUI::DoButton_Menu`. Simplify usage by adding `SMenuButtonProperties` parameter object for all optional arguments. Remove unused `ColorHot` parameter.
2023-05-27 19:48:32 +02:00
Jupeyy fe20459138 Clear Victim Team render info on skin changes 2023-05-27 09:10:39 +02:00
bors[bot] 144bb1dd7f
Merge #6671
6671: Ensure line inputs are deactivated when they are not rendered r=def- a=Robyt3

Check if the active line input was not rendered and deactivate it in that case.

This can happen e.g. when an input in the ingame menu is active and the menu is closed or when switching between menu and editor with an active input.

This was causing the IME candidate list to be rendered ingame after closing the menu. Closes #6666.

## 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-05-26 22:26:18 +00:00
Robert Müller 71c56f1e70 Ensure line inputs are deactivated when they are not rendered
Check if the active line input was not rendered and deactivate it in that case.

This can happen e.g. when an input in the ingame menu is active and the menu is closed or when switching between menu and editor with an active input.

This was causing the IME candidate list to be rendered ingame after closing the menu. Closes #6666.
2023-05-26 23:58:04 +02:00
bors[bot] 4070a9587a
Merge #6670
6670: Delete selection with backspace/delete regardless of word mode r=def- a=Robyt3

Also delete the lineinput selection when pressing backspace/delete and the key for skipping words (Ctrl/GUI key, Alt on macOS) is held. This is consistent with the behavior in other applications.

## 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-05-26 21:46:52 +00:00
Robert Müller b0c4d3fcde Delete selection with backspace/delete regardless of word mode
Also delete the lineinput selection when pressing backspace/delete and the key for skipping words (Ctrl/GUI key, Alt on macOS) is held. This is consistent with the behavior in other applications.
2023-05-26 23:32:17 +02:00
Jupeyy 52d61244cd Remove inp_mouseold config
Because it causes trouble with newer SDL2 versions
`https://github.com/libsdl-org/SDL/issues/7159`
2023-05-26 22:44:32 +02:00
Dennis Felsing a5332f0b11 Version 17.0 2023-05-25 12:09:12 +02:00
Robert Müller 34b66d2107 Pass nullptr instead of unused UI rect 2023-05-24 21:16:13 +02:00
Robert Müller 60ac3b3d48 Remove settings checkbox for cl_threadsoundloading
The default value `1` should be fine for most users and this setting is not likely to be changed very often, so it doesn't need a checkbox in the settings menu.
2023-05-24 21:12:44 +02:00
Robert Müller b5637df2bf Enable threaded sound loading per default again
Change `cl_threadsoundloading` default to `1` again. The default was previously set to `0` in 1287cc3f20 because the setting may have caused crashes. Now that `mem_alloc` is replaced with `malloc` and therefore thread-safe we can enable this setting again per default.
2023-05-24 21:12:43 +02:00
Robert Müller 70b5e4b5bd Remove settings edit box for snd_rate
The default setting `48000` should be fine for the majority of the users so it's not necessary to be able to change this in the settings menu.
2023-05-24 21:12:43 +02:00
bors[bot] 03a5dde418
Merge #6639
6639: Fix- Replaced usage of m_ProofBorders and m_MenuProofBorders with enum EProofBorder r=Robyt3 a=tarunsamanta2k20

<!-- What is the motivation for the changes of this pull request? -->

Changes requested.
closes #6609 

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [x] Written a unit test (especially base/) or added coverage to integration test
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: Tarun Samanta <tarunsamanta77@gmail.com>
Co-authored-by: Tarun Samanta <55488549+tarunsamanta2k20@users.noreply.github.com>
2023-05-24 18:30:44 +00:00
Robert Müller ff51edec2d Fix incorrect swapping with draggers
There is another member variable `CDragger::m_aTargetIdInTeam` that contains for every team the client ID of the team member currently being dragged by this dragger.

The client IDs in this array also need to be swapped accordingly or the dragger will not switch target correctly when swapping.

Closes #5865.
2023-05-24 17:47:09 +02:00
bors[bot] 422ff844b8
Merge #6656
6656: Fix crash with super (fixes #6654) r=Learath2 a=def-

CClientMask has size MAX_CLIENTS, so it can't be used for super team

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] 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: Dennis Felsing <dennis@felsin9.de>
2023-05-24 12:04:25 +00:00
Dennis Felsing 3dd1d784d6 Fix crash with super (fixes #6654)
CClientMask has size MAX_CLIENTS, so it can't be used for super team
2023-05-24 13:34:38 +02:00
Tarun Samanta f982dd77c1 fixing linting issue 2023-05-24 01:27:57 +05:30
Tarun Samanta e8a33cfade fiing linting issue 2023-05-23 23:57:08 +05:30
Tarun Samanta 050bf4a9b8 Made sugested changes 2023-05-23 23:46:42 +05:30
Dennis Felsing bdc916faa9 Fix swapping with dragger beams (fixes #6597) 2023-05-23 00:42:04 +02:00
Robert Müller 23d8acd96c Replace country server filter fullscreen popup with smaller popup
Replace the large hard-coded popup to select the country for the server filter with a small overlay popup for better usability.
2023-05-22 20:32:15 +02:00
Robert Müller 83c19a1e96 Add highlight color when hovering country button of server filter 2023-05-22 20:32:15 +02:00
Robert Müller 4dcb80e462 Enable country button also when filter not enabled
Selecting a flag will also enable the filter in this case.
2023-05-22 20:32:14 +02:00
Robert Müller f16f77ce26 Slightly decrease size of country flag in server filter 2023-05-22 20:32:14 +02:00
Robert Müller 9be72db36a Remove unnecessary margin on left side of server filter
To improve layout. The "Filter connecting players" checkbox can now use the original font size without being resized.
2023-05-22 20:31:02 +02:00
Robert Müller 0d0f9ed232 Remove dead code 2023-05-22 20:31:02 +02:00
Robert Müller 59fafdbf4e Only activate server browser list box when no popup is open
To support popup menus over the server browser.
2023-05-22 20:30:06 +02:00
Tarun Samanta fcaab778ca modified some files as asked 2023-05-22 23:50:45 +05:30
Robert Müller e175c0a79f Remove duplicate enter hotkey used for connecting to server
The list box already takes care of the enter hotkey for connecting. Furthermore, the list box can be inactive, whereas the now removed hotkey was always active.

Minor refactoring of `DoButtonMenu` usage.
2023-05-22 20:09:33 +02:00
Robert Müller 808d604579 Propagate list box active state to underlying scroll region
Fix inactive list box still consuming mouse scroll events.
2023-05-22 20:09:32 +02:00
bors[bot] b2eacf7f09
Merge #6648
6648: Fix filling switch layer not setting switch number 0, clear unused switch/tele properties when filling selection r=def- a=Robyt3

Closes #5464.

## 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-05-22 17:25:35 +00:00
Robert Müller 6ca74ec39e Clear unused switch/tele properties when filling selection
Set switch number/delay/flags to 0 when unused for a specific tile.

Set tele number to 255 when unused for a specific tile.
2023-05-22 17:46:50 +02:00
Robert Müller d5e4597012 Fix filling switch layer not setting switch number 0
Closes #5464.
2023-05-22 17:46:50 +02:00
Robert Müller a068034e61 Extract duplicate expressions into variables 2023-05-22 17:46:50 +02:00
Edgar a4abc1fdd9
factor out scorekind backwards compat gametype check 2023-05-22 17:22:52 +02:00
Edgar 1d30462e50
clean time score handling, with positive time values 2023-05-22 16:36:46 +02:00
Tarun Samanta ef78e36c6f replaced second enum 2023-05-22 18:16:25 +05:30
Edgar 8a3d8fc53f
fix time score info on server detail 2023-05-22 13:53:23 +02:00
Tarun Samanta 79d8928a03 made requested changes 2023-05-22 01:51:13 +05:30
Robert Müller 1b6be5e10b Use different color for offline clanmates in friends list
Closes #6643.
2023-05-21 22:06:56 +02:00
Tarun Samanta e74c60d9a5 Modified some files 2023-05-22 00:56:23 +05:30
Tarun Samanta f23f74ee9e fixing some error 2023-05-21 22:42:53 +05:30
Tarun Samanta 61ef6210d1 Modifications in three files 2023-05-21 21:30:41 +05:30
Tarun Samanta 523a3c4450 fix- Replaced usage of m_ProofBorders and m_MenuProofBorders with enum EProofBorder 2023-05-21 14:47:27 +05:30
Robert Müller 68d2d466d5 Fix use of invalid text container index for finish message HUD 2023-05-20 19:20:48 +02:00
bors[bot] 4ab55bd722
Merge #6626 #6629
6626: Remove popup for unofficial servers r=Robyt3 a=def-

Via https://github.com/ddnet/ddnet/pull/6618/files#r1199072246

Thoughts?

## Checklist

- [ ] 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)


6629: Remove unused `CMenus::DoToolTip` declaration r=def- a=Robyt3



## Checklist

- [ ] 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: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-05-19 18:55:32 +00:00
Dennis Felsing 3593cce9b4 Revert "Add popup to confirm connecting to friend on non-official server"
This reverts commit 2e46460302.
2023-05-19 20:31:59 +02:00
Robert Müller 3d9d18c511 Remove unused CMenus::DoToolTip declaration 2023-05-19 19:40:46 +02:00