Commit graph

3086 commits

Author SHA1 Message Date
def 9f4e883906 Remove cl_http_map_download 2022-09-18 01:03:15 +02:00
Robert Müller d34b7a4ea5 Refactor color picker variable names and color conversion 2022-09-17 13:12:12 +02:00
Robert Müller 4fb98f4ec2 Fix UI elements behind color picker background being selectable
Is was previously possible activate UI elements behind an active color picker when hovering the background of the color picker but not the color picker UI elements.
2022-09-17 13:12:12 +02:00
VoxelDoesCode fb15a7c2a4 Running and AFK anim. states 2022-09-16 12:30:05 +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
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
Jupeyy f59f79e02f Move skin info after the settings (settings can cause reload -> skin is invalid) 2022-09-10 15:03:59 +02: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
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
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
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 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
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
Robert Müller d3c9311156 Replace POPUP_PURE with generic PopupMessage 2022-08-21 13:25:06 +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
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
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
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 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