mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
Minor fixes.
--HG-- branch : dev-scenenode
This commit is contained in:
@@ -56,7 +56,7 @@ class EE_API Event {
|
||||
NoEvent = eeINDEX_NOT_FOUND
|
||||
};
|
||||
|
||||
Event( Node * control, const Uint32& eventType = NoEvent );
|
||||
Event( Node * node, const Uint32& eventType = NoEvent );
|
||||
|
||||
~Event();
|
||||
|
||||
@@ -64,7 +64,7 @@ class EE_API Event {
|
||||
|
||||
const Uint32& getType() const;
|
||||
protected:
|
||||
Node * mCtrl;
|
||||
Node * mNode;
|
||||
Uint32 mEventType;
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace EE { namespace Scene {
|
||||
class Node;
|
||||
class SceneNode;
|
||||
|
||||
class EventDispatcher {
|
||||
class EE_API EventDispatcher {
|
||||
public:
|
||||
static EventDispatcher * New( SceneNode * sceneNode );
|
||||
|
||||
@@ -75,7 +75,7 @@ class EventDispatcher {
|
||||
protected:
|
||||
EE::Window::Window *mWindow;
|
||||
Input * mInput;
|
||||
SceneNode * mControl;
|
||||
SceneNode * mSceneNode;
|
||||
Node * mFocusControl;
|
||||
Node * mOverControl;
|
||||
Node * mDownControl;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace EE { namespace Scene {
|
||||
|
||||
class EE_API MouseEvent : public Event {
|
||||
public:
|
||||
MouseEvent( Node * getNode, const Uint32& EventNum, const Vector2i& Pos, const Uint32& getFlags );
|
||||
MouseEvent( Node * node, const Uint32& EventNum, const Vector2i& Pos, const Uint32& getFlags );
|
||||
|
||||
~MouseEvent();
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ class EE_API Node : public Transformable {
|
||||
virtual void invalidate();
|
||||
protected:
|
||||
typedef std::map< Uint32, std::map<Uint32, EventCallback> > EventsMap;
|
||||
friend class EE::Scene::EventDispatcher;
|
||||
friend class EventDispatcher;
|
||||
|
||||
std::string mId;
|
||||
Uint32 mIdHash;
|
||||
|
||||
@@ -39,7 +39,7 @@ class EE_API NodeMessage {
|
||||
|
||||
const Uint32& getFlags() const;
|
||||
private:
|
||||
Node * mCtrl;
|
||||
Node * mNode;
|
||||
Uint32 mMsg;
|
||||
Uint32 mFlags;
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace EE { namespace Scene {
|
||||
|
||||
class SceneNode;
|
||||
|
||||
class SceneManager : public Container<SceneNode> {
|
||||
class EE_API SceneManager : public Container<SceneNode> {
|
||||
SINGLETON_DECLARE_HEADERS(SceneManager)
|
||||
public:
|
||||
SceneManager();
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
namespace EE { namespace Scene {
|
||||
|
||||
Event::Event( Node * control, const Uint32& eventType ) :
|
||||
mCtrl( control ),
|
||||
Event::Event( Node * node, const Uint32& eventType ) :
|
||||
mNode( node ),
|
||||
mEventType( eventType )
|
||||
{
|
||||
}
|
||||
@@ -14,7 +14,7 @@ Event::~Event()
|
||||
}
|
||||
|
||||
Node * Event::getNode() const {
|
||||
return mCtrl;
|
||||
return mNode;
|
||||
}
|
||||
|
||||
const Uint32& Event::getType() const {
|
||||
|
||||
@@ -14,7 +14,7 @@ EventDispatcher * EventDispatcher::New( SceneNode * sceneNode ) {
|
||||
EventDispatcher::EventDispatcher( SceneNode * sceneNode ) :
|
||||
mWindow( sceneNode->getWindow() ),
|
||||
mInput( mWindow->getInput() ),
|
||||
mControl( sceneNode ),
|
||||
mSceneNode( sceneNode ),
|
||||
mFocusControl( sceneNode ),
|
||||
mOverControl( NULL ),
|
||||
mDownControl( NULL ),
|
||||
@@ -46,8 +46,8 @@ void EventDispatcher::inputCallback( InputEvent * Event ) {
|
||||
case InputEvent::VideoResize:
|
||||
case InputEvent::VideoExpose:
|
||||
{
|
||||
if ( NULL != mControl )
|
||||
mControl->invalidate();
|
||||
if ( NULL != mSceneNode )
|
||||
mSceneNode->invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void EventDispatcher::update( const Time& elapsed ) {
|
||||
mMousePos = mInput->getMousePosFromView( mWindow->getDefaultView() );
|
||||
mMousePosi = mMousePos.asInt();
|
||||
|
||||
Node * pOver = mControl->overFind( mMousePos );
|
||||
Node * pOver = mSceneNode->overFind( mMousePos );
|
||||
|
||||
if ( pOver != mOverControl ) {
|
||||
if ( NULL != mOverControl ) {
|
||||
@@ -238,7 +238,7 @@ Vector2f EventDispatcher::getMousePosf() {
|
||||
}
|
||||
|
||||
SceneNode *EventDispatcher::getSceneNode() const {
|
||||
return mControl;
|
||||
return mSceneNode;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
|
||||
namespace EE { namespace Scene {
|
||||
|
||||
MouseEvent::MouseEvent( Node * Ctrl, const Uint32& EventNum, const Vector2i& Pos, const Uint32& Flags ) :
|
||||
Event( Ctrl, EventNum ),
|
||||
MouseEvent::MouseEvent( Node * node, const Uint32& EventNum, const Vector2i& Pos, const Uint32& Flags ) :
|
||||
Event( node, EventNum ),
|
||||
mPos( Pos ),
|
||||
mFlags( Flags )
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
MouseEvent::~MouseEvent()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
const Vector2i& MouseEvent::getPosition() const {
|
||||
return mPos;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
namespace EE { namespace Scene {
|
||||
|
||||
NodeMessage::NodeMessage( Node * node, const Uint32& Msg, const Uint32& Flags ) :
|
||||
mCtrl( node ),
|
||||
mNode( node ),
|
||||
mMsg( Msg ),
|
||||
mFlags( Flags )
|
||||
{
|
||||
@@ -15,7 +15,7 @@ NodeMessage::~NodeMessage()
|
||||
}
|
||||
|
||||
Node * NodeMessage::getSender() const {
|
||||
return mCtrl;
|
||||
return mNode;
|
||||
}
|
||||
|
||||
const Uint32& NodeMessage::getMsg() const {
|
||||
|
||||
Reference in New Issue
Block a user