Commit graph

16978 commits

Author SHA1 Message Date
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] a85941ed27
Merge #6669
6669: Remove inp_mouseold config r=def- a=Jupeyy

Because it causes trouble with [newer SDL2 versions](https://github.com/libsdl-org/SDL/issues/7159)

Probably is also easier if we don't have to debug this, it's a hack anyway (teleporting the cursor).

## 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: Jupeyy <jupjopjap@gmail.com>
2023-05-26 21:22:24 +00: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
bors[bot] 8a3d7eeb98
Merge #6667
6667: Add `inp_ime_native_ui` to toggle native IME UI on Windows r=def- a=Robyt3

Add `inp_ime_native_ui` on Windows to use native IME UI instead of rendering the candidate list in the client.

Always set the SDL hint to use native UI on non-Windows, as we cannot determine the list of candidates on those systems.

## 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 15:14:12 +00:00
Robert Müller 448a39768b Add inp_ime_native_ui to toggle native IME UI on Windows
Add `inp_ime_native_ui` on Windows to use native IME UI instead of rendering the candidate list in the client.

Always set the SDL hint to use native UI on non-Windows, as we cannot determine the list of candidates on those systems.
2023-05-26 15:39:28 +02:00
Dennis Felsing a5332f0b11 Version 17.0 2023-05-25 12:09:12 +02:00
bors[bot] b960b35145
Merge #6664
6664: Update traditional_chinese.txt r=def- a=Cheeser0613

<!-- 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: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2023-05-25 07:37:30 +00:00
Cheeser0613 e806710a99
Update traditional_chinese.txt 2023-05-25 15:03:10 +08:00
bors[bot] 495a0c7bbe
Merge #6661
6661: Remove `snd_rate` and `cl_threadsoundloading` from settings menu, enable threaded sound loading per default again, set minimum/maximum values for `snd_rate` r=def- a=Robyt3

Before:
![screenshot_2023-05-24_21-22-53](https://github.com/ddnet/ddnet/assets/23437060/32764f2d-6e77-4066-8e8d-df9361a75dad)

After:
![screenshot_2023-05-24_21-22-29](https://github.com/ddnet/ddnet/assets/23437060/b92be9c6-75dc-4cdc-8883-c993dcac1f42)

## 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-24 20:02:42 +00: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
Robert Müller 460cda85d7 Set minimum/maximum values for snd_rate
Hopefully prevent crashes that some users are experiencing when using very unreasonable `snd_rate` values.
2023-05-24 21:12:43 +02:00
Robert Müller fd0e9b18b4 Remove unused snd_device config variable 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
bors[bot] c64f524b3f
Merge #6658
6658: Fix incorrect swapping with draggers r=def- a=Robyt3

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.

## 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-24 16:21:25 +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
bors[bot] fa2e7ca7f6
Merge #6651
6651: Fix swapping with dragger beams (fixes #6597) r=Robyt3 a=def-

## 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-23 15:54:06 +00:00
bors[bot] 77ef437c23
Merge #6652
6652: Update spanish.txt r=def- a=n0Ketchp

<!-- 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: noKetchup <93238471+n0Ketchp@users.noreply.github.com>
2023-05-23 07:59:24 +00:00
noKetchup 40357e4510
Update spanish.txt 2023-05-22 19:54:50 -04:00
Dennis Felsing bdc916faa9 Fix swapping with dragger beams (fixes #6597) 2023-05-23 00:42:04 +02:00
bors[bot] bf7469f327
Merge #6649
6649: Replace country server filter fullscreen popup with smaller popup, minor improvements of server filter UI r=def- a=Robyt3

- Filter:
  - Before:
![browser old](https://github.com/ddnet/ddnet/assets/23437060/e6025edc-7cc9-4aef-b7b5-cbf3f6334516)
  - After:
![browser new](https://github.com/ddnet/ddnet/assets/23437060/0cd85424-3d54-4283-9e99-02f211557190)
- Popup:
   - Before:
![popup old](https://github.com/ddnet/ddnet/assets/23437060/f6b6c040-4379-40bb-aef0-8e39db8c4307)
   - After:
![popup new](https://github.com/ddnet/ddnet/assets/23437060/ca4d76e8-0b5d-44b3-aab4-8ef8aae272ca)


## 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-22 21:32:13 +00: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
bors[bot] 43c1b485c3
Merge #6646
6646: fix time score info on server detail r=heinrich5991 a=edg-l

fixes #6638 

## 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: Edgar Luque <git@edgarluque.com>
2023-05-22 15:43:22 +00: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
bors[bot] 8298e67790
Merge #6627 #6635
6627: Fixes for Russian and Ukrainian (by StormA) r=def- a=def-

<!-- 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)


6635: Update french translations (by Sukya) r=def- a=def-

`@snailx3` `@Chairn` anyone want to review?

## 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-21 21:34:05 +00:00
bors[bot] d876fbcbca
Merge #6645
6645: Use different color for offline clanmates in friends list r=def- a=Robyt3

Closes #6643.

![purple-background](https://github.com/ddnet/ddnet/assets/23437060/25efbbd9-50f7-4d1f-b904-2f4bba75e2ce)

## 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-21 21:06:34 +00:00
Tarun Samanta 79d8928a03 made requested changes 2023-05-22 01:51:13 +05:30