Documentation
¶
Index ¶
- Constants
- Variables
- func ColorNdsValidation() func(string) (bool, *string)
- func HexValidation(maxValue int) func(string) (bool, *string)
- func MaskedColorTint(src img.Image, clrWhite, clrBlack color.Color) *img.RGBA
- func NewAboutMenu(g *Game) *widget.Container
- func NewApplyPalettesMenu(focusGroups *[][]widget.Focuser, pals map[string][4]string, ...) widget.PreferredSizeLocateableWidget
- func NewCenteredButton(text string, f func(*widget.ButtonClickedEventArgs)) *widget.Button
- func NewCenteredPage(bg *image.NineSlice, buttons ...*widget.Button) *widget.Container
- func NewCheckbox(value *bool) widget.PreferredSizeLocateableWidget
- func NewColorInput(ui *Ui, label string, v *color.Color, ...) widget.PreferredSizeLocateableWidget
- func NewDecimalInput(ui *Ui, label string, value any, maxValue int) *widget.TextInput
- func NewDirectoryInput(v *string, defaultPath string) widget.PreferredSizeLocateableWidget
- func NewFileInput(v *string) widget.PreferredSizeLocateableWidget
- func NewGamepadInput(ui *Ui, v *[]ebiten.StandardGamepadButton) widget.PreferredSizeLocateableWidget
- func NewGbMenu(g *Game) *widget.Container
- func NewGbaMenu(g *Game) *widget.Container
- func NewGeneralMenu(g *Game) *widget.Container
- func NewHeader(text string, res *Resources) *widget.Text
- func NewHexInput(ui *Ui, label string, value any, maxValue int) *widget.TextInput
- func NewHome(g *Game)
- func NewKeybindInput(ui *Ui, v *[]ebiten.Key) widget.PreferredSizeLocateableWidget
- func NewLabel(text string) *widget.Text
- func NewLinkText(text string) *widget.Text
- func NewNdsMenu(g *Game) *widget.Container
- func NewPause(g *Game)
- func NewRadioButton(label string, ptr *int, value int, res *Resources) *widget.Button
- func NewRadioInput(focusRadios *[][]widget.Focuser, ptr *int, values []string, res *Resources) widget.PreferredSizeLocateableWidget
- func NewSaveButton(text string, f func(*widget.ButtonClickedEventArgs)) widget.PreferredSizeLocateableWidget
- func NewScrollableContainer(ui *Ui) *widget.Container
- func NewSeparator() *widget.Container
- func NewSettings(g *Game, oldId PageId, initMenu int)
- func NewSidebarButton(g *Game, label string, f func(g *Game)) *widget.Button
- func NewTextBoxInput(ui *Ui, board int, label string, value any, ...) *widget.TextInput
- func NewTheme(r *Resources) *widget.Theme
- func NewUiMenu(g *Game) *widget.Container
- func NumberValidation(maxValue int) func(string) (bool, *string)
- func StartEngine()
- func StringValidation(maxLength int) func(string) (bool, *string)
- func TintImage(src *ebiten.Image, c color.Color) *ebiten.Image
- type AboutLocalization
- type BindingInput
- func (t *BindingInput) GetText() string
- func (t *BindingInput) GetWidget() *widget.Widget
- func (t *BindingInput) PreferredSize() (int, int)
- func (t *BindingInput) Render(screen *ebiten.Image)
- func (t *BindingInput) SetFocus(focused bool)
- func (t *BindingInput) SetGamepadBinding(gamepadIds *map[ebiten.GamepadID]struct{})
- func (t *BindingInput) SetLocation(rect img.Rectangle)
- func (t *BindingInput) SetText(text string)
- func (t *BindingInput) Update(updObj *widget.UpdateObject)
- func (t *BindingInput) Validate()
- type BindingInputChangedEventArgs
- type BindingInputChangedHandlerFunc
- type BindingInputColor
- type BindingInputImage
- type BindingInputOpt
- type BindingInputOptions
- func (o BindingInputOptions) ChangedHandler(f BindingInputChangedHandlerFunc) BindingInputOpt
- func (o BindingInputOptions) Color(c *BindingInputColor) BindingInputOpt
- func (o BindingInputOptions) Face(f *text.Face) BindingInputOpt
- func (o BindingInputOptions) Image(i *BindingInputImage) BindingInputOpt
- func (o BindingInputOptions) MobileInputMode(mobileInputMode mobile.InputMode) BindingInputOpt
- func (o BindingInputOptions) Padding(i *widget.Insets) BindingInputOpt
- func (o BindingInputOptions) Placeholder(s string) BindingInputOpt
- func (o BindingInputOptions) WidgetOpts(opts ...widget.WidgetOpt) BindingInputOpt
- type BindingInputParams
- type Focus
- func (f *Focus) BuildMenuFocus(menu *widget.Container, bindings ...*widget.Container)
- func (f *Focus) ClearFocus()
- func (f *Focus) DeFocus()
- func (f *Focus) FocusLastSidebar()
- func (f *Focus) FocusLastSubMenu()
- func (f *Focus) FocusSidebar(idx int)
- func (f *Focus) FocusSubmenu()
- func (f *Focus) KeepFocusedInView(slider *widget.Slider, ui *ebitenui.UI)
- type Game
- func (g *Game) ButtonInput(justButtons, buttons []ebiten.StandardGamepadButton)
- func (g *Game) Draw(screen *ebiten.Image)
- func (g *Game) GetGamepadButtons() (justButtons, buttons []ebiten.StandardGamepadButton)
- func (g *Game) HandleGlobalInputs(justKeys []ebiten.Key, justButtons, buttons []ebiten.StandardGamepadButton)
- func (g *Game) InitConsole(file string) bool
- func (g *Game) Layout(outsideWidth int, outsideHeight int) (int, int)
- func (g *Game) ToggleMute()
- func (g *Game) TogglePause()
- func (g *Game) Update() error
- type GbLocalization
- type GbaLocalization
- type GeneralLocalization
- type Keyboard
- type LangOptions
- type Localization
- type MainLocalization
- type NdsLocalization
- type PageId
- type PauseLocalization
- type Resources
- type SettingsLocalization
- type SidebarField
- type SidebarLocalization
- type Toast
- type ToastLocalization
- type Ui
- type UiLocalization
Constants ¶
View Source
const ( BOARD_ALPHA = iota BOARD_DEC BOARD_HEX BOARD_KEYBIND )
View Source
const ( MENU_GENERAL = iota MENU_UI MENU_GB MENU_GBA MENU_NDS MENU_ABOUT MENU_RETURN )
View Source
const ( MIN_HEIGHT = 32 BUTTON_WIDTH = 256 )
View Source
const MAX_DIALOG_LEN = 24
View Source
const TICKS_PER_TOAST = 60
Variables ¶
View Source
var ( DEC_KEYS = []string{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", } HEX_KEYS = []string{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", } KEYS_KEY_CONTROLLER = []string{ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", " ", } )
Functions ¶
func ColorNdsValidation ¶
func MaskedColorTint ¶
func NewAboutMenu ¶
func NewApplyPalettesMenu ¶
func NewApplyPalettesMenu(focusGroups *[][]widget.Focuser, pals map[string][4]string, clrInputs [4]widget.PreferredSizeLocateableWidget, res *Resources) widget.PreferredSizeLocateableWidget
func NewCenteredButton ¶
func NewCenteredButton(text string, f func(*widget.ButtonClickedEventArgs)) *widget.Button
func NewCenteredPage ¶
func NewCheckbox ¶
func NewCheckbox(value *bool) widget.PreferredSizeLocateableWidget
func NewColorInput ¶
func NewDecimalInput ¶
func NewDirectoryInput ¶
func NewDirectoryInput(v *string, defaultPath string) widget.PreferredSizeLocateableWidget
func NewFileInput ¶
func NewFileInput(v *string) widget.PreferredSizeLocateableWidget
func NewGamepadInput ¶
func NewGamepadInput(ui *Ui, v *[]ebiten.StandardGamepadButton) widget.PreferredSizeLocateableWidget
func NewGbaMenu ¶
func NewGeneralMenu ¶
func NewHexInput ¶
func NewKeybindInput ¶
func NewKeybindInput(ui *Ui, v *[]ebiten.Key) widget.PreferredSizeLocateableWidget
func NewLinkText ¶
func NewNdsMenu ¶
func NewRadioButton ¶
func NewRadioInput ¶
func NewSaveButton ¶
func NewSaveButton(text string, f func(*widget.ButtonClickedEventArgs)) widget.PreferredSizeLocateableWidget
func NewScrollableContainer ¶
func NewSeparator ¶
func NewSettings ¶
func NewSidebarButton ¶
func NewTextBoxInput ¶
func StartEngine ¶
func StartEngine()
Types ¶
type AboutLocalization ¶
type BindingInput ¶
func NewBindingInput ¶
func NewBindingInput(opts ...BindingInputOpt) *BindingInput
func (*BindingInput) GetText ¶
func (t *BindingInput) GetText() string
func (*BindingInput) GetWidget ¶
func (t *BindingInput) GetWidget() *widget.Widget
func (*BindingInput) PreferredSize ¶
func (t *BindingInput) PreferredSize() (int, int)
func (*BindingInput) Render ¶
func (t *BindingInput) Render(screen *ebiten.Image)
func (*BindingInput) SetFocus ¶
func (t *BindingInput) SetFocus(focused bool)
func (*BindingInput) SetGamepadBinding ¶
func (t *BindingInput) SetGamepadBinding(gamepadIds *map[ebiten.GamepadID]struct{})
func (*BindingInput) SetLocation ¶
func (t *BindingInput) SetLocation(rect img.Rectangle)
func (*BindingInput) SetText ¶
func (t *BindingInput) SetText(text string)
func (*BindingInput) Update ¶
func (t *BindingInput) Update(updObj *widget.UpdateObject)
func (*BindingInput) Validate ¶
func (t *BindingInput) Validate()
type BindingInputChangedEventArgs ¶
type BindingInputChangedEventArgs struct {
BindingInput *BindingInput
InputText string
Keys []ebiten.Key
Buttons []ebiten.StandardGamepadButton
OffsetX int
OffsetY int
}
type BindingInputChangedHandlerFunc ¶
type BindingInputChangedHandlerFunc func(args *BindingInputChangedEventArgs)
type BindingInputImage ¶
type BindingInputOpt ¶
type BindingInputOpt func(t *BindingInput)
type BindingInputOptions ¶
type BindingInputOptions struct{}
var BindingInputOpts BindingInputOptions
func (BindingInputOptions) ChangedHandler ¶
func (o BindingInputOptions) ChangedHandler(f BindingInputChangedHandlerFunc) BindingInputOpt
func (BindingInputOptions) Color ¶
func (o BindingInputOptions) Color(c *BindingInputColor) BindingInputOpt
func (BindingInputOptions) Face ¶
func (o BindingInputOptions) Face(f *text.Face) BindingInputOpt
func (BindingInputOptions) Image ¶
func (o BindingInputOptions) Image(i *BindingInputImage) BindingInputOpt
func (BindingInputOptions) MobileInputMode ¶
func (o BindingInputOptions) MobileInputMode(mobileInputMode mobile.InputMode) BindingInputOpt
https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode
func (BindingInputOptions) Padding ¶
func (o BindingInputOptions) Padding(i *widget.Insets) BindingInputOpt
func (BindingInputOptions) Placeholder ¶
func (o BindingInputOptions) Placeholder(s string) BindingInputOpt
func (BindingInputOptions) WidgetOpts ¶
func (o BindingInputOptions) WidgetOpts(opts ...widget.WidgetOpt) BindingInputOpt
type BindingInputParams ¶
type BindingInputParams struct {
Image *BindingInputImage
Color *BindingInputColor
Padding *widget.Insets
Face *text.Face
}
type Focus ¶
type Focus struct {
// contains filtered or unexported fields
}
func (*Focus) BuildMenuFocus ¶
func (*Focus) ClearFocus ¶
func (f *Focus) ClearFocus()
func (*Focus) FocusLastSidebar ¶
func (f *Focus) FocusLastSidebar()
func (*Focus) FocusLastSubMenu ¶
func (f *Focus) FocusLastSubMenu()
func (*Focus) FocusSidebar ¶
func (*Focus) FocusSubmenu ¶
func (f *Focus) FocusSubmenu()
type Game ¶
type Game struct {
Bus *bus.EventBus
DrawOptions ebiten.DrawImageOptions
// contains filtered or unexported fields
}
func (*Game) ButtonInput ¶
func (g *Game) ButtonInput(justButtons, buttons []ebiten.StandardGamepadButton)
func (*Game) GetGamepadButtons ¶
func (g *Game) GetGamepadButtons() (justButtons, buttons []ebiten.StandardGamepadButton)
func (*Game) HandleGlobalInputs ¶
func (g *Game) HandleGlobalInputs(justKeys []ebiten.Key, justButtons, buttons []ebiten.StandardGamepadButton)
func (*Game) InitConsole ¶
func (*Game) ToggleMute ¶
func (g *Game) ToggleMute()
func (*Game) TogglePause ¶
func (g *Game) TogglePause()
type GbLocalization ¶
type GbLocalization struct {
General string `toml:"general"`
System string `toml:"system"`
Systems []string `toml:"systems"`
DmgPalette string `toml:"dmg_palette"`
Lightest string `toml:"lightest"`
Light string `toml:"light"`
Dark string `toml:"dark"`
Darkest string `toml:"darkest"`
DmgLightest string `toml:"dmg_lightest"`
DmgLight string `toml:"dmg_light"`
DmgDark string `toml:"dmg_dark"`
DmgDarkest string `toml:"dmg_darkest"`
ApplyPalette string `toml:"apply_palette"`
Bios string `toml:"bios"`
DmgPath string `toml:"dmg_bios_path"`
GbcPath string `toml:"gbc_bios_path"`
DirectBoot string `toml:"direct_boot"`
Keyboard string `toml:"keyboard"`
Controller string `toml:"controller"`
A string `toml:"a"`
B string `toml:"b"`
Select string `toml:"select"`
Start string `toml:"start"`
Left string `toml:"left"`
Right string `toml:"right"`
Up string `toml:"up"`
Down string `toml:"down"`
Save string `toml:"save"`
}
type GbaLocalization ¶
type GbaLocalization struct {
General string `toml:"general"`
OptmizeIdleLoops string `toml:"optimize_idle_loops"`
Rotation string `toml:"rotation"`
Rotations []string `toml:"rotations"`
Hardware string `toml:"hardware"`
BackupType string `toml:"backup_type"`
BackupTypes []string `toml:"backup_types"`
ForceRtc string `toml:"force_rtc"`
ForceSolarSensor string `toml:"force_solar_sensor"`
SolarSensorLevel string `toml:"solar_sensor_level"`
Bios string `toml:"bios"`
BiosPath string `toml:"bios_path"`
DirectBoot string `toml:"direct_boot"`
Keyboard string `toml:"keyboard"`
Controller string `toml:"controller"`
A string `toml:"a"`
B string `toml:"b"`
Select string `toml:"select"`
Start string `toml:"start"`
Left string `toml:"left"`
Right string `toml:"right"`
Up string `toml:"up"`
Down string `toml:"down"`
L string `toml:"l"`
R string `toml:"r"`
SolarMin string `toml:"solar_minimum"`
Solar1 string `toml:"solar_1"`
Solar2 string `toml:"solar_2"`
Solar3 string `toml:"solar_3"`
SolarMax string `toml:"solar_maximum"`
RotationToggle string `toml:"rotation_toggle"`
Save string `toml:"save"`
}
type GeneralLocalization ¶
type GeneralLocalization struct {
General string `toml:"general"`
Muted string `toml:"muted"`
ShowFps string `toml:"show_fps"`
InitFullscreen string `toml:"init_fullscreen"`
TargetFps string `toml:"target_fps"`
VsyncEnabled string `toml:"vsync_enabled"`
DisableSaves string `toml:"disable_saves"`
IntegerScalingDesc string `toml:"integer_scaling_desc"`
IntegerScaling string `toml:"integer_scaling"`
IntegerScalingRatio string `toml:"integer_scaling_ratio"`
SampleRateDesc string `toml:"sample_rate_desc"`
SampleRate string `toml:"sample_rate"`
Keyboard string `toml:"keyboard"`
Controller string `toml:"controller"`
Select string `toml:"select"`
Return string `toml:"return"`
Mute string `toml:"mute"`
Pause string `toml:"pause"`
Left string `toml:"left"`
Right string `toml:"right"`
Up string `toml:"up"`
Down string `toml:"down"`
Fullscreen string `toml:"fullscreen"`
Quit string `toml:"quit"`
Save string `toml:"save"`
}
type Keyboard ¶
type Keyboard struct {
// contains filtered or unexported fields
}
func NewKeyboard ¶
type Localization ¶
type Localization struct {
Main MainLocalization `toml:"main"`
Pause PauseLocalization `toml:"pause"`
Settings SettingsLocalization `toml:"settings"`
Toast ToastLocalization `toml:"toast"`
}
func NewLocalization ¶
func NewLocalization(lang LangOptions) *Localization
type MainLocalization ¶
type NdsLocalization ¶
type NdsLocalization struct {
Screen string `toml:"screen"`
Layout string `toml:"layout"`
Sizing string `toml:"sizing"`
Rotation string `toml:"rotation"`
Layouts []string `toml:"layouts"`
Sizings []string `toml:"sizings"`
Rotations []string `toml:"rotations"`
Rtc string `toml:"rtc"`
AdditionalHours string `toml:"additional_hours"`
Bios string `toml:"bios"`
Arm7Path string `toml:"arm7_path"`
Arm9Path string `toml:"arm9_path"`
Firmware string `toml:"firmware"`
FilePath string `toml:"file_path"`
Nickname string `toml:"nickname"`
Message string `toml:"message"`
FavoriteColor string `toml:"favorite_color"`
SceneExport string `toml:"scene_export"`
OutputDirectory string `toml:"output_directory"`
ShadowPolygons string `toml:"shadow_polygons"`
Keyboard string `toml:"keyboard"`
Controller string `toml:"controller"`
A string `toml:"a"`
B string `toml:"b"`
Select string `toml:"select"`
Start string `toml:"start"`
Left string `toml:"left"`
Right string `toml:"right"`
Up string `toml:"up"`
Down string `toml:"down"`
L string `toml:"l"`
R string `toml:"r"`
X string `toml:"x"`
Y string `toml:"y"`
Hinge string `toml:"hinge"`
Debug string `toml:"debug"`
LayoutToggle string `toml:"layout_toggle"`
SizingToggle string `toml:"sizing_toggle"`
RotationToggle string `toml:"rotation_toggle"`
ExportToggle string `toml:"export_toggle"`
Save string `toml:"save"`
}
type PauseLocalization ¶
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
func NewUIResources ¶
type SettingsLocalization ¶
type SettingsLocalization struct {
Sidebar SidebarLocalization `toml:"sidebar"`
General GeneralLocalization `toml:"general"`
Ui UiLocalization `toml:"ui"`
Gb GbLocalization `toml:"gb"`
Gba GbaLocalization `toml:"gba"`
Nds NdsLocalization `toml:"nds"`
About AboutLocalization `toml:"about"`
}
type SidebarField ¶
type SidebarField struct {
// contains filtered or unexported fields
}
type SidebarLocalization ¶
type Toast ¶
type Toast struct {
// contains filtered or unexported fields
}
func (*Toast) AddMessage ¶
type ToastLocalization ¶
type UiLocalization ¶
type UiLocalization struct {
Ui string `toml:"ui"`
Language string `toml:"language"`
Languages []string `toml:"languages"`
Backdrop string `toml:"backdrop"`
BgColor string `toml:"bg_color"`
FgColor string `toml:"fg_color"`
AccentColor string `toml:"accent_color"`
ApplyTheme string `toml:"apply_theme"`
UiBackdrop string `toml:"ui_backdrop"`
UiBgColor string `toml:"ui_bg_color"`
UiFgColor string `toml:"ui_fg_color"`
UiAccentColor string `toml:"ui_accent_color"`
Save string `toml:"save"`
Alphabet []string `toml:"alphabet"`
}
Click to show internal directories.
Click to hide internal directories.