Got scroll container working
This commit is contained in:
@@ -26,8 +26,8 @@ func NewArtist () (element *Artist) {
|
||||
|
||||
func (element *Artist) draw () {
|
||||
bounds := element.Bounds()
|
||||
element.cellBounds.Max.X = bounds.Dx() / 5
|
||||
element.cellBounds.Max.Y = (bounds.Dy() - 48) / 8
|
||||
element.cellBounds.Max.X = bounds.Min.X + bounds.Dx() / 5
|
||||
element.cellBounds.Max.Y = bounds.Min.Y + (bounds.Dy() - 48) / 8
|
||||
|
||||
drawStart := time.Now()
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@ func (element *Mouse) draw () {
|
||||
bounds)
|
||||
artist.Line (
|
||||
element, artist.NewUniform(color.White), 1,
|
||||
image.Pt(1, 1),
|
||||
image.Pt(bounds.Dx() - 2, bounds.Dy() - 2))
|
||||
bounds.Min.Add(image.Pt(1, 1)),
|
||||
bounds.Min.Add(image.Pt(bounds.Dx() - 2, bounds.Dy() - 2)))
|
||||
artist.Line (
|
||||
element, artist.NewUniform(color.White), 1,
|
||||
image.Pt(1, bounds.Dy() - 2),
|
||||
image.Pt(bounds.Dx() - 2, 1))
|
||||
bounds.Min.Add(image.Pt(1, bounds.Dy() - 2)),
|
||||
bounds.Min.Add(image.Pt(bounds.Dx() - 2, 1)))
|
||||
}
|
||||
|
||||
func (element *Mouse) HandleMouseDown (x, y int, button tomo.Button) {
|
||||
|
||||
Reference in New Issue
Block a user