mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-03 10:04:01 +00:00
anim editor: support horizontal flip
This commit is contained in:
parent
1138eab08e
commit
8cb19e528f
2 changed files with 15 additions and 0 deletions
|
@ -514,6 +514,7 @@ void AnimationEditor::applyState()
|
|||
addAction(MakeFunctionEvent(AnimationEditor, incrTimelineGrid), KEY_P, 0);
|
||||
|
||||
addAction(MakeFunctionEvent(AnimationEditor, toggleSplineMode), KEY_W, 0);
|
||||
addAction(MakeFunctionEvent(AnimationEditor, flipH), KEY_F, 0);
|
||||
|
||||
addAction(MakeFunctionEvent(AnimationEditor, selectPage0), KEY_1, 0);
|
||||
addAction(MakeFunctionEvent(AnimationEditor, selectPage1), KEY_2, 0);
|
||||
|
@ -1839,6 +1840,19 @@ void AnimationEditor::reverseAnim()
|
|||
}
|
||||
}
|
||||
|
||||
void AnimationEditor::flipH()
|
||||
{
|
||||
if (dsq->isNested()) return;
|
||||
|
||||
RenderObject *ro = core->getCtrlState() ? (RenderObject*)getCurrentPageSprite() : (RenderObject*)spriteRoot;
|
||||
ro->flipHorizontal();
|
||||
|
||||
const Vector red(1,0,0), white(1,1,1);
|
||||
toptext->color = spriteRoot->isfh() ? red : white;
|
||||
for(size_t i = 0; i < NumPages; ++i)
|
||||
pages[i].timeline->label.color = pages[i].editSprite.isfhr() ? red : white;
|
||||
}
|
||||
|
||||
void AnimationEditor::load()
|
||||
{
|
||||
if (dsq->isNested()) return;
|
||||
|
|
|
@ -126,6 +126,7 @@ public:
|
|||
size_t selectedStripPoint;
|
||||
|
||||
void reverseAnim();
|
||||
void flipH();
|
||||
|
||||
void toggleRenderBorders();
|
||||
void updateRenderBorders();
|
||||
|
|
Loading…
Add table
Reference in a new issue