Support deleting and renaming folders in the demo browser. Only empty folders can be deleted.
Ensure only files and folders in the save directory can be deleted and renamed.
Also check if a folder with a demo rename/render filename already exists.
Fix broken `m_DemolistSelectedIsDir` checks by using `m_vDemos[m_DemolistSelectedIndex].m_IsDir` instead.
Append `.mp4` file extension only internally instead of appending it to the render filename lineinput, as this causes the file extension to appear when rendering doesn't start due an error message.
Use more efficient `FileExists` instead of `FindFile` to check if rendered demo video file already exists.
Change popup preconditions to assertions.
Show a short message below the existing chat mentions message that is shown in the top left area of the editor above the layers/images/sounds button when the player character is moved ingame while the editor is open. The messages are cleared when the editor is activated and when the client is disconnected.
Closes#1993.
6831: Fix copyright for kitty_x_ninja (fixes#6830) r=Robyt3 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)
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
6829: Perform sanity check and show errors when loading map in editor r=def- a=Robyt3
Add `CEditorMap::PerformSanityChecks` to perform additional sanity checks when loading a map in the editor.
In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers.
Closes#6519.
Error message popup when loading the map linked in the issue (loading goes through, but this popup message is shown):
![screenshot_2023-07-10_23-11-38](https://github.com/ddnet/ddnet/assets/23437060/21fbd1b3-88dc-4b59-a20c-113d5613efde)
## 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>
Add `CEditorMap::PerformSanityChecks` to perform additional sanity checks when loading a map in the editor.
In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers.
Closes#6519.
6827: Fix hook-through not being fully removed when filling selection r=def- a=Robyt3
Closes#6782.
## 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>
Use separate columns for icons and spacing like in the server browser.
Always show scrollbar for more consistent layout.
Show ellipsis if filename is too long, also for the filename shown in the demo player.
Hide number of markers and length if the demo is invalid.
6820: Improve demo (video) renderer UX r=def- a=Kaffeine
<!-- What is the motivation for the changes of this pull request? -->
In this MR I want to address three issues with video recorder:
1. A bug: if I start a rendering with 0.25x speed and click on 'Increase the speed' during the rendering, I expect to get the next speed (0.5x) but as the speed index is not set (kept default `4`), the speed is boosted to 1.25x.
2. Usecase: I want to adjust the camera (change position, decrease zoom, etc) for the demos and I don't want to use extra video editor to cut the first frames with the unwanted camera moves/setups from the demo. I came to a simple solution: start the rendering pre-paused to do the needed adjustments before anything is added to the video.
3. NotABug: All recorded video files have double `.demo.mp4` extension which is ugly.
Probably I have to change something to fit DDNet codebase. E.g. I don't know if `Localize("(paused)")` is acceptable here.
<!-- 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. -->
## Before
![image](https://github.com/ddnet/ddnet/assets/374839/7273dd5b-e3d1-4f73-87bd-e09493d106a0)
## After
![image](https://github.com/ddnet/ddnet/assets/374839/7d62028d-04bc-45af-babf-5a2e8cb243dc)
## 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: Alexander Akulich <akulichalexander@gmail.com>
6823: Mark `NETMSGTYPE_CL_STARTINFO` as `MSGFLAG_FLUSH` r=def- a=Robyt3
This makes the client connect to the server faster. It's especially noticeable on servers with a low ping.
Closes#6811.
## 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>
6822: Fix editor crashes with quad point and other popup menus r=def- a=Robyt3
Closes#6817.
## 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>
The targets of many popup menus become invalid when loading or creating a new map with the editor hotkeys, so all popup menus have to be closed in this case, otherwise this can cause crashes with several different popups.
6821: Revert `Наблюдение за` change r=def- a=gerdoe-jr
<!-- 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: Vlad <51330274+gerdoe-jr@users.noreply.github.com>
6663: New spectate mode (multiview) r=def- a=Vy0x2
<!-- What is the motivation for the changes of this pull request? -->
Adding a new spectator mode, that can spectate a team by moving the camera in the middle and zooming in/out
Works with team 0 or any team, but you have to work with it a bit to get used to it. I tried to make it as intuitive as possible.
Pr is as ready as it can get, please test it.
![screenshot_2023-06-30_19-17-42](https://github.com/ddnet/ddnet/assets/24738662/0446d568-d34b-4d14-8682-dd077f121e91)
Youtube video:<a href="http://www.youtube.com/watch?feature=player_embedded&v=7GM6DA3EYAI" target="_blank">
<img src="http://img.youtube.com/vi/7GM6DA3EYAI/maxresdefault.jpg" alt="Watch the video" width="192" height="108"/>
</a>
<!-- 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
- [ ] 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
- [ ] 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>
Co-authored-by: Vy0x2 <denispaul43@gmail.com>
6816: Fix editor crash when filling entities layer with empty brush r=def- a=Robyt3
The brush passed to `FillSelection` can be `nullptr` when the selection is empty.
Regression from #6648.
Closes#6815.
## 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
- [X] 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>
6814: Update Brazilian Portuguese translations r=def- a=rffontenelle
Can you squash it when merging?
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
6813: Try to fix#6773 again r=heinrich5991 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)
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
6812: Add Galician language (thanks to TormentaDeFacha and Mercadona) r=def- a=heinrich5991
## 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: heinrich5991 <heinrich5991@gmail.com>