Documentation ¶
Index ¶
- type Action
- type Axis
- type Button
- type ButtonResources
- type CheckboxResources
- type ComboButtonResources
- type ControllerAxis
- type ControllerButton
- type Controls
- type Emulated
- type Font
- type HeaderResources
- type InputHandler
- type Key
- type LabelResources
- type ListResources
- type MouseAxis
- type MouseButton
- type PanelResources
- type ProgressBarResources
- type Resources
- type ScreenDimensions
- type SliderResources
- type TabBookResources
- type TextAreaResources
- type TextInputResources
- type TextResources
- type ToolTipResources
- type UIResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // Combinations contains buttons combinations Combinations [][]Button // Once determines if the action should be triggered every frame when the button is pressed (default) or only once Once bool }
Action contains buttons combinations with settings
type Axis ¶
type Axis struct {
Value interface{}
}
Axis can be an emulated axis, a gamepad axis or a mouse axis
func (*Axis) UnmarshalTOML ¶
UnmarshalTOML fills structure fields from TOML data
type Button ¶
type Button struct {
Value interface{}
}
Button can be a US keyboard key, a mouse button or a gamepad button
func (*Button) UnmarshalTOML ¶
UnmarshalTOML fills structure fields from TOML data
type ButtonResources ¶ added in v1.55.0
type ButtonResources struct { Image *widget.ButtonImage Text *widget.ButtonTextColor Face text.Face Padding widget.Insets }
type CheckboxResources ¶ added in v1.55.0
type CheckboxResources struct { Image *widget.ButtonImage Graphic *widget.CheckboxGraphicImage Spacing int }
type ComboButtonResources ¶ added in v1.55.0
type ComboButtonResources struct { Image *widget.ButtonImage Text *widget.ButtonTextColor Face text.Face Graphic *widget.ButtonImageImage Padding widget.Insets }
type ControllerAxis ¶
type ControllerAxis struct { ID ebiten.GamepadID Axis int Invert bool DeadZone float64 `toml:"dead_zone"` }
ControllerAxis is a gamepad axis
type ControllerButton ¶
type ControllerButton struct { ID ebiten.GamepadID GamepadButton ebiten.GamepadButton }
ControllerButton is a gamepad button
func (*ControllerButton) UnmarshalTOML ¶
func (b *ControllerButton) UnmarshalTOML(i interface{}) error
UnmarshalTOML fills structure fields from TOML data
type Controls ¶
type Controls struct { // Axes contains axis controls, used for inputs represented by a float value from -1 to 1 Axes map[string]Axis // Actions contains buttons combinations, used for general inputs Actions map[string]Action }
Controls contains input controls
type Font ¶
type Font struct { Font text.Face FaceSource *text.GoTextFaceSource // コピーが禁止されていて参照渡ししかできない }
Font structure
func (*Font) UnmarshalTOML ¶
UnmarshalTOML fills structure fields from TOML data
type HeaderResources ¶ added in v1.55.0
type InputHandler ¶
type InputHandler struct { // Axes contains input axis values Axes map[string]float64 // Actions contains input actions Actions map[string]bool }
InputHandler contains input axis values and actions corresponding to specified controls
type Key ¶
type Key struct {
Key ebiten.Key
}
Key is a US keyboard key
func (*Key) UnmarshalText ¶
UnmarshalText fills structure fields from text data
type LabelResources ¶ added in v1.55.0
type LabelResources struct { Text *widget.LabelColor Face text.Face }
type ListResources ¶ added in v1.55.0
type ListResources struct { Image *widget.ScrollContainerImage ImageTrans *widget.ScrollContainerImage Track *widget.SliderTrackImage TrackPadding widget.Insets Handle *widget.ButtonImage HandleSize int Face text.Face Entry *widget.ListEntryColor EntryPadding widget.Insets }
type MouseButton ¶
type MouseButton struct {
MouseButton ebiten.MouseButton
}
MouseButton is a mouse button
func (*MouseButton) UnmarshalText ¶
func (b *MouseButton) UnmarshalText(text []byte) error
UnmarshalText fills structure fields from text data
type PanelResources ¶ added in v1.55.0
type ProgressBarResources ¶ added in v1.55.0
type ProgressBarResources struct { TrackImage *widget.ProgressBarImage FillImage *widget.ProgressBarImage }
type Resources ¶
type Resources struct { ScreenDimensions *ScreenDimensions Controls *Controls InputHandler *InputHandler SpriteSheets *map[string]components.SpriteSheet Fonts *map[string]Font DefaultFaces *map[string]text.Face AudioContext *audio.Context AudioPlayers *map[string]*audio.Player Prefabs interface{} Game interface{} RawMaster interface{} UIResources *UIResources }
Resources contains references to data not related to any entity
type ScreenDimensions ¶
ScreenDimensions contains current screen dimensions
type SliderResources ¶ added in v1.55.0
type SliderResources struct { TrackImage *widget.SliderTrackImage Handle *widget.ButtonImage HandleSize int }
type TabBookResources ¶ added in v1.55.0
type TabBookResources struct { ButtonFace text.Face ButtonText *widget.ButtonTextColor ButtonPadding widget.Insets }
type TextAreaResources ¶ added in v1.55.0
type TextAreaResources struct { Image *widget.ScrollContainerImage Track *widget.SliderTrackImage TrackPadding widget.Insets Handle *widget.ButtonImage HandleSize int Face text.Face EntryPadding widget.Insets }
type TextInputResources ¶ added in v1.55.0
type TextInputResources struct { Image *widget.TextInputImage Padding widget.Insets Face text.Face Color *widget.TextInputColor }
type TextResources ¶ added in v1.55.0
type ToolTipResources ¶ added in v1.55.0
type UIResources ¶ added in v1.55.0
type UIResources struct { Fonts *fonts Background *image.NineSlice SeparatorColor color.Color Text *TextResources Button *ButtonResources Label *LabelResources Checkbox *CheckboxResources ComboButton *ComboButtonResources List *ListResources Slider *SliderResources ProgressBar *ProgressBarResources Panel *PanelResources TabBook *TabBookResources Header *HeaderResources TextInput *TextInputResources TextArea *TextAreaResources ToolTip *ToolTipResources }
func NewUIResources ¶ added in v1.55.0
func NewUIResources(tfs *text.GoTextFaceSource) (*UIResources, error)