File size: 3,034 Bytes
24b81cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
class UIScriptedWindow
{
Widget m_WgtRoot;
int m_Id;
//---MOVE TO UIMANAGER WHEN FIXED
static ref map<int, UIScriptedWindow> m_ActiveWindows;
static void AddToActiveWindows( int id, UIScriptedWindow window )
{
if ( m_ActiveWindows == NULL )
{
m_ActiveWindows = new map<int, UIScriptedWindow>;
}
m_ActiveWindows.Insert( id, window );
}
static void RemoveFromActiveWindows( int id )
{
if ( m_ActiveWindows )
{
m_ActiveWindows.Remove( id );
}
}
static UIScriptedWindow GetWindow( int id )
{
if ( m_ActiveWindows )
{
return m_ActiveWindows.Get( id );
}
return NULL;
}
static map<int, UIScriptedWindow> GetActiveWindows()
{
return m_ActiveWindows;
}
//---
void UIScriptedWindow(int id)
{
m_Id = id;
}
void ~UIScriptedWindow()
{
GetWidgetRoot().Show(false);
delete GetWidgetRoot();
}
Widget GetWidgetRoot()
{
return m_WgtRoot;
}
Widget Init()
{
}
void ShowWindow()
{
GetWidgetRoot().Show( true );
}
void HideWindow()
{
GetWidgetRoot().Show( false );
}
void CloseWindow()
{
GetGame().GetUIManager().CloseWindow( m_Id );
}
//--- EVENTS
bool OnClick(Widget w, int x, int y, int button)
{
return false;
}
bool OnModalResult(Widget w, int x, int y, int code, int result)
{
return false;
}
bool OnDoubleClick(Widget w, int x, int y, int button)
{
return false;
}
bool OnSelect(Widget w, int x, int y)
{
return false;
}
bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
{
return false;
}
bool OnFocus(Widget w, int x, int y)
{
return false;
}
bool OnFocusLost(Widget w, int x, int y)
{
return false;
}
bool OnMouseEnter(Widget w, int x, int y)
{
return false;
}
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
{
return false;
}
bool OnMouseButtonDown(Widget w, int x, int y, int button)
{
return false;
}
bool OnMouseButtonUp(Widget w, int x, int y, int button)
{
return false;
}
bool OnMouseWheel(Widget w, int x, int y, int wheel)
{
return false;
}
bool OnController(Widget w, int control, int value)
{
return false;
}
bool OnKeyDown(Widget w, int x, int y, int key)
{
return false;
}
bool OnKeyUp(Widget w, int x, int y, int key)
{
return false;
}
bool OnKeyPress(Widget w, int x, int y, int key)
{
return false;
}
bool OnChange(Widget w, int x, int y, bool finished)
{
return false;
}
bool OnDrag(Widget w, int x, int y)
{
return false;
}
bool OnDragging(Widget w, int x, int y, Widget reciever)
{
return false;
}
bool OnDraggingOver(Widget w, int x, int y, Widget reciever)
{
return false;
}
bool OnDrop(Widget w, int x, int y, Widget reciever)
{
return false;
}
bool OnDropReceived(Widget w, int x, int y, Widget reciever)
{
return false;
}
bool OnEvent(EventType eventType, Widget target, int parameter0, int parameter1)
{
return false;
}
} |