Robert Müller
e19a96d0e5
Render editor brush selection size with ⨯
instead of ,
...
For example, `20⨯10` instead of `20,10`.
This is the "vector" symbol, which makes the most sense in this context.
2023-09-10 11:59:27 +02:00
Robert Müller
f3eaa10d7a
Merge pull request #7102 from Marmare314/revert-6844
...
revert change to quad selection (resolves #7025 )
2023-09-08 15:21:53 +00:00
marmare314
ae7eda1628
revert change to quad selection (resolves 7025)
...
Some refactorings are kept and rotation being bound to `R` is also
not reverted.
2023-09-06 19:30:06 +02:00
furo
f71a2e017a
Add CTRL+F in load map prompt
2023-09-06 15:29:07 +02:00
heinrich5991
d2a12e01c1
Merge pull request #7126 from Robyt3/Graphics-Format-PixelSize
...
Add `CImageInfo::PixelSize` function, use `enum EImageFormat`
2023-09-06 09:57:59 +00:00
Harri Nieminen
4d9ff1d904
Fix typos
...
Found by codespell
2023-09-05 22:32:09 +03:00
Robert Müller
dde45f7a40
Add CImageInfo::PixelSize
function, use enum EImageFormat
...
Use `enum EImageFormat` type for image format literals and variables.
Add `PixelSize` function to get the number of bytes/color channels per pixel for a specified image format.
Remove unused store format argument of texture loading functions. All textures are automatically being stored as RGBA, so the argument was unused. Also remove the therefore unused `FORMAT_AUTO`.
Rename variables consistently to `PixelSize` and use `size_t`, instead of mixing different names like `BPP` and `ColorChannelCount`.
Validate image format loaded from maps using `CImageInfo::ImageFormatFromInt`. Add `FORMAT_ERROR` to represent invalid formats.
Remove redundant `PixelSize` parameter from graphics backends and commands, which can be derived from the texture format.
Fix memory leak when RGB image data is being converted to RGBA format when saving map in editor.
2023-09-03 20:40:28 +02:00
Robert Müller
16bc489afb
Move editor automap .rules
files to separate subfolder
...
For better organization of the `data/editor` folder.
2023-09-02 11:41:46 +02:00
Dennis Felsing
54134d6d38
Merge pull request #7119 from Robyt3/UI-Progress-Spinner-Editor
...
Add progress spinner to UI, show progress spinner while saving map in editor
2023-09-01 23:43:16 +02:00
Robert Müller
eac1dc4533
Show progress spinner while saving map in editor
2023-09-01 19:26:34 +02:00
marmare314
59df1d86d4
move CEditorMap::HandleMapDrop
to CEditor
2023-09-01 18:57:36 +02:00
marmare314
12d0608dfd
let CEditorImage
inherit CEditorComponent
2023-09-01 18:57:35 +02:00
marmare314
07fd8e6712
let CAutoMapper
inherit CEditorComponent
2023-09-01 18:57:13 +02:00
marmare314
c3a07dd977
let CEditorSound
inherit CEditorComponent
2023-08-29 22:28:07 +02:00
marmare314
d68029a252
extract CEditorSound
into separate header file
2023-08-29 22:08:12 +02:00
marmare314
5f60d68e8b
extract CEditorImage
into separate header
2023-08-29 22:08:12 +02:00
marmare314
a1ea2f1ff1
Split up io.cpp
2023-08-29 22:08:07 +02:00
heinrich5991
812231449b
Merge pull request #7093 from HiRavie/master
...
Fix all envelopes being saved as bezier
2023-08-28 14:51:49 +00:00
Ravie
6705cccb72
Fix all envelopes being saved as bezier
2023-08-28 16:19:41 +02:00
Dennis Felsing
ff1a2a44d3
Merge pull request #7076 from dobrykafe/pr-fix-map-drag-and-drop
...
Add warning for unsaved editor changes when dragging a map file into the game
2023-08-28 13:49:58 +00:00
Dennis Felsing
c7f3be7d75
Merge pull request #7082 from Marmare314/editor-seperate-mapitems
...
extract code from editor mapitems into separate files
2023-08-28 10:23:17 +00:00
Robert Müller
3988877e8e
Merge pull request #7002 from Marmare314/pixelart
...
Add pixelart tool to editor
2023-08-27 18:42:35 +00:00
marmare314
946be50807
Add tileart tool to editor
2023-08-27 16:07:56 +02:00
marmare314
e19b1e4da6
extract code from editor mapitems into separate files
2023-08-27 16:04:53 +02:00
marmare314
605a93787e
improve code style in proofmode, mapgrid and mapview
2023-08-27 11:38:15 +02:00
dobrykafe
758601c310
remove duplicate code
2023-08-26 22:28:19 +02:00
dobrykafe
cb29ad2b4f
dont switch to editor if loading fails
2023-08-26 22:13:13 +02:00
Robert Müller
8effc201bd
Merge pull request #7075 from Marmare314/issue-7053
...
clamp value-range for color envelopes in popups
2023-08-26 18:14:06 +00:00
dobrykafe
8957ae99bd
remove whitespace
2023-08-26 19:44:53 +02:00
dobrykafe
5e923adcc9
fix map drag and drop
2023-08-26 18:14:13 +02:00
marmare314
c5282682f7
clamp value-range for color envelopes in popups
...
fixes #7053
2023-08-26 17:23:37 +02:00
marmare314
c68350a08a
reset operation status after creating envelope context menu
...
fixes #7050
2023-08-26 17:14:57 +02:00
Robert Müller
6b6ee21338
Merge pull request #7017 from Marmare314/mapview
...
Add `CProofMode` and `CMapGrid` component
2023-08-26 08:54:38 +00:00
marmare314
467de92377
Add CProofMode
and CMapGrid
component
...
Also extract more code into `CMapView` and extend the `CEditorComponent`
interface.
2023-08-25 20:40:27 +02:00
Robert Müller
b6f0c59b26
Refactor editor entities layer explanations
...
Use `enum`. Organize explanations in separate functions for DDNet, FNG and Vanilla.
2023-08-25 17:49:13 +02:00
Robert Müller
d2c9750c65
Add str_from_int
function
...
Add more efficient function for formatting integer values as strings.
A benchmark shows that using this function is significantly faster than using `str_format`. It is faster by a factor of 220 with Clang 15.0 O2 (https://quick-bench.com/q/BlNoLnlyqxipf4jvsFTUxKMHDJU ) and by a factor of 11 with GCC 12.2 O2 (https://quick-bench.com/q/Fxf9lDCTqXBF4pIa_IyZ5R0IqYg ).
This increases FPS in the editor by ~25% when many numbers are rendered for switch/tele/speedup/tune layers or with "Show Info" being enabled.
The additional static analysis for `std::to_chars` revealed that the wrong size was used in `CHud` for `aScoreTeam[TEAM_RED]` and `aScoreTeam[TEAM_BLUE]`.
This requires incrementing the macOS deployment target from 10.13 to 10.15.
2023-08-24 20:54:17 +02:00
Robert Müller
a325245397
Don't clear saved brushes when loading another map
...
It was not actually necessary to clear the brushes to prevent the crashes. The crashes were fixed by not storing the texture handles for the layers anymore.
Closes #7024 .
2023-08-19 20:46:14 +02:00
Robert Müller
db1452d0a8
Merge pull request #6988 from Marmare314/envelope-scale
...
implement scaling for envelope editor
2023-08-19 09:49:17 +00:00
marmare314
23e2d9377d
implement scaling for envelope editor
2023-08-16 15:06:41 +02:00
marmare314
fded5013eb
Do not activate box selection when panning ( fixes #7031 and #7030 )
...
And do not pan while any other operation is in progress.
2023-08-16 12:17:06 +02:00
Robert Müller
7168fb15d2
Move OnWindowResize
listener to engine, handle editor
...
Register the `OnWindowResize` listener in the engine client instead of the game client and properly dispatch the event also to the editor, so text containers in the editor are cleared when the window is resized.
Closes #7018 .
2023-08-15 20:17:27 +02:00
marmare314
77e36c5062
change interface and fix scalelength
2023-08-14 10:12:06 +02:00
marmare314
a46f320d24
remove unnecessary include
2023-08-14 09:03:03 +02:00
marmare314
7925f9fd45
format
2023-08-14 08:59:01 +02:00
marmare314
72b0fbfada
format
2023-08-14 08:53:59 +02:00
marmare314
2bcfbae841
Add CEditorComponent to moduralize editor
...
Refactor CSmoothZoom and introduce CMapView
2023-08-14 08:36:02 +02:00
Dennis Felsing
8eab94bcac
Merge pull request #6992 from Marmare314/selection-order-bug
...
Switch order in which envelope points are selected
2023-08-10 20:22:53 +00:00
Dennis Felsing
7f636329b2
Merge pull request #6993 from Marmare314/hidden-channel-bug
...
Ignore hidden channels when selecting envelopes
2023-08-10 20:22:07 +00:00
marmare314
93332af243
Disallow adding overlapping envelope points
...
Also now round is used to convert the mouse position to fixed
precision time which places the added point closer to the mouse position.
2023-08-10 08:38:10 +02:00
marmare314
3d400b13b5
Ignore hidden channels when selecting envelopes
...
When two envelope points overlap it can happen that the hidden
one will be marked as hot. Then neither can be selected.
2023-08-10 08:27:17 +02:00