plugin_init.go 908 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package Sound
  2. /*
  3. * need amixer
  4. * `sudo apt-get install alsa-utils`
  5. */
  6. import (
  7. /*
  8. "github.com/veandco/go-sdl2/ttf"
  9. "github.com/cuu/gogame/surface"
  10. "github.com/cuu/gogame/event"
  11. "github.com/cuu/gogame/rect"
  12. "github.com/cuu/gogame/color"
  13. */
  14. "github.com/clockworkpi/LauncherGoDev/sysgo/UI"
  15. //"github.com/clockworkpi/LauncherGoDev/sysgo/DBUS"
  16. )
  17. /******************************************************************************/
  18. type SoundPlugin struct {
  19. UI.Plugin
  20. SoundPage *SoundPage
  21. }
  22. func (self *SoundPlugin) Init(main_screen *UI.MainScreen) {
  23. self.SoundPage = NewSoundPage()
  24. self.SoundPage.SetScreen(main_screen)
  25. self.SoundPage.SetName("Sound Volume")
  26. self.SoundPage.Init()
  27. }
  28. func (self *SoundPlugin) Run(main_screen *UI.MainScreen) {
  29. if main_screen != nil {
  30. main_screen.PushCurPage()
  31. main_screen.SetCurPage(self.SoundPage)
  32. main_screen.Refresh()
  33. }
  34. }
  35. var APIOBJ SoundPlugin