plugin_init.go 878 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package GateWay
  2. import (
  3. /*
  4. "github.com/veandco/go-sdl2/ttf"
  5. "github.com/cuu/gogame/surface"
  6. "github.com/cuu/gogame/event"
  7. "github.com/cuu/gogame/rect"
  8. "github.com/cuu/gogame/color"
  9. */
  10. "github.com/clockworkpi/LauncherGoDev/sysgo/UI"
  11. //"github.com/clockworkpi/LauncherGoDev/sysgo/DBUS"
  12. )
  13. /******************************************************************************/
  14. type GatewayPlugin struct {
  15. UI.Plugin
  16. Page1st *GateWayPage
  17. }
  18. func (self *GatewayPlugin) Init(main_screen *UI.MainScreen) {
  19. self.Page1st = NewGateWayPage()
  20. self.Page1st.SetScreen(main_screen)
  21. self.Page1st.SetName("Gateway switch")
  22. self.Page1st.Init()
  23. }
  24. func (self *GatewayPlugin) Run(main_screen *UI.MainScreen) {
  25. if main_screen != nil {
  26. main_screen.PushCurPage()
  27. main_screen.SetCurPage(self.Page1st)
  28. main_screen.Draw()
  29. main_screen.SwapAndShow()
  30. }
  31. }
  32. var APIOBJ GatewayPlugin