This commit is contained in:
cuu
2018-10-11 03:19:26 +08:00
parent a409bc6200
commit 982a7b42a2
3 changed files with 422 additions and 6 deletions

View File

@@ -11,6 +11,14 @@ import (
)
type TextItemInterface interface{
GetBold() bool
SetBold(bold bool)
GetStr() string
Draw()
}
type TextItem struct {
IconItem
Str string
@@ -28,6 +36,18 @@ func NewTextItem() *TextItem {
return p
}
func (self *TextItem) GetBold() bool {
return self.Bold
}
func (self *TextItem) SetBold(bold bool) {
self.Bold = bold
}
func (self *TextItem) GetStr() string {
return self.Str
}
func (self *TextItem) Draw() {
font.SetBold(self.FontObj,self.Bold)