MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / Create

Method Create

ui/UIHotspot.cpp:95–112  ·  view source on GitHub ↗

optional key, when pressed, triggers hotspot.

Source from the content-addressed store, hash-verified

93
94// optional key, when pressed, triggers hotspot.
95void 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
114void UIHotspot::SetStates(UIItem *itemoff, UIItem *itemon) {
115 ASSERT(itemoff);

Callers

nothing calls this directly

Calls 1

CopyUIItemMethod · 0.45

Tested by

no test coverage detected