optional key, when pressed, triggers hotspot.
| 93 | |
| 94 | // optional key, when pressed, triggers hotspot. |
| 95 | void UIHotspot::Create(UIWindow *wnd, int id, int key, UIItem *itemoff, UIItem *itemon, int x, int y, int w, int h, |
| 96 | int flags) { |
| 97 | ASSERT(itemoff); |
| 98 | ASSERT(itemon); |
| 99 | |
| 100 | if (itemoff) |
| 101 | m_ItemOff = itemoff->CopyUIItem(); |
| 102 | if (itemon) |
| 103 | m_ItemOn = itemon->CopyUIItem(); |
| 104 | |
| 105 | m_ItemCur = m_ItemOff; |
| 106 | |
| 107 | UIGadget::Create(wnd, id, x, y, w, h, flags); |
| 108 | |
| 109 | if (key) { |
| 110 | UIGadget::SetHotkey(key); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | void UIHotspot::SetStates(UIItem *itemoff, UIItem *itemon) { |
| 115 | ASSERT(itemoff); |
nothing calls this directly
no test coverage detected