From a12232f527666695c57a6014401c1a34c2fb6611 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 17 Aug 2013 14:57:40 +0200 Subject: GUI is now locked on slow operations (e.g. Filling). --- tools.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools.go') diff --git a/tools.go b/tools.go index 6397223..e4fd34a 100644 --- a/tools.go +++ b/tools.go @@ -15,6 +15,7 @@ type XZPos struct { type Tool interface { SingleClick() bool // Whether only one click should be performed (true) or the action should be repeated, if the mouse is dragged + IsSlow() bool Do(bio mcmap.Biome, biogs BiomeGetSetter, x, z int) } @@ -23,6 +24,7 @@ type drawTool struct { } func (d *drawTool) SingleClick() bool { return false } +func (d *drawTool) IsSlow() bool { return false } func (d *drawTool) Do(bio mcmap.Biome, biogs BiomeGetSetter, x, z int) { rad := d.radGetter() @@ -44,6 +46,7 @@ func NewDrawTool(radGetter func() int) *drawTool { type fillTool struct{} func (f *fillTool) SingleClick() bool { return true } +func (f *fillTool) IsSlow() bool { return true } func chkBounds(x, z, xStart, zStart, xEnd, zEnd int) bool { return (x >= xStart) && (z >= zStart) && (x < xEnd) && (z < zEnd) -- cgit v1.2.3-70-g09d2