123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- 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;
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
|