aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wintermute/ui/ui_object.cpp10
-rw-r--r--engines/wintermute/ui/ui_object.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp
index 73d7d0f2e6..224e68add7 100644
--- a/engines/wintermute/ui/ui_object.cpp
+++ b/engines/wintermute/ui/ui_object.cpp
@@ -648,11 +648,11 @@ bool UIObject::saveAsText(BaseDynamicBuffer *buffer, int indent) {
return STATUS_FAILED;
}
-int32 UIObject::getWidth() {
+int32 UIObject::getWidth() const {
return _width;
}
-int32 UIObject::getHeight() {
+int32 UIObject::getHeight() const {
return _height;
}
@@ -698,7 +698,7 @@ void UIObject::setSharedImages(bool shared) {
_sharedImages = shared;
}
-BaseSprite *UIObject::getImage() {
+BaseSprite *UIObject::getImage() const {
return _image;
}
@@ -714,11 +714,11 @@ void UIObject::setFont(BaseFont *font) {
_font = font;
}
-BaseFont *UIObject::getFont() {
+BaseFont *UIObject::getFont() const {
return _font;
}
-BaseScriptHolder *UIObject::getListener() {
+BaseScriptHolder *UIObject::getListener() const {
return _listenerObject;
}
diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h
index 8451479455..d9be29ba9a 100644
--- a/engines/wintermute/ui/ui_object.h
+++ b/engines/wintermute/ui/ui_object.h
@@ -56,7 +56,7 @@ public:
UIObject(BaseGame *inGame = nullptr);
virtual ~UIObject();
void setListener(BaseScriptHolder *object, BaseScriptHolder *listenerObject, uint32 listenerParam);
- BaseScriptHolder *getListener();
+ BaseScriptHolder *getListener() const;
UIObject *_focusedWidget;
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
@@ -68,8 +68,8 @@ public:
virtual const char *scToString() override;
TUIObjectType _type;
- int32 getWidth();
- int32 getHeight();
+ int32 getWidth() const;
+ int32 getHeight() const;
void setHeight(int32 height);
void setWidth(int32 width);
bool isDisabled();
@@ -80,10 +80,10 @@ public:
void setSharedFonts(bool shared);
bool hasSharedImages();
void setSharedImages(bool shared);
- BaseSprite *getImage();
+ BaseSprite *getImage() const;
void setImage(BaseSprite *image);
void setFont(BaseFont *font);
- BaseFont *getFont();
+ BaseFont *getFont() const;
bool canFocus();
protected: