input

package
v0.0.0-...-7483609 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 1 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
}

Input blabla

func CreateInput

func CreateInput() *Input

CreateInput blabla

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL