summaryrefslogtreecommitdiff
path: root/src/interface/DropDown.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-13 19:54:29 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-13 19:54:29 (GMT)
commit41e1d28c56b6e4b9b380022e9220161c57612006 (patch)
treec21a061f94ba1a8282b1ef962ca7d9affe68ccc8 /src/interface/DropDown.cpp
parent7758fe52cb9ef78b562bc2587b17b6344d8829fe (diff)
downloadpowder-41e1d28c56b6e4b9b380022e9220161c57612006.zip
powder-41e1d28c56b6e4b9b380022e9220161c57612006.tar.gz
Correct air include path for OptionsModel, correct Window debugmode logic, justifications for sign
Diffstat (limited to 'src/interface/DropDown.cpp')
-rw-r--r--src/interface/DropDown.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/interface/DropDown.cpp b/src/interface/DropDown.cpp
index ea7d56a..d5af4c4 100644
--- a/src/interface/DropDown.cpp
+++ b/src/interface/DropDown.cpp
@@ -79,7 +79,8 @@ public:
DropDown::DropDown(Point position, Point size):
Component(position, size),
isMouseInside(false),
- optionIndex(-1)
+ optionIndex(-1),
+ callback(NULL)
{
background = activeBackground = Colour(0, 0, 0);
activeText = text = activeBackground = border = activeBorder = Colour(255, 255, 255);
@@ -114,6 +115,15 @@ void DropDown::Draw(const Point& screenPos)
}
+ std::pair<std::string, int> DropDown::GetOption()
+ {
+ if(optionIndex!=-1)
+ {
+ return options[optionIndex];
+ }
+ return std::pair<std::string, int>("", -1);
+ }
+
void DropDown::SetOption(std::string option)
{
for(int i = 0; i < options.size(); i++)