Add a slider UI widget
I'm not too happy with how I have to configure the step for each one separately, but it's the best I can do at the moment.
This commit is contained in:
@@ -109,6 +109,19 @@ func (h *hoverImpl) setHoverState(hovering bool) {
|
||||
h.hovering = hovering
|
||||
}
|
||||
|
||||
// Mouseables are told where on the (original) screen the mouse cursor is
|
||||
type mouseable interface {
|
||||
registerMousePosition(image.Point)
|
||||
}
|
||||
|
||||
type mouseImpl struct {
|
||||
pos image.Point
|
||||
}
|
||||
|
||||
func (m *mouseImpl) registerMousePosition(pt image.Point) {
|
||||
m.pos = pt
|
||||
}
|
||||
|
||||
// Paintable encapsulates one or more regions to be painted to the screen
|
||||
type paintable interface {
|
||||
regions(tick int) []region
|
||||
|
Reference in New Issue
Block a user