summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/DropDown.cpp2
-rw-r--r--src/interface/Engine.cpp8
-rw-r--r--src/interface/Engine.h7
3 files changed, 16 insertions, 1 deletions
diff --git a/src/interface/DropDown.cpp b/src/interface/DropDown.cpp
index 7e8ee7f..0b05aac 100644
--- a/src/interface/DropDown.cpp
+++ b/src/interface/DropDown.cpp
@@ -88,7 +88,7 @@ DropDown::DropDown(Point position, Point size):
void DropDown::OnMouseClick(int x, int y, unsigned int button)
{
DropDownWindow * newWindow = new DropDownWindow(this);
- ui::Engine().Ref().ShowWindow(newWindow);
+ ui::Engine::Ref().ShowWindow(newWindow);
}
void DropDown::Draw(const Point& screenPos)
diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp
index 1a8ad95..044b5e5 100644
--- a/src/interface/Engine.cpp
+++ b/src/interface/Engine.cpp
@@ -14,6 +14,8 @@ using namespace std;
Engine::Engine():
state_(NULL),
+ maxWidth(0),
+ maxHeight(0),
mousex_(0),
mousey_(0),
mousexp_(0),
@@ -148,6 +150,12 @@ void Engine::SetSize(int width, int height)
height_ = height;
}
+void Engine::SetMaxSize(int width, int height)
+{
+ maxWidth = width;
+ maxHeight = height;
+}
+
void Engine::Tick()
{
if(state_ != NULL)
diff --git a/src/interface/Engine.h b/src/interface/Engine.h
index e9c4354..bcf10e6 100644
--- a/src/interface/Engine.h
+++ b/src/interface/Engine.h
@@ -57,6 +57,10 @@ namespace ui
inline int GetMouseY() { return mousey_; }
inline int GetWidth() { return width_; }
inline int GetHeight() { return height_; }
+ inline int GetMaxWidth() { return maxWidth; }
+ inline int GetMaxHeight() { return maxHeight; }
+
+ inline void SetMaxSize(int width, int height);
inline void SetSize(int width, int height);
@@ -90,6 +94,9 @@ namespace ui
int mouseyp_;
int width_;
int height_;
+
+ int maxWidth;
+ int maxHeight;
};
}