mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-20 10:52:52 +01:00
keyboard
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package UI
|
||||
|
||||
import (
|
||||
|
||||
"github.com/cuu/gogame/draw"
|
||||
"github.com/cuu/gogame/surface"
|
||||
"github.com/cuu/gogame/color"
|
||||
)
|
||||
//sysgo/UI/keyboard_keys.layout
|
||||
@@ -19,6 +22,15 @@ func NewKeyboardIcon() *KeyboardIcon {
|
||||
return p
|
||||
}
|
||||
|
||||
func (self *KeyboardIcon) Draw() {
|
||||
|
||||
rect_ := draw.MidRect(self.PosX,self.PosY,self.Width,self.Height,Width,Height)
|
||||
|
||||
surface.Blit(self.Parent.GetCanvasHWND(),self.ImgSurf,rect_,nil)
|
||||
|
||||
}
|
||||
|
||||
|
||||
type KeyboardSelector struct {
|
||||
PageSelector
|
||||
Parent *Keyboard
|
||||
@@ -35,14 +47,51 @@ func (self *KeyboardSelector) Draw() {
|
||||
|
||||
}
|
||||
|
||||
type Keyboard {
|
||||
type Keyboard struct {
|
||||
Page
|
||||
|
||||
SectionNumbers int
|
||||
SectionIndex int
|
||||
Icons map[string]UI.IconItemInterface
|
||||
Icons map[string]IconItemInterface
|
||||
|
||||
KeyboardLayoutFile string ///sysgo/UI/keyboard_keys.layout
|
||||
|
||||
LeftOrRight int
|
||||
|
||||
RowIndex int
|
||||
|
||||
Textarea *Textarea
|
||||
Selector *KeyboardSelector
|
||||
|
||||
|
||||
}
|
||||
|
||||
func NewKeyboard() *Keyboard {
|
||||
p := &Keyboard{}
|
||||
|
||||
p.SectionNumbers = 3
|
||||
p.SectionIndex = 1
|
||||
|
||||
p.Icons = make( map[string]IconItemInterface )
|
||||
|
||||
p.LeftOrRight = 1
|
||||
|
||||
p.RowIndex = 0
|
||||
|
||||
p.FootMsg = [5]string{"Nav.","ABC","Done","Backspace","Enter"}
|
||||
|
||||
return p
|
||||
|
||||
}
|
||||
|
||||
func (self *Keyboard) ReadLayoutFile( fname string) {
|
||||
|
||||
/*
|
||||
LayoutIndex := 0
|
||||
|
||||
content ,err := ReadLines(fname)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user