diff options
Diffstat (limited to 'Stars45/ComboBox.cpp')
-rw-r--r-- | Stars45/ComboBox.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Stars45/ComboBox.cpp b/Stars45/ComboBox.cpp index 4a5d919..bb01bcd 100644 --- a/Stars45/ComboBox.cpp +++ b/Stars45/ComboBox.cpp @@ -179,7 +179,7 @@ ComboBox::Draw() DrawText(caption.data(), 0, label_rect, DT_CALCRECT | DT_WORDBREAK | text_align); vert_space = (vert_space - label_rect.h)/2; - + label_rect.w = horz_space; if (vert_space > 0) @@ -290,7 +290,7 @@ int ComboBox::OnClick() } int ComboBox::OnMouseEnter(int mx, int my) -{ +{ if (button_state == 0) button_state = -1; @@ -320,7 +320,7 @@ void ComboBox::MoveTo(const Rect& r) void ComboBox::ShowList() { if (!list) { - list = new(__FILE__,__LINE__) ComboList(this, screen, + list = new(__FILE__,__LINE__) ComboList(this, screen, rect.x, rect.y, rect.w, rect.h, items.size()); @@ -366,7 +366,7 @@ void ComboBox::OnListSelect(AWEvent* event) { if (list) { int new_seln = list->GetSelectedIndex(); - + if (new_seln >= 0 && new_seln < items.size()) seln = new_seln; |