Documentation ¶
Overview ¶
Package input input.go Defines the callbacks needed for the whole input package to work.
Package input ordergenerator.go Defines how we handle our input.
Index ¶
- type Input
- type OrderGenerator
- type ScriptableOrderGenerator
- func (s *ScriptableOrderGenerator) AddKeyScript(code int, down bool, order string, value interface{})
- func (s *ScriptableOrderGenerator) GetOrders() []*munfall.Order
- func (s *ScriptableOrderGenerator) HandleKey(code int, state bool)
- func (s *ScriptableOrderGenerator) HandleMouseButton(button int)
- func (s *ScriptableOrderGenerator) HandleMouseMove(x, y float32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderGenerator ¶
type OrderGenerator interface { GetOrders() []*munfall.Order HandleKey(code int, state bool) HandleMouseMove(x, y float32) HandleMouseButton(button int) }
OrderGenerator issues orders based on input.
type ScriptableOrderGenerator ¶
type ScriptableOrderGenerator struct {
// contains filtered or unexported fields
}
ScriptableOrderGenerator an order generator implementation that allows you to add hotkeys as orders that will be generated.
func CreateScriptableOrderGenerator ¶
func CreateScriptableOrderGenerator() *ScriptableOrderGenerator
CreateScriptableOrderGenerator creates a ScriptableOrderGenerator and initializes it.
func (*ScriptableOrderGenerator) AddKeyScript ¶
func (s *ScriptableOrderGenerator) AddKeyScript(code int, down bool, order string, value interface{})
AddKeyScript adds a key as an order that this generator sends.
func (*ScriptableOrderGenerator) GetOrders ¶
func (s *ScriptableOrderGenerator) GetOrders() []*munfall.Order
GetOrders bla.
func (*ScriptableOrderGenerator) HandleKey ¶
func (s *ScriptableOrderGenerator) HandleKey(code int, state bool)
HandleKey handles key presses.
func (*ScriptableOrderGenerator) HandleMouseButton ¶
func (s *ScriptableOrderGenerator) HandleMouseButton(button int)
HandleMouseButton handles mouse buttons.
func (*ScriptableOrderGenerator) HandleMouseMove ¶
func (s *ScriptableOrderGenerator) HandleMouseMove(x, y float32)
HandleMouseMove handles mouse movement.
Click to show internal directories.
Click to hide internal directories.