Compare commits
2 Commits
79f81688bb
...
a64c27953a
Author | SHA1 | Date | |
---|---|---|---|
a64c27953a | |||
8f555f82ee |
1
box.go
1
box.go
@ -117,6 +117,7 @@ func (this *box) SetColor (c color.Color) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *box) SetTexture (texture canvas.Texture) {
|
func (this *box) SetTexture (texture canvas.Texture) {
|
||||||
|
if this.texture == texture { return }
|
||||||
this.texture = xcanvas.AssertTexture(texture)
|
this.texture = xcanvas.AssertTexture(texture)
|
||||||
this.invalidateDraw()
|
this.invalidateDraw()
|
||||||
}
|
}
|
||||||
|
@ -31,11 +31,13 @@ func (backend *Backend) NewContainerBox() tomo.ContainerBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *containerBox) SetColor (c color.Color) {
|
func (this *containerBox) SetColor (c color.Color) {
|
||||||
|
if this.color == c { return }
|
||||||
this.box.SetColor(c)
|
this.box.SetColor(c)
|
||||||
this.invalidateTransparentChildren()
|
this.invalidateTransparentChildren()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *containerBox) SetTexture (texture canvas.Texture) {
|
func (this *containerBox) SetTexture (texture canvas.Texture) {
|
||||||
|
if this.texture == texture { return }
|
||||||
this.box.SetTexture(texture)
|
this.box.SetTexture(texture)
|
||||||
this.invalidateTransparentChildren()
|
this.invalidateTransparentChildren()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user