- More "classes" of global anim: option to make global anims render not only in boundaries of playfield and the entire window/border, but also in boundaries of each door ('door_1' and 'door_2');
- Aligning anims to left/right or top/bottom side of the screen: option to align them to the sides of borders like 'viewport.door_1.align';
- More anim events: just adding more events for changing/initiating anims... not just 'click', but also, maybe, 'unclick' or 'release' and 'press_xk_button';
- Activating an action with delay: the point is that when you click on an anim with action that kinda pauses the game/menu/editor like 'anim_event_action: editor.button.save' or 'anim_event_action: main.button.game', it does the action before the anim changes, so sometimes the pressing anim for a global anim button that pauses or changes the screen becomes kinda pointless.
More customizations for global anims
Moderators: Flumminator, Zomis
More customizations for global anims
Just kinda got few other ideas for customizing the global anims:
𒈟
Re: More customizations for global anims
This already works, with these exact class names.More "classes" of global anim: option to make global anims render not only in boundaries of playfield and the entire window/border, but also in boundaries of each door ('door_1' and 'door_2');
This should already work, using the ".position" parameter -- BD2K3 also uses this (and also the classic "toons").Aligning anims to left/right or top/bottom side of the screen: option to align them to the sides of borders like 'viewport.door_1.align';
I have just added some more global animation events last night! It's not pushed to the repo yet, but you can download the latest development executable for Windows and have a look at it -- here's the commit message:More anim events: just adding more events for changing/initiating anims... not just 'click', but also, maybe, 'unclick' or 'release' and 'press_xk_button';
Code: Select all
added several new event types that can trigger global animations
This change adds the following new global animations event types,
which can be used like the already existing "click:anim_X.part_Y":
* init:anim_X.part_Y - triggers when animation is initialized
* start:anim_X.part_Y - triggers when animation is started
* end:anim_X.part_Y - triggers when animation ends
* post:anim_X.part_Y - triggers when animation post delay ends
The second part ".part_Y" is optional; if missing, events for every
animation part will trigger the animation for which this event is
defined.
The "init" event will trigger even if the animation is not yet
displayed, but starts waiting for its "init_delay" or "init_event",
while the "start" event will trigger when the first frame of the
animation is displayed.
The "end" event will trigger when the last frame of the animation is
displayed (either because the animation has stopped due to a click
event, due to the "anim_delay" being finished or because the animation
has completely moved off the screen), while the "post" event will
trigger when the "post_delay" is completely finished.
You can now easily accomplish exactly this task with those new animation events!Activating an action with delay: the point is that when you click on an anim with action that kinda pauses the game/menu/editor like 'anim_event_action: editor.button.save' or 'anim_event_action: main.button.game', it does the action before the anim changes, so sometimes the pressing anim for a global anim button that pauses or changes the screen becomes kinda pointless.
Re: More customizations for global anims
I have just added another animation event action: "unclick:any". It triggers the next animation part when the (any) mouse button was released (anywhere on the screen, not only when the mouse pointer is over that global animation).More anim events: just adding more events for changing/initiating anims... not just 'click', but also, maybe, 'unclick' or 'release' and 'press_xk_button';
This allows for (nearly) "real" (gadget-style) buttons, like the two "zoom" buttons for the level editor: Use a "click" event for the first part, and an "unclick:any" event for the second part. Define the "anim_event_action: XK_plus" (or "XK_minus") event action for either the first or second part, depending on what you like better: executing the "zoom" action directly when pressing the button, or executing it when releasing the mouse button. Using "execute action when released" has the advantage that it works just like all other buttons, but has the disadvantage that it also executes its action when the mouse pointer was moved away from the button before it is released. Using "execute action when pressed" would prevent this, but gives a slightly different behaviour for those new buttons.
Emulating the exact same behaviour of the "normal" buttons (changing between "pressed" and "unpressed" button graphic when moving the mouse away from the button graphic or back over the button graphic while holding the mouse button pressed) is probably not possible (or would be to complicated), but I think the possibilites to define your own functional buttons with the new "unclick:any" event are just fine, and very easy to define in the "graphicsinfo.conf".
This new feature is avaliable in the latest development executable (just uploaded).
Re: More customizations for global anims
Alrighty, works as intended, but there's few errors happening:
- If you do a very short click on the anim with '.part_1.anim_event: click' and '.part_2.anim_event: unclick:any', the anim will only count the clicking and then sticks on the pressed frame and only fixes after clicking again. It's kind of same situation when clicking on a button which brings out the request window/request in door;
- Undo button now works as redo button for some reason... Well, at least the anim which clicks on it:
Code: Select all
global.anim_5.part_1.EDITOR.anim_event:click global.anim_5.part_1.EDITOR.anim_event_action:editor.button.undo global.anim_5.part_1.EDITOR.class:window
- The anims with 'anim_event_action' (anim_24 and anim_25) which requires to click on another anim (anim_23.part_1) can be triggered on clicking on themselves instead of the one listed on their 'anim_event':
The point is that I can click in the top left corner of playfield since these anims are positioned on the (0,0) coordinates of the boundaries of playfield, and when I click on the top left corner, it triggers the redo sequence.
Code: Select all
global.anim_23.part_1.EDITOR.anim_event:click global.anim_23.part_1.EDITOR.class:window global.anim_23.part_2.EDITOR.anim_event:unclick:any global.anim_23.part_2.EDITOR.class:window global.anim_24.EDITOR.anim_event:click:anim_23.part_1 global.anim_24.EDITOR.anim_event_action:XK_Shift_L global.anim_24.EDITOR.style:multiple_actions global.anim_25.EDITOR.anim_event:click:anim_23.part_1 global.anim_25.EDITOR.anim_event_action:XK_U
𒈟
Re: More customizations for global anims
Haven't checked these issues yet, but you might like to check them with the latest development version. Not sure if it changes anything in this regard, though. Will do some checks for myself soon...
Re: More customizations for global anims
> you might like to check them with the latest development version
I'd like to encourage you to update the git repository more often; not just at major releases, but whenever you make a change, so lurkers can follow along even if we are not running Windows...
You seem to keep meticulous records of what you change, as if you check each change into your local git, just don't push them to the public visible repository. [I contrast with a project I work on, where the original author keeps his work secret for months at a time, then checks it all in with a comment like 'update to version 21'; all the while ignoring half a dozen PRs and committing conflicting code to his local repo, so that when he finally dumps it all in the waiting PRs have to be worked over to merge successfully... :( ]
I'd like to encourage you to update the git repository more often; not just at major releases, but whenever you make a change, so lurkers can follow along even if we are not running Windows...
You seem to keep meticulous records of what you change, as if you check each change into your local git, just don't push them to the public visible repository. [I contrast with a project I work on, where the original author keeps his work secret for months at a time, then checks it all in with a comment like 'update to version 21'; all the while ignoring half a dozen PRs and committing conflicting code to his local repo, so that when he finally dumps it all in the waiting PRs have to be worked over to merge successfully... :( ]
Re: More customizations for global anims
OK, I'll try!I'd like to encourage you to update the git repository more often; not just at major releases
Usually I do push recent changes and additions from time to time, not just for major releases, but sometimes I just forget doing it.
Yes, that's right. The reason for this is that I often do some rebasing and history-rewriting with the last few commits (to clean things up or fix some bugs found when testing directly in the related commits), which I cannot do after I pushed to the public repo. Unfortunately I cannot "push everything in master up to one week ago". But I could make more use of branches, so it would be easier to push blocks of older commits, and keep the newer ones.You seem to keep meticulous records of what you change, as if you check each change into your local git, just don't push them to the public visible repository.
I'll try to push at more regular (and shorter) intervals in the future...
BTW: Just pushed everything to the public repo.
That's indeed not very nice![I contrast with a project I work on, where the original author keeps his work secret for months at a time, then checks it all in with a comment like 'update to version 21'; all the while ignoring half a dozen PRs and committing conflicting code to his local repo, so that when he finally dumps it all in the waiting PRs have to be worked over to merge successfully... ]
Especially it sounds like he dumped everything into one single commit, which is really bad. I really try hard to make small commits, to have a chance to find bugs quicker using "git bisect"...
Re: More customizations for global anims
Maybe I'm not using it right, but I can get it to work as intended. It still keeps the same position on the left side instead of right as I intent to:
Code: Select all
global.anim_1.MENU.position: right
global.anim_1.MENU.class: window
𒈟