sound_page,brightness_page,struct inherited bug,Draw

This commit is contained in:
cuu
2018-12-05 22:31:42 +08:00
parent 9261a1ae27
commit 947cfae038
5 changed files with 151 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
package UI
import (
// "fmt"
"fmt"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
@@ -241,7 +241,10 @@ func (self *IconItem) GetCmdInvoke() PluginInterface {
}
func (self *IconItem) Draw() {
if self.Parent == nil {
fmt.Println("Error: IconItem Draw Parent nil")
return
}
parent_x,parent_y := self.Parent.Coord()
if self.Label != nil {

View File

@@ -1,6 +1,7 @@
package UI
import (
"fmt"
"github.com/cuu/gogame/surface"
"github.com/cuu/gogame/image"
"github.com/cuu/gogame/draw"
@@ -31,6 +32,10 @@ func (self * MultiIconItem) CreateImgSurf() {
}
func (self *MultiIconItem) Draw() {
if self.Parent == nil {
fmt.Println("Error: MultiIconItem Draw Parent nil")
return
}
parent_x,parent_y := self.Parent.Coord()
if self.Label != nil {