mirror of https://github.com/OrbTools/OrbBind
refactoring
parent
4e26edd5ed
commit
fef4d61b99
@ -1,28 +0,0 @@
|
||||
package orbweaver
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
"fyne.io/fyne"
|
||||
)
|
||||
|
||||
//PKM format for altering the keymap
|
||||
type PKM struct {
|
||||
MIP [20]uint16
|
||||
SIP [6]uint16
|
||||
COL [3]byte
|
||||
}
|
||||
|
||||
//SaveIntoKeymap saves an orb
|
||||
func SaveIntoKeymap(mapped *PKM, file fyne.URIWriteCloser) {
|
||||
binary.Write(file, binary.LittleEndian, mapped)
|
||||
file.Close()
|
||||
}
|
||||
|
||||
//LoadFile loads an orb
|
||||
func LoadFile(file fyne.URIReadCloser) *PKM {
|
||||
mapped := new(PKM)
|
||||
binary.Read(file, binary.LittleEndian, mapped)
|
||||
file.Close()
|
||||
return mapped
|
||||
}
|
Loading…
Reference in New Issue