Je pense qu'on peut dire que le développement de mon éditeur d'animation a (enfin ?) commencé. Je me base sur le code du Sprite Editor, ce qui simplifie deux ou trois choses, mais amène aussi son lot de surprise...
J'avais plus ou moins oublié que la table des sprites qui apparaît sur la droite de l'éditeur dans SEDS est un objet "partagé" entre les différentes fenêtres, affiché par la "méta-fenêtre" qui a tout construit, notamment.
A small screenshot to illustrate that I've really started working on the animation editor. Reusing the sprite editor as a basis helps sometimes, but it also brings in some surprises. I had to refresh my memory on how the SpriteTable
widget is generated and displayed by MetaWindow
, while GridWindow
, AnimWindow
and FileWindow
can manipulate it only because the MetaWindow
passes a reference to that widget to their constructors. The widget accepts several listeners to be attached to it -- which is rather unusual -- and an "enabled" field in all those SpriteListenerInterface
s tells who actively reacts to an operation. release()
and restore()
methods of the different window enable()
and disable()
those listeners accordingly to achieve the desired effect.
Saturday, January 22, 2011
FileWindow et SpriteTable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment