Documentation ¶
Index ¶
- Constants
- func DrawNinePatches(dst, src *ebiten.Image, width, height int, geoM *ebiten.GeoM, ...)
- type Button
- func (b *Button) Disable()
- func (b *Button) Draw(screen *ebiten.Image)
- func (b *Button) DrawAsChild(screen *ebiten.Image, offsetX, offsetY int)
- func (b *Button) Enable()
- func (b *Button) HandleInput(offsetX, offsetY int) bool
- func (b *Button) Hide()
- func (b *Button) Region() image.Rectangle
- func (b *Button) SetColor(clr color.Color)
- func (b *Button) SetOnPressed(onPressed func(button *Button))
- func (b *Button) SetScale(scale float64)
- func (b *Button) SetText(text string)
- func (b *Button) SetWidth(width int)
- func (b *Button) SetX(x int)
- func (b *Button) SetY(y int)
- func (b *Button) Show()
- func (b *Button) Update()
- type Credits
- type GameHeader
- type ImageView
- func (i *ImageView) Draw(screen *ebiten.Image)
- func (i *ImageView) DrawAsChild(screen *ebiten.Image, offsetX, offsetY int)
- func (i *ImageView) HandleInput(offsetX, offsetY int) bool
- func (i *ImageView) Region() image.Rectangle
- func (i *ImageView) SetFilter(filter ebiten.Filter)
- func (i *ImageView) Update()
- type Inventory
- func (i *Inventory) ActiveItemID() int
- func (i *Inventory) Draw(screen *ebiten.Image)
- func (i *Inventory) Hide()
- func (i *Inventory) Mode() InventoryMode
- func (i *Inventory) SetActiveItemID(activeItemID int)
- func (i *Inventory) SetCombineItemID(combineItemID int)
- func (i *Inventory) SetDisabled(disabled bool)
- func (i *Inventory) SetItems(items []*data.Item)
- func (i *Inventory) SetMode(mode InventoryMode)
- func (i *Inventory) SetOnActiveItemPressed(f func(inventory *Inventory))
- func (i *Inventory) SetOnBackPressed(f func(inventory *Inventory))
- func (i *Inventory) SetOnOutsidePressed(f func(inventory *Inventory))
- func (i *Inventory) SetOnSlotPressed(f func(inventory *Inventory, index int))
- func (i *Inventory) Show()
- func (i *Inventory) Update(texts *data.Texts)
- func (i *Inventory) Visible() bool
- type InventoryMode
- type ItemPreviewPopup
- func (i *ItemPreviewPopup) CloseButtonEnabled() bool
- func (i *ItemPreviewPopup) Draw(screen *ebiten.Image)
- func (i *ItemPreviewPopup) HandleInput(offsetX, offsetY int) bool
- func (i *ItemPreviewPopup) Hide()
- func (i *ItemPreviewPopup) SetActiveItem(item *data.Item)
- func (i *ItemPreviewPopup) SetCombineItem(item *data.Item, combine *data.Combine)
- func (i *ItemPreviewPopup) SetEnabled(enabled bool)
- func (i *ItemPreviewPopup) SetOnActionPressed(f func(itemPreviewPopup *ItemPreviewPopup))
- func (i *ItemPreviewPopup) SetOnClosePressed(f func(itemPreviewPopup *ItemPreviewPopup))
- func (i *ItemPreviewPopup) Show()
- func (i *ItemPreviewPopup) Update(lang language.Tag)
- func (i *ItemPreviewPopup) Visible() bool
- type Label
- type Minigame
- type MinigamePopup
- func (m *MinigamePopup) ActivateBoostMode()
- func (m *MinigamePopup) Draw(screen *ebiten.Image)
- func (m *MinigamePopup) HandleInput(offsetX, offsetY int) bool
- func (m *MinigamePopup) Hide()
- func (m *MinigamePopup) SetAdsLoaded(loaded bool)
- func (m *MinigamePopup) SetOnClose(f func())
- func (m *MinigamePopup) SetOnProgress(f func(int))
- func (m *MinigamePopup) SetOnRequestRewardedAds(f func())
- func (m *MinigamePopup) SetOnSave(f func())
- func (m *MinigamePopup) Show()
- func (m *MinigamePopup) Update(minigameState Minigame)
- func (m *MinigamePopup) Visible() bool
- type Node
- type Popup
- type Slider
- func (s *Slider) Draw(screen *ebiten.Image)
- func (s *Slider) DrawAsChild(screen *ebiten.Image, offsetX, offsetY int)
- func (s *Slider) SetOnReleased(onReleased func(slider *Slider, value int))
- func (s *Slider) SetOnValueChanged(onValueChanged func(slider *Slider, value int))
- func (s *Slider) Update()
- func (s *Slider) UpdateAsChild(visible bool, offsetX, offsetY int)
- func (s *Slider) Value() int
- type SwitchButton
- func (s *SwitchButton) Draw(screen *ebiten.Image)
- func (s *SwitchButton) DrawAsChild(screen *ebiten.Image, offsetX, offsetY int)
- func (s *SwitchButton) Hide()
- func (s *SwitchButton) On() bool
- func (s *SwitchButton) SetOn(on bool)
- func (s *SwitchButton) SetOnToggled(onToggled func(SwitchButton *SwitchButton, value bool))
- func (s *SwitchButton) SetX(x int)
- func (s *SwitchButton) SetY(y int)
- func (s *SwitchButton) Show()
- func (s *SwitchButton) Update()
- func (s *SwitchButton) UpdateAsChild(visible bool, offsetX, offsetY int)
- type TitleView
- func (t *TitleView) Draw(screen *ebiten.Image)
- func (t *TitleView) ResetWaitingRequestID()
- func (t *TitleView) Resize(sceneWidth, sceneHeight int)
- func (t *TitleView) SetOnMoreGames(f func())
- func (t *TitleView) SetOnQuit(f func())
- func (t *TitleView) SetOnRemoveAds(f func())
- func (t *TitleView) SetOnSettings(f func())
- func (t *TitleView) SetOnStartGame(f func())
- func (t *TitleView) SetWaitingRequestID(id int)
- func (t *TitleView) ShakeStartGameButton()
- func (t *TitleView) Update(game *data.Game, hasProgress bool, isAdsRemoved bool) error
- func (t *TitleView) WaitingRequestID() int
Constants ¶
View Source
const (
PopupWidth = 160 - popupMargin*2
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Button ¶
type Button struct { Image *ebiten.Image PressedImage *ebiten.Image DisabledImage *ebiten.Image Lang language.Tag // contains filtered or unexported fields }
func NewImageButton ¶
func NewTextButton ¶
func (*Button) DrawAsChild ¶
func (*Button) HandleInput ¶
func (*Button) SetOnPressed ¶
type Credits ¶
type Credits struct {
// contains filtered or unexported fields
}
func NewCredits ¶
func NewCredits() *Credits
func (*Credits) SetCloseButtonVisible ¶
type GameHeader ¶
type GameHeader struct {
// contains filtered or unexported fields
}
func NewGameHeader ¶
func NewGameHeader() *GameHeader
func (*GameHeader) Close ¶
func (g *GameHeader) Close()
func (*GameHeader) Draw ¶
func (g *GameHeader) Draw(screen *ebiten.Image)
func (*GameHeader) Open ¶
func (g *GameHeader) Open()
func (*GameHeader) SetOnCameraButtonPressed ¶
func (g *GameHeader) SetOnCameraButtonPressed(f func())
func (*GameHeader) SetOnTitleButtonPressed ¶
func (g *GameHeader) SetOnTitleButtonPressed(f func())
func (*GameHeader) Update ¶
func (g *GameHeader) Update(paused bool)
type ImageView ¶
type ImageView struct {
// contains filtered or unexported fields
}
func (*ImageView) DrawAsChild ¶
func (*ImageView) HandleInput ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
func NewInventory ¶
func (*Inventory) ActiveItemID ¶
func (*Inventory) Mode ¶
func (i *Inventory) Mode() InventoryMode
func (*Inventory) SetActiveItemID ¶
func (*Inventory) SetCombineItemID ¶
func (*Inventory) SetDisabled ¶
func (*Inventory) SetMode ¶
func (i *Inventory) SetMode(mode InventoryMode)
func (*Inventory) SetOnActiveItemPressed ¶
func (*Inventory) SetOnBackPressed ¶
func (*Inventory) SetOnOutsidePressed ¶
func (*Inventory) SetOnSlotPressed ¶
type ItemPreviewPopup ¶
type ItemPreviewPopup struct {
// contains filtered or unexported fields
}
func NewItemPreviewPopup ¶
func NewItemPreviewPopup(y int) *ItemPreviewPopup
func (*ItemPreviewPopup) CloseButtonEnabled ¶
func (i *ItemPreviewPopup) CloseButtonEnabled() bool
func (*ItemPreviewPopup) Draw ¶
func (i *ItemPreviewPopup) Draw(screen *ebiten.Image)
func (*ItemPreviewPopup) HandleInput ¶
func (i *ItemPreviewPopup) HandleInput(offsetX, offsetY int) bool
func (*ItemPreviewPopup) Hide ¶
func (i *ItemPreviewPopup) Hide()
func (*ItemPreviewPopup) SetActiveItem ¶
func (i *ItemPreviewPopup) SetActiveItem(item *data.Item)
func (*ItemPreviewPopup) SetCombineItem ¶
func (i *ItemPreviewPopup) SetCombineItem(item *data.Item, combine *data.Combine)
func (*ItemPreviewPopup) SetEnabled ¶
func (i *ItemPreviewPopup) SetEnabled(enabled bool)
func (*ItemPreviewPopup) SetOnActionPressed ¶
func (i *ItemPreviewPopup) SetOnActionPressed(f func(itemPreviewPopup *ItemPreviewPopup))
func (*ItemPreviewPopup) SetOnClosePressed ¶
func (i *ItemPreviewPopup) SetOnClosePressed(f func(itemPreviewPopup *ItemPreviewPopup))
func (*ItemPreviewPopup) Show ¶
func (i *ItemPreviewPopup) Show()
func (*ItemPreviewPopup) Update ¶
func (i *ItemPreviewPopup) Update(lang language.Tag)
func (*ItemPreviewPopup) Visible ¶
func (i *ItemPreviewPopup) Visible() bool
type Label ¶
type Label struct { Text string Scale float64 Color color.Color TextAlign data.TextAlign // contains filtered or unexported fields }
func (*Label) HandleInput ¶
type MinigamePopup ¶
type MinigamePopup struct {
// contains filtered or unexported fields
}
func NewMinigamePopup ¶
func NewMinigamePopup(y int) *MinigamePopup
func (*MinigamePopup) ActivateBoostMode ¶
func (m *MinigamePopup) ActivateBoostMode()
func (*MinigamePopup) Draw ¶
func (m *MinigamePopup) Draw(screen *ebiten.Image)
func (*MinigamePopup) HandleInput ¶
func (m *MinigamePopup) HandleInput(offsetX, offsetY int) bool
func (*MinigamePopup) Hide ¶
func (m *MinigamePopup) Hide()
func (*MinigamePopup) SetAdsLoaded ¶
func (m *MinigamePopup) SetAdsLoaded(loaded bool)
func (*MinigamePopup) SetOnClose ¶
func (m *MinigamePopup) SetOnClose(f func())
func (*MinigamePopup) SetOnProgress ¶
func (m *MinigamePopup) SetOnProgress(f func(int))
func (*MinigamePopup) SetOnRequestRewardedAds ¶
func (m *MinigamePopup) SetOnRequestRewardedAds(f func())
func (*MinigamePopup) SetOnSave ¶
func (m *MinigamePopup) SetOnSave(f func())
func (*MinigamePopup) Show ¶
func (m *MinigamePopup) Show()
func (*MinigamePopup) Update ¶
func (m *MinigamePopup) Update(minigameState Minigame)
func (*MinigamePopup) Visible ¶
func (m *MinigamePopup) Visible() bool
type Popup ¶
type Popup struct {
// contains filtered or unexported fields
}
func (*Popup) HandleInput ¶
type Slider ¶
type Slider struct {
// contains filtered or unexported fields
}
func (*Slider) DrawAsChild ¶
func (*Slider) SetOnReleased ¶
func (*Slider) SetOnValueChanged ¶
func (*Slider) UpdateAsChild ¶
type SwitchButton ¶
type SwitchButton struct {
// contains filtered or unexported fields
}
func NewSwitchButton ¶
func NewSwitchButton(x, y int, on bool) *SwitchButton
func (*SwitchButton) Draw ¶
func (s *SwitchButton) Draw(screen *ebiten.Image)
func (*SwitchButton) DrawAsChild ¶
func (s *SwitchButton) DrawAsChild(screen *ebiten.Image, offsetX, offsetY int)
func (*SwitchButton) Hide ¶
func (s *SwitchButton) Hide()
func (*SwitchButton) On ¶
func (s *SwitchButton) On() bool
func (*SwitchButton) SetOn ¶
func (s *SwitchButton) SetOn(on bool)
func (*SwitchButton) SetOnToggled ¶
func (s *SwitchButton) SetOnToggled(onToggled func(SwitchButton *SwitchButton, value bool))
func (*SwitchButton) SetX ¶
func (s *SwitchButton) SetX(x int)
func (*SwitchButton) SetY ¶
func (s *SwitchButton) SetY(y int)
func (*SwitchButton) Show ¶
func (s *SwitchButton) Show()
func (*SwitchButton) Update ¶
func (s *SwitchButton) Update()
func (*SwitchButton) UpdateAsChild ¶
func (s *SwitchButton) UpdateAsChild(visible bool, offsetX, offsetY int)
type TitleView ¶
type TitleView struct {
// contains filtered or unexported fields
}
func NewTitleView ¶
func (*TitleView) ResetWaitingRequestID ¶
func (t *TitleView) ResetWaitingRequestID()
func (*TitleView) SetOnMoreGames ¶
func (t *TitleView) SetOnMoreGames(f func())
func (*TitleView) SetOnRemoveAds ¶
func (t *TitleView) SetOnRemoveAds(f func())
func (*TitleView) SetOnSettings ¶
func (t *TitleView) SetOnSettings(f func())
func (*TitleView) SetOnStartGame ¶
func (t *TitleView) SetOnStartGame(f func())
func (*TitleView) SetWaitingRequestID ¶
func (*TitleView) ShakeStartGameButton ¶
func (t *TitleView) ShakeStartGameButton()
func (*TitleView) WaitingRequestID ¶
Click to show internal directories.
Click to hide internal directories.