Documentation
¶
Index ¶
- Constants
- type Button
- type Clicker
- type Mouse
- func (m *Mouse) Info()
- func (m *Mouse) LeftButtonDown()
- func (m *Mouse) LeftButtonUp()
- func (m *Mouse) Move(x, y uint32, screen Screen)
- func (m *Mouse) Reset(screen Screen)
- func (m *Mouse) RightButtonDown()
- func (m *Mouse) RightButtonUp()
- func (m *Mouse) ScrollDown()
- func (m *Mouse) ScrollUp()
- func (m *Mouse) Sensitivity(val uint8)
- type Screen
- type Scroller
- type Wheel
Constants ¶
const ( Height uint32 = 768 Width uint32 = 1024 )
Screen height and width constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct {
IsPressed bool
}
Button implements Clicker interface methods and contains a button pressed state.
type Clicker ¶
type Clicker interface { Up() Down() State() bool }
Clicker is the interface which contains required methods to use as a button.
The structure that implement this interface must store the boolean state of the button click.
type Mouse ¶
type Mouse struct {
// contains filtered or unexported fields
}
Mouse stores mouse states and settings.
func (*Mouse) LeftButtonDown ¶
func (m *Mouse) LeftButtonDown()
LeftButtonDown simulates the left button pressed.
func (*Mouse) LeftButtonUp ¶
func (m *Mouse) LeftButtonUp()
LeftButtonUp simulates the left button released.
func (*Mouse) RightButtonDown ¶
func (m *Mouse) RightButtonDown()
RightButtonDown simulates the right button pressed.
func (*Mouse) RightButtonUp ¶
func (m *Mouse) RightButtonUp()
RightButtonUp simulates the right button released.
func (*Mouse) Sensitivity ¶
Sensitivity sets a new value for mouse sensitivity.
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
Screen stores screen borders so that the mouse cursor does not run behind them
type Scroller ¶
type Scroller interface { ScrollUp() ScrollDown() State() uint8 }
Scroller is the interface which contains required methods to use as a mouse wheel.
The structure that implement this interface must store the mouse wheel scroll value.
type Wheel ¶
type Wheel struct {
ScrollValue uint8
}
Wheel implements Scroller interface methods and contains a scroll value.
func NewWheel ¶
func NewWheel() *Wheel
NewWheel returns new Wheel structure object with a scroll value by default.
func (*Wheel) ScrollDown ¶
func (w *Wheel) ScrollDown()
ScrollDown simulates mouse wheel scroll down.