uipopupscript.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. class UIPopupScript
  2. {
  3. //================================================
  4. // UIPopupScript
  5. //================================================
  6. void UIPopupScript(Widget wgt)
  7. {
  8. m_WgtRoot = wgt;
  9. }
  10. void OnOpen(Param param)
  11. {
  12. }
  13. void OnClose()
  14. {
  15. }
  16. void Show(bool show)
  17. {
  18. m_WgtRoot.Show(show);
  19. }
  20. bool OnClick(Widget w, int x, int y, int button)
  21. {
  22. return false;
  23. }
  24. bool OnChange(Widget w, int x, int y, bool finished)
  25. {
  26. return false;
  27. }
  28. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. // PopupBack
  30. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31. protected UIPopupScript PopupBack()
  32. {
  33. SceneEditorMenu menu = SceneEditorMenu.Cast( GetGame().GetUIManager().GetMenu() );
  34. return menu.PopupBack();
  35. }
  36. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  37. // PopupOpen
  38. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. protected UIPopupScript PopupOpen(int popup_id, Param param)
  40. {
  41. SceneEditorMenu menu = SceneEditorMenu.Cast( GetGame().GetUIManager().GetMenu() );
  42. return menu.PopupOpen(popup_id, param);
  43. }
  44. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. // GetSceneEditor
  46. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47. protected PluginSceneManager GetSceneEditor()
  48. {
  49. PluginSceneManager m = PluginSceneManager.Cast( GetPlugin(PluginSceneManager) );
  50. return m;
  51. }
  52. protected Widget m_WgtRoot;
  53. }