next is keyboard bugs

This commit is contained in:
cuu
2018-11-27 15:33:42 +08:00
parent 098105f890
commit fc7afbb680
13 changed files with 76 additions and 40 deletions

View File

@@ -61,7 +61,7 @@ func (self *InfoPageListItem) Draw() {
x,_ = self.Labels["Small"].Coord()
w,h = self.Labels["Small"].Size()
self.Labels["Small"].NewCoord( self.Width - w + 5 , self.PosY + (self.Height - h)/2 )
self.Labels["Small"].NewCoord( self.Width - w - 5 , self.PosY + (self.Height - h)/2 )
self.Labels["Small"].Draw()
}

View File

@@ -101,7 +101,8 @@ func (self *Textarea) AppendAndBlitText(alphabet string) {
func (self *Textarea) BuildBlitText() {
blit_rows := make([][]string,0)
blit_rows = append(blit_rows,[]string{})
w := 0
// xmargin := 5
endmargin :=15
@@ -114,11 +115,7 @@ func (self *Textarea) BuildBlitText() {
t_width := surface.GetWidth(t)
w+=t_width
if linenumber < len(blit_rows) {
blit_rows[linenumber] = append(blit_rows[linenumber],v)
}else {
blit_rows = append(blit_rows,[]string{v})
}
blit_rows[linenumber] = append(blit_rows[linenumber],v)
if i == self.TextIndex - 1 {
cursor_row = linenumber