Cameron Hart 14 лет назад
Родитель
Сommit
9b512a01ed
2 измененных файлов с 12 добавлено и 12 удалено
  1. 6 6
      Core/Contents/Include/PolyScreenEntity.h
  2. 6 6
      Core/Contents/Source/PolyScreenEntity.cpp

+ 6 - 6
Core/Contents/Include/PolyScreenEntity.h

@@ -69,7 +69,7 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		* Returns current rotation.
 		* Returns current rotation.
 		* @return Current rotation value.
 		* @return Current rotation value.
 		*/						
 		*/						
-		Number getRotation();
+		Number getRotation() const;
 			
 			
 		bool _onMouseDown(Number x, Number y, int mouseButton, int timestamp);
 		bool _onMouseDown(Number x, Number y, int mouseButton, int timestamp);
 		bool _onMouseUp(Number x, Number y, int mouseButton, int timestamp);
 		bool _onMouseUp(Number x, Number y, int mouseButton, int timestamp);
@@ -89,7 +89,7 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		virtual void onKeyDown(PolyKEY key, wchar_t charCode){}
 		virtual void onKeyDown(PolyKEY key, wchar_t charCode){}
 		virtual void onKeyUp(PolyKEY key, wchar_t charCode){}
 		virtual void onKeyUp(PolyKEY key, wchar_t charCode){}
 		
 		
-		bool hitTest(Number x, Number y);		
+		bool hitTest(Number x, Number y) const;
 	
 	
 		Matrix4 buildPositionMatrix();
 		Matrix4 buildPositionMatrix();
 		void adjustMatrixForChildren();
 		void adjustMatrixForChildren();
@@ -98,13 +98,13 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		* Returns the width of the screen entity.
 		* Returns the width of the screen entity.
 		* @return Height of the screen entity.
 		* @return Height of the screen entity.
 		*/									
 		*/									
-		Number getWidth();
+		Number getWidth() const;
 		
 		
 		/**
 		/**
 		* Returns the height of the screen entity.
 		* Returns the height of the screen entity.
 		* @param w New height value.
 		* @param w New height value.
 		*/											
 		*/											
-		Number getHeight();
+		Number getHeight() const;
 	
 	
 		/**
 		/**
 		* Sets the width of the screen entity.
 		* Sets the width of the screen entity.
@@ -142,12 +142,12 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		void focusChild(ScreenEntity *child);
 		void focusChild(ScreenEntity *child);
 		void focusNextChild();
 		void focusNextChild();
 	
 	
-		Vector2 getPosition2D();
+		Vector2 getPosition2D() const;
 		
 		
 		static const int POSITION_TOPLEFT = 0;
 		static const int POSITION_TOPLEFT = 0;
 		static const int POSITION_CENTER = 1;
 		static const int POSITION_CENTER = 1;
 
 
-		bool isFocusable();
+		bool isFocusable() const;
 		
 		
 		bool hasFocus;
 		bool hasFocus;
 		bool blockMouseInput;
 		bool blockMouseInput;

+ 6 - 6
Core/Contents/Source/PolyScreenEntity.cpp

@@ -82,7 +82,7 @@ void ScreenEntity::focusNextChild() {
 	}
 	}
 }
 }
 
 
-Number ScreenEntity::getRotation() {
+Number ScreenEntity::getRotation() const {
 	return this->getRoll();
 	return this->getRoll();
 }
 }
 
 
@@ -96,7 +96,7 @@ void ScreenEntity::focusChild(ScreenEntity *child) {
 	focusedChild->onGainFocus();
 	focusedChild->onGainFocus();
 }
 }
 
 
-bool ScreenEntity::isFocusable() {
+bool ScreenEntity::isFocusable() const {
 	return focusable;
 	return focusable;
 }
 }
 
 
@@ -130,15 +130,15 @@ void ScreenEntity::setScale(Number x, Number y) {
 	matrixDirty = true;	
 	matrixDirty = true;	
 }
 }
 
 
-Number ScreenEntity::getWidth() {
+Number ScreenEntity::getWidth() const {
 	return width;
 	return width;
 }
 }
 
 
-Number ScreenEntity::getHeight() {
+Number ScreenEntity::getHeight() const {
 	return height;
 	return height;
 }
 }
 
 
-bool ScreenEntity::hitTest(Number x, Number y) {
+bool ScreenEntity::hitTest(Number x, Number y) const {
 	bool retVal = false;
 	bool retVal = false;
     // apply compound scale to test hit against
     // apply compound scale to test hit against
     Vector3 compScale = getCompoundScale();
     Vector3 compScale = getCompoundScale();
@@ -362,7 +362,7 @@ void ScreenEntity::setRotation(Number rotation) {
 	setRoll(rotation);
 	setRoll(rotation);
 }
 }
 
 
-Vector2 ScreenEntity::getPosition2D() {
+Vector2 ScreenEntity::getPosition2D() const {
 	return Vector2(position.x, position.y);
 	return Vector2(position.x, position.y);
 }
 }