mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-19 02:12:46 +01:00
multilabel
This commit is contained in:
63
Menu/GameShell/HelloWorld/helloworld.go
Normal file
63
Menu/GameShell/HelloWorld/helloworld.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/veandco/go-sdl2/ttf"
|
||||
|
||||
"github.com/cuu/LauncherGo/sysgo/UI"
|
||||
)
|
||||
|
||||
type InfoPageListItem struct{
|
||||
PosX int
|
||||
PosY int
|
||||
Width int
|
||||
Height int
|
||||
Labels map[string]LabelInterface
|
||||
Icons map[string]IconItemInterface
|
||||
Fonts map[string]*ttf.Font
|
||||
}
|
||||
|
||||
func (self *InfoPageListItem) SetSmallText( text string) {
|
||||
|
||||
}
|
||||
|
||||
type HelloWorldPage struct {
|
||||
UI.Page
|
||||
}
|
||||
|
||||
func NewHelloWorldPage() *HelloWorldPage {
|
||||
p := &HelloWorldPage{}
|
||||
|
||||
p.FootMsg = [5]string{"Nav.","","","Back",""}
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
|
||||
type HelloWorldPlugin struct {
|
||||
UI.Plugin
|
||||
Page UI.PageInterface
|
||||
}
|
||||
|
||||
|
||||
func (self *HelloWorldPlugin) Init( main_screen *UI.MainScreen ) {
|
||||
self.Page = HelloWorldPage{}
|
||||
self.Page.SetScreen( main_screen)
|
||||
self.Page.SetName("HelloWorld")
|
||||
self.Page.Init()
|
||||
}
|
||||
|
||||
func (self *HelloWorldPlugin) Run( main_screen *UI.MainScreen ) {
|
||||
if main_screen != nil {
|
||||
main_screen.PushPage(self.Page)
|
||||
main_screen.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
}
|
||||
}
|
||||
|
||||
var APIOBJ HelloWorldPlugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user