| 30 | #include "Push2Control.h" |
| 31 | |
| 32 | DropdownList::DropdownList(IDropdownListener* owner, const char* name, int x, int y, int* var, float width) |
| 33 | : mVar(var) |
| 34 | , mLastSetValue(*var) |
| 35 | , mModalList(this) |
| 36 | , mOwner(owner) |
| 37 | { |
| 38 | assert(owner); |
| 39 | SetName(name); |
| 40 | mLabelSize = GetStringWidth(name) + 3; |
| 41 | SetPosition(x, y); |
| 42 | SetParent(dynamic_cast<IClickable*>(owner)); |
| 43 | (dynamic_cast<IDrawableModule*>(owner))->AddUIControl(this); |
| 44 | |
| 45 | mModalList.SetTypeName("dropdownlist", kModuleCategory_Other); |
| 46 | |
| 47 | if (width == -1) |
| 48 | mAutoCalculateWidth = true; |
| 49 | else |
| 50 | mWidth = width; |
| 51 | } |
| 52 | |
| 53 | DropdownList::DropdownList(IDropdownListener* owner, const char* name, IUIControl* anchor, AnchorDirection anchorDirection, int* var, float width) |
| 54 | : DropdownList(owner, name, -1, -1, var, width) |
nothing calls this directly
no test coverage detected