Commit graph

8613 commits

Author SHA1 Message Date
VoxelDoesCode 5915d5531d Laser menu tweaks; Changed Freeze laser color 2022-09-16 18:28:36 -04:00
Dennis Felsing fece84c892 Add Voxel to contributors 2022-09-16 13:14:41 +02:00
Dennis Felsing 3e93f3ac8a Version 16.4 2022-09-16 13:07:36 +02:00
VoxelDoesCode fb15a7c2a4 Running and AFK anim. states 2022-09-16 12:30:05 +02:00
bors[bot] 68e2f51280
Merge #5756
5756: Editor: added a goto button r=heinrich5991 a=archimede67

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

This feature was also suggested by Pulsar. It adds a button to go to a specified coordinate point by inputting x and y coordinates through a popup window:

![image](https://user-images.githubusercontent.com/13364635/185762103-48a9fbaf-282e-45d8-86a4-bf5eedf620b0.png)

The two number inputs are constrained between 0 and the width/height of the map (minus 1). When clicking "Go", it focuses the camera at the center of the tile at these coordinates.

## 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
- [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: Corantin H <archi0670@gmail.com>
2022-09-16 01:17:56 +00:00
Corantin H e52e443988 Editor: used max int value for goto min and max coordinates 2022-09-15 20:54:20 +02:00
Dennis Felsing 9a2835c9dd Update translations via script, new German translations
New English text for marking the beginning/end of a cut
2022-09-15 14:38:08 +02:00
bors[bot] ed2b0f40b9
Merge #5639
5639: Add different laser colors for different types r=def- a=VoxelDoesCode

Since we're doing a push to assist newer players, I think it would be a good idea to differentiate the different types of lasers, so that non-moving laser entities aren't confused with doors (I'm aware the blinking is a sign, but it's very subtle). This also includes a new color for Shotgun's laser, which would be a nice touch for both customization and clarity. 

![image](https://user-images.githubusercontent.com/95713843/179640279-06bb52a0-9070-48ca-b39f-013034f9c16e.png)
![image](https://user-images.githubusercontent.com/95713843/179640326-bcfad3a9-6209-4514-8850-98c5146e28b8.png)

If this were to be implemented though, it would require a server update, because the server actually needs to send the DDNetLaser to clients with a high enough client version (It's set to 17000 currently). As of right now it's a solid concept.

Huge thanks to Fokkonaut for finalizing this concept!

## 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
- [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: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: VoxelDoesCode <bluheadcat@gmail.com>
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2022-09-15 07:14:11 +00:00
bors[bot] da0dca25c3
Merge #5823
5823: Editor: Added reload button for image and sound popups r=heinrich5991 a=sctt

Automatically reloads the image from mapres folder based on its current name, that's just a quicker "replace" which is convenient while experimenting on image contents, some mappers asked for this.

![Screenshot from 2022-09-10 11-57-58](https://user-images.githubusercontent.com/3328841/189479587-620c812c-0df2-4ba2-94a0-83eca8e42c81.png)

note: image lookup is currently limited to the mapres root folder, no directory recursion has been implemented, this is an improvement that might be added in the future (even though in my understanding, organizing mapres into subfolders is not a very common practice, not even the "search" feature considers that).

## 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] 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: “sctt” <“sctt@sctt.it”>
2022-09-15 06:54:50 +00:00
“sctt” 73d883d16b Editor image reload: renamed reload into readd 2022-09-15 08:46:31 +02:00
fokkonaut 5deeb299fa Add DDNetLaser to have more info about a laser shot 2022-09-15 01:01:32 +02:00
VoxelDoesCode 03b90f4f3d Added new cl colors and tweaked the settings menu
Merging of DoLaserPreview and static int fix

Replace if else statement with switch function

Adjusted RenderDropDown header to match

static int cbuttoncontainer fix, potential bugs
2022-09-15 01:01:04 +02:00
Dennis Felsing 51c0bb1f43 Improve message on failed load 2022-09-13 20:30:30 +02:00
bors[bot] cef096ecd7
Merge #5820
5820: Editor: Added "Order" button in quads popup r=heinrich5991 a=sctt

Main purpose is to control quads z index, but i like how this can be used to reveal how many quads a layer has just by placing a new one.
Furthermore, it provides a way to reference quads, that's needed to make custom cli tools work on user selected quads.

![Screenshot from 2022-09-09 19-04-21](https://user-images.githubusercontent.com/3328841/189411505-558ca601-e753-48b2-a6c3-d9f293795951.png)

## 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] 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: “sctt” <“sctt@sctt.it”>
2022-09-11 22:44:13 +00:00
“sctt” 79fa29d8b8 editor: added order button in quads popup 2022-09-10 18:04:38 +02:00
Jupeyy f59f79e02f Move skin info after the settings (settings can cause reload -> skin is invalid) 2022-09-10 15:03:59 +02:00
“sctt” 39223dfd8a editor: added reload button for image and sound popups 2022-09-10 12:23:00 +02:00
Robert Müller 19a0544364 Fix editor layer image selection not working 2022-09-08 15:30:22 +02:00
Robert Müller ff471b4d17 Minor refactoring: homogenise code structure of selection popups 2022-09-04 23:00:51 +02:00
Robert Müller 833f690c59 Refactor editor sound selection popup using CScrollRegion
Decrease popup size by remove the unused empty space designated for "previewing" sounds.
2022-09-04 22:59:33 +02:00
Robert Müller cef984294c Fix minimum/maximum values of editor properties
The Order-property maximum value was too large, so it was temporarily (only visually) possible to go beyond the maximum.

The minimum/maximum values for the Color-property were incorrect and redundant, as `PROPTYPE_COLOR` is used for RGBA color properties and not for envelope IDs.
2022-09-04 13:06:15 +02:00
Robert Müller 2e8d203ed4 Fix editor value selector not allowing minimal value change
For example, when the scale is 1, changing the value by exactly 1 was not possible.
2022-09-04 13:02:31 +02:00
Robert Müller 3fd87df844 Fix mouse staying locked when activating text mode in editor 2022-09-04 12:58:39 +02:00
bors[bot] ecce22322e
Merge #5805
5805: Refactor editor server settings and automapper config lists using `CScrollRegion` r=def- a=Robyt3

- Refactor editor automapper config list using `CScrollRegion`. Also fix some other minor issues with this list.
  - Fix the currently selected item not being highlighted after opening the dialog.
  - Remove static limit of 255 automapper rules, after which the editor previously caused out-of-bounds accesses, by using the address of the automapper config name as button ID.
  - Before:  ![automapper old](https://user-images.githubusercontent.com/23437060/188277300-bd634c13-fb66-4348-abf4-9481e8fcaa3a.png)
  - After: ![automapper new](https://user-images.githubusercontent.com/23437060/188277303-0cb94442-f35d-4c1e-bd81-7f56052cede6.png)
- Refactor editor server settings list using `CScrollRegion`.
  - Before:  ![server_settings old](https://user-images.githubusercontent.com/23437060/188277264-8a0d16b5-838c-4bd1-b94c-f11091c68ccf.png)
  - After: ![server_settings new](https://user-images.githubusercontent.com/23437060/188277269-1fabf5a5-9daf-4ffe-893d-1f1690ba597f.png)



## 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
- [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: Robert Müller <robytemueller@gmail.com>
2022-09-03 21:34:32 +00:00
def c95a605fd7 Version 16.3.2 2022-09-03 23:15:55 +02:00
Robert Müller 977f1a8245 Refactor editor server settings list using CScrollRegion 2022-09-03 17:13:26 +02:00
Robert Müller 130275a7b2 Refactor editor automapper config list using CScrollRegion
- Fix the currently selected item not being highlighted after opening the dialog.
- Remove static limit of 255 automapper rules, after which the editor previously caused out-of-bounds accesses, by using the address of the automapper config name as button ID.
2022-09-03 16:41:31 +02:00
Robert Müller 1c23a17ee4 Fix hotkeys (scroll regions) not working in editor 2022-09-02 23:16:37 +02:00
bors[bot] cc7fbe275c
Merge #5798
5798: Remove all references to memset r=def- a=heinrich5991

`memset` only worked with `CServer::CClient::STATE_EMPTY` by chance
because it is defined as 0.

## 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>
2022-09-02 12:57:54 +00:00
heinrich5991 887b24d8f5 Remove all references to memset
`memset` only worked with `CServer::CClient::STATE_EMPTY` by chance
because it is defined as 0.
2022-09-02 14:32:39 +02:00
bors[bot] cbb61814df
Merge #5722
5722: First send message to team, then kill team (fixes #5721) r=heinrich5991 a=def-

![Screenshot 2022-08-10 at 15 54 13](https://user-images.githubusercontent.com/2335377/183919209-a5fb95e6-d578-4376-9fb6-a72d0381001c.png)

## 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: Dennis Felsing <dennis@felsin9.de>
2022-09-02 11:14:42 +00:00
Robert Müller e7c3ce186f Port CUI::ConsumeHotkey from upstream
Move hotkey/input handling from `CMenus` to `CUI`.

Using the `ConsumeHotkey` method ensures that each hotkey is only handled once.

By also handling the mouse scroll wheel as hotkeys, this fixes the scroll keys activating scroll regions while the controls binder is active.
2022-08-31 21:43:57 +02:00
def c479230d71 Use new ddnet.org domain 2022-08-30 10:09:06 +02:00
bors[bot] 3478146ea5
Merge #5784
5784: Suppress more events while skipping in demos, reset specifics components before long skips in demo r=def- a=Robyt3

Closes #5779.

## 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>
2022-08-29 21:47:28 +00:00
Jupeyy d2295ff94e refind skins after reload 2022-08-29 18:28:59 +02:00
bors[bot] 3e42d3df5a
Merge #5787
5787: Allow spectator mode to be changed while demo is paused r=def- a=Robyt3

By updating and rendering the current tick again when changing the spectator mode while the demo playback is paused. Closes #1843.

Refactoring: Extract `IDemoPlayer::ETickOffset`, `IDemoPlayer::SeekTick` and `CMenus::DemoSeekTick`.

## 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>
2022-08-28 18:01:55 +00:00
Robert Müller c6cc45471a Allow spectator mode to be changed while demo is paused
By updating and rendering the current tick again when changing the spectator mode while the demo playback is paused.

Refactoring: Extract `IDemoPlayer::ETickOffset`, `IDemoPlayer::SeekTick` and `CMenus::DemoSeekTick`.
2022-08-28 17:52:49 +02:00
Zwelf 6382f5b5d5 Clarify save message on team member in '/spec' mode 2022-08-28 17:37:23 +02:00
Robert Müller c0472b3177 Reset specific components before long skips in demo
Only reset what has to be reset instead of using `CGameClient::OnReset`, which would reset a lot more and cause other issues (client freezing while skipping) that would first need to be solved.
2022-08-28 15:39:30 +02:00
Robert Müller b2fbfac4d1 Suppress more events while skipping in demos:
- chat messages
- kill messages
- sounds
- stats
- air jump effects
2022-08-28 15:20:50 +02:00
Robert Müller 1da597ff1a Fix automatic demo rewind not working when menu is not active 2022-08-28 12:26:20 +02:00
Robert Müller 3dc577f24e Fix demo seeking not working anymore when menu is not active 2022-08-28 12:23:03 +02:00
Robert Müller 7cbca53d48 Deactivate "Follow" spectator mode in global server demos
As there is no spectator to follow, the follow mode does not work in global server demos.

Player server demos are unaffected and support the follow mode.
2022-08-27 17:48:04 +02:00
Robert Müller 939b3e5538 Fix free-view button state when following a free-view spectator
When following a spectator that is using free-view mode, the free-view button was active at the same time as the follow button.
2022-08-27 17:45:56 +02:00
bors[bot] 8ac260a3a9
Merge #5777
5777: Add period/comma hotkeys to skip one tick forward/backward, various other improvements to demo skipping r=Jupeyy a=Robyt3

Mostly from upstream https://github.com/teeworlds/teeworlds/pull/2904, with some more fixes and refactorings.

## 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
- [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: Robert Müller <robytemueller@gmail.com>
2022-08-27 12:40:09 +00:00
bors[bot] b42627f807
Merge #5748
5748: Remove the need for sprite icon images; update Icons file r=Jupeyy a=VoxelDoesCode

It felt like that it was very unoptimized to have two images for the demo buttons. Initially, I wanted to merge it into one image, but it was a much better choice to have it so that we use the Icons font file for the sprites instead. Turns out, considering how the typeface is rendered, it looks much smoother and crisper. The contrast between the squares and the symbols is much clearer alongside!

Before the change:
![unknown](https://user-images.githubusercontent.com/95713843/185066728-45b6c5d7-00c5-4e03-9f89-4dfc89df6ec1.png)
After the change:
![unknown](https://user-images.githubusercontent.com/95713843/185066759-bd5f8169-7e9e-488d-9af7-0ab34bff9d54.png)

Note that there is a few compromises that had to be made with the limited symbol choices. As of publishing this there is not a symbol for a crossed out keyboard, but I hope the eye works just fine for now.


## 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
- [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: VoxelDoesCode <bluheadcat@gmail.com>
2022-08-27 12:24:36 +00:00
Robert Müller a24ac108ce Always suppress events and update envelopes when skipping 2022-08-27 13:23:06 +02:00
Robert Müller bf16875a6f Add period/comma hotkeys to skip one tick forward/backward 2022-08-27 12:49:32 +02:00
Robert Müller d6628fe028 Rename variable LastSpeedChange to s_LastSpeedChange 2022-08-27 12:49:32 +02:00
Robert Müller 091f3b3e34 Rename variable PrevAmount to s_PrevAmount 2022-08-27 12:49:32 +02:00
VoxelDoesCode 20e70b3172 Demo Tooltips, in courtesy of Chairn 2022-08-26 02:07:58 -04:00
VoxelDoesCode 0392f6655d Added an icon for Parent Directories 2022-08-25 18:44:27 -04:00
Robert Müller 8d3351f046 Also record tunings for player demos 2022-08-25 17:57:03 +02:00
VoxelDoesCode 216d4421ce Clang Format 2022-08-24 16:17:04 -04:00
Robert Müller 638559b648 Refactor scrollable controls settings using CScrollRegion
Replace hacky usage of `UiDoListboxStart` with `CScrollRegion`.
2022-08-23 10:08:46 +02:00
Robert Müller 7c496dd5b4 Make ingame server info MOTD scrollable using CScrollRegion 2022-08-23 10:08:46 +02:00
Robert Müller 359beffff3 Refactor editor sound list using CScrollRegion 2022-08-23 10:08:46 +02:00
Robert Müller 5dc6c90a50 Refactor editor image list using CScrollRegion, split method 2022-08-23 10:08:45 +02:00
Robert Müller 9f01c6fe66 Refactor editor layer list using CScrollRegion 2022-08-23 10:08:45 +02:00
Robert Müller ad8f49fe79 Remove unnecessary indentation/scope 2022-08-23 10:08:42 +02:00
Robert Müller 4cdd36aed3 Remove redundant m_GuiActive checks
This condition is already checked before calling the methods.
2022-08-23 10:01:29 +02:00
Robert Müller 7b80ad1982 Refactor editor layer image selection popup using CScrollRegion
The width of the popup and list are also slightly increased to better support images with longer names.
2022-08-23 10:01:28 +02:00
Robert Müller f451a33361 Port CScrollRegion from upstream with some minor refactorings
Co-authored-by: LordSk <lordskelethom@gmail.com>
2022-08-23 10:01:28 +02:00
Robert Müller 9cbca642ea Rename CUIElement::Get to Rect
This makes it clear that the method is a getter for the rects.
2022-08-23 10:01:27 +02:00
Robert Müller 991b045a11 Remove unused CUIElement::m_ElementTime 2022-08-23 10:01:26 +02:00
bors[bot] 49bed71932
Merge #5696
5696: Add option for parallax-aware zoom r=def- a=Fireball-Teeworlds

## How this works

Currently we have parallax X and Y parameters that control how far away a layer feels. Currently it's only taken into account for camera moving sideways.

This pull request makes zoom behave as if the camera was moving closer or further away, taking into account the distance to the layer.

In order to provide flexibility, this behaviour is using a separate parallax value, similar to how we have separate values for X and Y. Para Zoom will default to the minimum of parallax X, Y, clamped to be between 0 and 100. This seems to look well on most maps.

This pull request also introduces two new features to the Editor:
* Controls for configuring per-group Para Zoom value. If Custom Zoom is set to No, Para Zoom will automatically keep following to the default value described above, so that people new to the feature don't have to figure out how it works.
* Zoom button that previews the zoom behavior (next to Proof at the top).

## Editor Screenshots

### Para Zoom controls

![screenshot_2022-08-22_21-38-04](https://user-images.githubusercontent.com/68162181/186014490-f7b91245-460f-405f-8d5c-3f91db2a1b9a.png)

![screenshot_2022-08-22_21-37-58](https://user-images.githubusercontent.com/68162181/186014522-03b6e814-4dd9-4d07-9af9-7db5fb434a56.png)

### Zoom Button

![screenshot_2022-08-22_21-40-46](https://user-images.githubusercontent.com/68162181/186014856-2d1d499d-9011-439c-b217-536957e0c1e3.png)

![screenshot_2022-08-22_21-40-50](https://user-images.githubusercontent.com/68162181/186014874-6d2939d3-00ff-4327-a790-414b5151ba31.png)

## In-Game Screenshots

Video: https://youtu.be/W7eXQN0gRFI

This is an older version of the pull request that had an option to disable the new behaviour. The current version can only be disabled in map editor for a particular map.

### Springlobe 3

With new feature:
![screenshot_2022-08-02_04-28-19](https://user-images.githubusercontent.com/68162181/182286371-b67cee1c-73d8-4a24-a9c3-1b28340a3b42.png)

Without:
![screenshot_2022-08-02_04-28-25](https://user-images.githubusercontent.com/68162181/182286367-24555381-1700-4ff1-80c7-39e5dce63820.png)

### Beyond Dreams

With new feature:
![screenshot_2022-08-02_04-28-59](https://user-images.githubusercontent.com/68162181/182286322-114ecb90-0860-462c-9012-bb2f3ff848fb.png)

Without:
![screenshot_2022-08-02_04-28-55](https://user-images.githubusercontent.com/68162181/182286654-f34da72b-7991-4f42-89ad-679279fcb83e.png)

## 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
- [ ] 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: Fireball <fireball.teeworlds@gmail.com>
2022-08-22 21:15:41 +00:00
Dennis Felsing 83d26ff48c Version 16.3.1 2022-08-22 15:42:34 +02:00
bors[bot] d2523d9053
Merge #5761
5761: Replace `POPUP_PURE` with generic `PopupMessage` r=def- a=Robyt3

Minor refactoring, as the popup just shows generic text with an Ok-button.

## 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>
2022-08-21 15:02:55 +00:00
def 13cc5d08d9 Version 16.3 2022-08-21 17:00:23 +02:00
Robert Müller d3c9311156 Replace POPUP_PURE with generic PopupMessage 2022-08-21 13:25:06 +02:00
Corantin H d81f15181e Use int for coordinates 2022-08-20 22:30:32 +02:00
Corantin H ae8b9914aa Editor: added a goto button 2022-08-20 20:47:46 +02:00
Jupeyy 6e5c5cba8f Filter vanilla only skins at loading already 2022-08-20 14:39:25 +02:00
Jupeyy d1b8d53619 Auto refresh skins when changing related settings 2022-08-20 13:42:28 +02:00
Corantin H 29a3baaa75 Editor: added the possibility to duplicate layers 2022-08-19 13:20:50 +02:00
VoxelDoesCode fa98ad1e36 Remove the need for file_icons.png 2022-08-19 01:05:02 -04:00
VoxelDoesCode 1807bb7b1e Update icons and clean up 2022-08-17 20:28:24 -04:00
VoxelDoesCode 470ee65db9 DoButton_Sprite > DoButtonFontIcon 2022-08-17 04:28:09 -04:00
VoxelDoesCode a1617dcf56 Replace all images with unicode chars 2022-08-17 03:58:13 -04:00
Robert Müller f0b0d4c163 Improve "couldn't open..." error messages by listing target 2022-08-16 17:35:47 +02:00
Robert Müller f0c74f72ba Smooth console completion scrolling 2022-08-15 23:20:37 +02:00
Alexander Akulich ec16daa4b4 CCharacter: Drop non-const IsAlive() getter 2022-08-15 15:05:59 +03:00
bors[bot] 4826eb1df0
Merge #5730
5730: Move `CUIRect` to separate file, move `CRenderTools::DrawUIRect/4` to `CUIRect::Draw/4`, merge `CUIEx` into `CUI` r=def- a=Robyt3

Adopt UI refactorings from upstream:
- move `CUIRect` into a separate file
  - this allows some includes of `ui.h` to be removed, most importantly in `render.h`
- move `CRenderTools::DrawUIRect/4` to `CUIRect::Draw/4`
  - this object orientied calling style makes it easier to write the code

The `CUIEx` class is merged into the `CUI` class, as there is no need for two different UI classes anymore.

## 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>
2022-08-14 11:55:24 +00:00
bors[bot] cebcc885ab
Merge #5735
5735: Minor refactoring of editor IO r=def- a=Robyt3

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

## 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>
2022-08-14 11:24:15 +00:00
Robert Müller 813522f1fc Add/use temporary variables to improve readability 2022-08-14 13:12:21 +02:00
Robert Müller 45a20ff277 Only load and unload normal tile layer data if necessary 2022-08-14 13:12:21 +02:00
c0d3d3v 780c4db7dd
do an int check for m_FreezeEnd instad of float, becuase it is int 2022-08-13 15:43:38 +02:00
c0d3d3v 0aa46b54ea
small fix for #5729 2022-08-12 22:38:13 +02:00
Robert Müller 51fb3e9a22 Merge CUIEx class into CUI
There is no need to separate the UI in two classes anymore, as the dependency on `CRenderTools` has been removed.
2022-08-12 19:59:19 +02:00
Robert Müller 95550fd6a9 Move CRenderTools::DrawUIRect/4 to CUIRect::Draw/4
Use `ColorRGBA` instead of `vec4` for `Draw4`.
2022-08-12 19:37:08 +02:00
Robert Müller 7b390808bc Replace ui.h include with ui_rect.h, organize other includes 2022-08-12 19:37:08 +02:00
Robert Müller 680dd052d7 Add documentation for CUIRect::Inside 2022-08-12 19:37:07 +02:00
Robert Müller 49164dfcdf Improve argument names of CUIRect::Inside 2022-08-12 19:37:07 +02:00
Robert Müller b50309dd5c Move CUIRect class into its own files 2022-08-12 19:37:07 +02:00
Robert Müller 4005b82743 Move CRenderTools::DrawUIElRect to CUIElement::SUIElementRect::Draw
This method draws a particular UI element rectangle so it should be a member method.
2022-08-12 17:42:05 +02:00
Robert Müller 2a21cd6eab Move all DrawRect* methods from CRenderTools to IGraphics
As the methods do not depend on any game components they are moved to the engine graphics interface.
2022-08-12 17:42:05 +02:00
Robert Müller 7b20009980 Move CUI::CORNER_* enum to IGraphics::CORNER_*
Entirely automatic replacement in preparation for moving rect drawing methods from `CRenderTools` to `IGraphics`.
2022-08-12 17:42:04 +02:00
Robert Müller 237fdc76db Move CRenderTools::DrawCircle to IGraphics::DrawCircle
As this method does not depend on any game components it is be moved to the engine graphics interface.
2022-08-12 17:42:03 +02:00
Robert Müller 967c92f5d6 Encapsulate CGraph member variables
Make the member variables private and add `SetMin` to replace a usage of the member variables in `CDebugHud`. For completeness/symmetry, `SetMax` is also added.
2022-08-12 16:13:23 +02:00
Robert Müller b314db5454 Use CGraph::MAX_VALUES instead of magic value in debughud 2022-08-12 16:13:02 +02:00