[gluon] Re: Review Request: Call initialize() or cleanup() when changing the value of the "enabled" property

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100317/

engine/gameobject.h (Diff revision 2)
namespace GluonEngine
161
            bool initialized() const;
Functions returning bool should ideally be a question, so please rename this to isInitialized() instead.

- Arjen


On January 27th, 2011, 3:15 p.m., Giulio Camuffo wrote:

Review request for Gluon.
By Giulio Camuffo.

Updated Jan. 27, 2011, 3:15 p.m.

Description

Currently when in the creator a gameobject or component gets disabled it doesn't hide immediately. This patch fixes that behaviour, calling initialize() or cleanup() on the object.
To ensure initialize() won't be called by setEnabled() before actually wanted, I had to keep track if the gameobject's initialize() was called, with a new bool in the private class and a new initialized() method used by Component.

Diffs

  • engine/gameobject.h (403c018)
  • engine/gameobject.cpp (1f29de8)
  • engine/gameobjectprivate.h (82ac665)
  • engine/gameobjectprivate.cpp (49823d5)

View Diff



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/