Commit graph

4130 commits

Author SHA1 Message Date
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 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
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 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
Robert Müller 8e0a935d5c Combine CGraph::ScaleMin and ScaleMax into Scale
As the methods are always called at the same time, they can be combined. This also improves the performance, as the array only needs to be iterated once.
2022-08-12 16:12:55 +02:00
Robert Müller e99f7ab106 Extract StrCopyUntilSpace and use existing str_* functions
Minor refactoring to reduce duplicate code. Eventually this method could be extended to handle completion for other arguments except the first one.
2022-08-11 19:30:54 +02:00
Robert Müller 33bb576202 Show completion options for tune params in console
Currently supports `tune`, `tune_reset` and `toggle_tune`.

For `tune_zone` the tune name is the second argument, so this is more difficult to handle.
2022-08-11 10:11:03 +02:00
Robert Müller 047c88d797 Refactor console completion input handling according to upstream 2022-08-11 10:08:59 +02:00
Robert Müller f3eb93b83a Extend IConsole::PossibleCommands, add index to callback
`PossibleCommands` now passes the item index to the callback and returns the total number of items.

Add `EmptyPossibleCommandCallback` as default parameter.
2022-08-11 10:08:06 +02:00
Robert Müller 680abb6405 Encapsulate CTuningParams::ms_apNames with CTuningParams::Name 2022-08-11 10:07:45 +02:00
Robert Müller 85a41f46dc Allow tune command to list current tuning parameter value
Extend `tune` so the current value of a given tuning variable is printed if no new value is given, so it works like commands in the console. For example `tune player_collision` will print the current value of the variable, whereas `tune player_collision 0` will change the value like before.
2022-08-11 10:04:52 +02:00
Robert Müller e3bb8bc370 Allow tune_reset to reset a single tune
Extend `tune_reset` so a single tuning value can be reset to default. For example `tune_reset player_collision` will reset just the `player_collision` tuning, whereas `tune_reset` will reset all to defaults like before.
2022-08-11 10:00:26 +02:00
Robert Müller 54aff02286 Add success/error message to dump_(local|remote)_console commands 2022-08-11 09:52:19 +02:00
Robert Müller 43fdeb8468 Rename tune_dump to tunes, improve descriptions 2022-08-11 09:48:41 +02:00
Robert Müller ca31b495a9 Rename dump_binds command to binds, fix typo in description 2022-08-11 09:48:34 +02:00
Dennis Felsing d003cc6ee2 Use current backlog page instead of old (fixes #5719)
Better fix by Robyt3
2022-08-10 17:27:24 +02:00
Fireball 5d886d80f8 Parallax Zoom: use CMapItemGroupEx to store parallax value 2022-08-10 03:05:23 +01:00
Robert Müller a8e3ac1184 Minor refactoring: use int64_t instead of long long 2022-08-09 18:48:06 +02:00
Robert Müller 1e6fd63204 Rename variables id to KeyID 2022-08-09 18:48:04 +02:00
bors[bot] 57849a128c
Merge #5717
5717: Check fully transparent quads with negative alpha r=def- a=Jupeyy

fixes #5716

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-08-09 15:49:32 +00:00
Jupeyy bc865ab087
Check transparency even for negative alpha 2022-08-09 17:44:09 +02:00
bors[bot] f8fca99e62
Merge #5642
5642: Option to remove weak hook & bounce r=def- a=Jupeyy

Fixes #5641 
server side only

## 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: Jupeyy <jupjopjap@gmail.com>
2022-08-09 13:59:21 +00:00
Dennis Felsing 614a5b35bc Easter egg 2022-08-08 16:37:17 +02:00
Fireball a90c86e9a5 Parallax-aware zoom
How this works: parallax values configure perceived distance from camera
when it's moving along x and y axes. Assume that zoom is moving the
camera away and scale layers accordingly, with background layers
(furtherst away) changing the least.

New per-ItemGroup (LayerGroup) setting allows to set the new parallax
value independently from the other two. This can be used to do tricks
like on Time Shop zoom correctly or make it feel like the camera is
changing the field of view at the same time as moving in space.
2022-08-05 00:40:58 +01:00
Jupeyy 88c4b69301 Add an option to remove weak hook & bounce 2022-07-21 17:04:16 +02:00
Robert Müller 95636da6d9 Fix out of bounds access with highlighted messages in server demos
```
src/game/client/components/chat.cpp:795:89: runtime error: index -1 out of bounds for type 'CClientData [64]'
    #0 0x55c133fd047a in CChat::AddLine(int, int, char const*) src/game/client/components/chat.cpp:795
    #1 0x55c133fc80b5 in CChat::OnMessage(int, void*) src/game/client/components/chat.cpp:570
    #2 0x55c134677688 in CGameClient::OnMessage(int, CUnpacker*, int, bool) src/game/client/gameclient.cpp:770
    #3 0x55c133c282d2 in CClient::OnDemoPlayerMessage(void*, int) src/engine/client/client.cpp:2627
    #4 0x55c134ccdcba in CDemoPlayer::DoTick() src/engine/shared/demo.cpp:679
    #5 0x55c134cdac81 in CDemoPlayer::Update(bool) src/engine/shared/demo.cpp:1007
    #6 0x55c133c2a08b in CClient::Update() src/engine/client/client.cpp:2686
    #7 0x55c133c4c9eb in CClient::Run() src/engine/client/client.cpp:3296
    #8 0x55c133cbd64f in main src/engine/client/client.cpp:4761
```
2022-07-21 15:32:11 +02:00
Robert Müller b4eee122dd Fix null pointer access in maplayers when the snapshot has no game info
```
src/game/client/components/maplayers.cpp:98:112: runtime error: member access within null pointer of type 'const struct CNetObj_GameInfo'
    #0 0x55d84eea9e1e in CMapLayers::EnvelopeEval(int, int, ColorRGBA&, void*) src/game/client/components/maplayers.cpp:98
    #1 0x55d84f518082 in CRenderTools::ForceRenderQuads(CQuad*, int, int, void (*)(int, int, ColorRGBA&, void*), void*, float) src/game/client/render_map.cpp:112
    #2 0x55d84f517ac7 in CRenderTools::RenderQuads(CQuad*, int, int, void (*)(int, int, ColorRGBA&, void*), void*) src/game/client/render_map.cpp:98
    #3 0x55d84eee10b0 in CMapLayers::OnRender() src/game/client/components/maplayers.cpp:1839
    #4 0x55d84f34b915 in CGameClient::OnRender() src/game/client/gameclient.cpp:640
    #5 0x55d84e8d44c2 in CClient::Render() src/engine/client/client.cpp:1222
    #6 0x55d84e92d1a0 in CClient::Run() src/engine/client/client.cpp:3370
    #7 0x55d84e99964f in main src/engine/client/client.cpp:4761
```
2022-07-21 15:28:31 +02:00
Jupeyy 2240ad2966 Fix spelling 2022-07-19 18:22:44 +02:00
Robert Müller c6cf0004a9 Fix names of static variables in settings menus 2022-07-18 21:51:46 +02:00
ChillerDragon 1347860b2c Adapt upstreams CButtonContainer 2022-07-18 10:23:03 +02:00
Alexander Akulich 04ff8f13c2 Menu: Fix a typo in loading state text 2022-07-14 23:40:23 +03:00
Alexander Akulich 9e4098f3a5 prediction/entity: Add GetPos() (sync the API with server/entity) 2022-07-14 23:40:23 +03:00
Alexander Akulich 5169369809 prediction/entity: Sync ID getter name with the server/entity 2022-07-14 23:40:23 +03:00
bors[bot] 96896ddf5c
Merge #5619
5619: Make UI inputs more secure r=def- a=C0D3D3V

fixes #3560 finally :) what a dream xD

This in addition also fixes an input bug, if you hold a mouse button on an input and then open f1 it no longer presses that 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
- [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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-07-14 16:17:55 +00:00
c0d3d3v 27a4c494e9
Make UI inputs more secure 2022-07-11 18:56:36 +02:00
bors[bot] abc9929d35
Merge #5615
5615: Fix Text Alignments in Popups r=def- a=blueskyGH

Fixed the alignment issues in Popups.

Examples:
Before
 ![screenshot_2022-07-11_02-19-13](https://user-images.githubusercontent.com/108560485/178168210-071fbad9-dc59-4caf-94d9-b5ab0dea3f01.png)
![screenshot_2022-07-11_02-20-25](https://user-images.githubusercontent.com/108560485/178168199-4fabe057-69a5-4699-a8cf-858ac2d81811.png)

After
![screenshot_2022-07-11_02-36-26](https://user-images.githubusercontent.com/108560485/178168906-51f40cdf-3e1f-45e4-84a6-56e6056884f6.png)
![screenshot_2022-07-11_02-36-39](https://user-images.githubusercontent.com/108560485/178168909-f9825083-775d-487a-8704-2921e9b25a89.png)


Its my first PR for actual code. Please indulge me. :) 

We still need to get rid of the "ExtraAlign" variable and only use TextWidth().
But somehow TextWidth() doesn't work properly in this case. 
Hopefully a more experienced collaborator can have a look at these lines:
bbca48aa5b (diff-3aebb8cc835bb888d687b51e9dcfc0cda5326d89fd1c97ff83d85c00b82ed116L1656-R1657)

## 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: blueskyGH <108560485+blueskyGH@users.noreply.github.com>
2022-07-11 16:11:57 +00:00
blueskyGH 381394cfff Fix Text Alignments in Popups 2022-07-11 15:47:48 +02:00
c0d3d3v e3fc71d051
Rename "NoSomething" to "SomethingDisabled" 2022-07-11 13:40:01 +02:00
c0d3d3v ebfc053809
Remove even more redundant variables to avoid inconsistent states. Fix another swap bug. 2022-07-11 13:39:52 +02:00
bors[bot] a3001f3bd1
Merge #5205
5205: Allow multiple addresses per server in the serverbrowser r=def- a=heinrich5991

Support is incomplete for `leak_ip_address_to_all_servers` (will only
ping the first address of each server) and for the `leak_ip` setting
(which will also only ping the first address of each server).

Fixes #5158.

## 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 if it works standalone, system.c especially
- [ ] 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-07-10 23:31:21 +00:00
bors[bot] 9e1b6cd1e9
Merge #5613
5613: Search in $PATH for server executable (fixes #5594) r=heinrich5991 a=def-

<!-- 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: def <dennis@felsin9.de>
2022-07-10 23:08:57 +00:00
def aa788e228c Search in $PATH for server executable (fixes #5594) 2022-07-10 23:59:28 +02:00
Robert Müller ec4175277e Fix readability-container-data-pointer 2022-07-10 21:42:57 +02:00
Robert Müller 072b9ebaba Use DrawRoundRectExt instead of DrawRoundRect and remove the latter 2022-07-10 17:19:35 +02:00
Robert Müller cc0f64cc29 Use DrawRect instead of DrawRoundRect in CStatboard
To reduce duplicate code.
2022-07-10 17:19:34 +02:00
Robert Müller 992e5d0d07 Use DrawRect instead of DrawRoundRect in CMotd
To reduce duplicate code.
2022-07-10 17:19:34 +02:00
Robert Müller ab4a4aeb75 Use DrawRect instead of DrawRoundRect in CMenus
To reduce duplicate code.
2022-07-10 17:19:34 +02:00
Robert Müller 0c10b64ee5 Use DrawRect instead of DrawRoundRect in CConsole
To reduce duplicate code.
2022-07-10 17:19:33 +02:00
Robert Müller b571fdf93c Use DrawRect instead of DrawRoundRect/Ext in CScoreboard
To reduce duplicate code.
2022-07-10 17:19:33 +02:00
Robert Müller 76c9d86016 Use DrawRect instead of DrawRoundRect/Ext in CHud
To reduce duplicate code.
2022-07-10 17:19:33 +02:00
Robert Müller e042a22d1e Use DrawRect instead of DrawRoundRect/Ext in CSpectator
To reduce duplicate code.
2022-07-10 17:19:33 +02:00
Robert Müller a0ef36847b Add CRenderTools::DrawRect/4 and make DrawUIRect/4 delegates
So usages of `DrawRoundRect/Ext` can more easily be replaced with `DrawRect/4` and so the basic draw methods can be moved to the engine graphics without depending on the `CUIRect` class.
2022-07-10 17:19:32 +02:00
Robert Müller ebf6ce4d27 More efficient CreateRoundRectQuadContainer with CORNER_NONE
By adding an additional case that only creates a single quad when no corners / rounding are used, like in `DrawRoundRectExt4`.
2022-07-10 17:19:32 +02:00
Robert Müller a9787b15e3 Merge CRenderTools::DrawUIRect4NoRounding into DrawUIRect4
As this is a special case the methods can be merged to reduce the number of public methods.
2022-07-10 17:19:32 +02:00