Dean Herbert
20f1ef4318
Extract common implementation of updating drawable position from screen space pos
2021-05-20 18:35:13 +09:00
Dean Herbert
6f75c59760
Fix flip logic not using the full selection quad
2021-05-20 18:31:51 +09:00
Dean Herbert
95c78b9185
Split out common selection quad logic
2021-05-20 18:24:25 +09:00
Dean Herbert
27e81d6504
Implement proper rotation algorithm for skin editor
2021-05-20 18:21:16 +09:00
Dean Herbert
a55879e511
Fix oversights in scale algorithm
2021-05-20 01:47:31 +09:00
Dean Herbert
14af86d6c5
Use the same code path for all scaling
2021-05-19 21:46:41 +09:00
Dean Herbert
6a3c58b9ad
Implement proper scaling algorithms
2021-05-19 19:58:55 +09:00
Dean Herbert
d661e98fa6
Move common functionality out of OsuSelectionHandler
and implement flip support
2021-05-18 18:34:06 +09:00
Dean Herbert
d09da02673
Fix deleting skin elements not saving out to skin
...
Closes https://github.com/ppy/osu/issues/12786 .
2021-05-14 16:03:22 +09:00
Bartłomiej Dach
25b1443c50
Remove dead branch and mark implementation as temporary
...
The previous implementation was checking if the `x0` or `x2` anchors
were selected to decide on which way to transfer the drawable's scale,
but that check actually ends up being always true for corner anchors. To
visualise, this is how the corner anchors correspond to `Anchor` flags:
x0 x1 x2
| | |
y0 -O---O---O-
| | |
y1 -O---+---O-
| | |
y2 -O---O---O-
| | |
The Os indicate where the reference anchors are on a selection box.
The first conditional eliminates the middle ones, which makes sense.
But after excluding them from further deliberations (marking via X):
x0 x1 x2
| | |
y0 -O---X---O-
| | |
y1 -X---+---X-
| | |
y2 -O---X---O-
| | |
The remaining anchors always have `x0` or `x2` set. So to avoid
confusion, just always transfer one way for now. At some point this
should be torn out in favour of an actual implementation of the desired
behaviour.
2021-05-13 17:50:12 +02:00
Dean Herbert
0fa90a80d4
Merge branch 'master' into skin-blueprint-aspect-lock
2021-05-13 23:38:53 +09:00
smoogipoo
4cf4817ad2
Remove redundant parens
2021-05-13 22:11:58 +09:00
Dan Balasescu
d2fdd1e521
Merge branch 'master' into stable-anchor-origin
2021-05-13 22:06:21 +09:00
Dean Herbert
1cda55393e
Add aspect ratio locking and flip support to skin editor
2021-05-13 17:51:57 +09:00
Dean Herbert
7921dc7ece
Rename ISkinnableComponent
to ISkinnableDrawable
2021-05-13 17:06:00 +09:00
Dean Herbert
05e0c57a6a
Keep component positions stable when changing anchor/origin
2021-05-12 15:30:52 +09:00
Dean Herbert
12684de66e
Add ability to adjust origin in skin editor
2021-05-11 18:39:14 +09:00
Dean Herbert
aff32b0d19
Merge branch 'master' into skin-components-list
2021-05-06 14:17:33 +09:00
Dean Herbert
15603de6e9
Change scale multiplier to be closer to expectations
2021-05-03 15:25:18 +09:00
Dean Herbert
51f4077b27
Reorder methods in SkinSelectionHandler
to follow standards
2021-05-03 15:15:00 +09:00
Dean Herbert
a2faa0b74c
Remove dead code
2021-05-03 15:13:53 +09:00
Dean Herbert
01984de9c7
Use existing GetStateFromSelection
helper function
2021-05-03 15:13:32 +09:00
Dean Herbert
8b82a07914
Move skin-related interfaces out of HUD namespace
2021-04-30 13:10:42 +09:00
Dean Herbert
cdef07b2ee
Fix blueprints not hiding when deleting elements
2021-04-30 13:09:57 +09:00
Dean Herbert
b460181f15
Add note about rotation not working as expected
2021-04-29 16:16:52 +09:00
Dean Herbert
1516e2ffef
Update blueprint implementation in line with #12625 .
2021-04-29 16:12:31 +09:00
Dean Herbert
fd587a82ff
Replace abstract class with interface, attached to the actual components (not skinnable wrapper)
2021-04-29 16:12:15 +09:00
Dean Herbert
59339aa4fd
Add support for x/y position and scale back in
2021-04-29 16:12:15 +09:00
Dean Herbert
1cb8fc9a24
Extract editor classes out of test namespace and add anchor support
2021-04-29 16:12:15 +09:00