ui

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package ui contains client UI composition, modal/menu/window state, and reusable skinning primitives. It may depend on shared client/session/network data, but it should not own map drawing, sprite rendering, or gameplay simulation.

Index

Constants

View Source
const (
	CharacterCreateStatStr = iota
	CharacterCreateStatAgi
	CharacterCreateStatVit
	CharacterCreateStatInt
	CharacterCreateStatDex
	CharacterCreateStatLuk
)
View Source
const (
	TeleportSkillID      = teleportSkillID
	WarpPortalSkillID    = warpPortalSkillID
	TeleportRandomMap    = teleportRandomMap
	TeleportSavePointMap = teleportSavePointMap
	WarpPointCancelMap   = warpPointCancelMap
)
View Source
const (
	CursorActionDefault = 0
	CursorActionTalk    = 1
	CursorActionClick   = 2
	CursorActionRotate  = 4
	CursorActionAttack  = 5
	CursorActionWarp    = 7
	CursorActionPick    = 9
	CursorActionTarget  = 10
	CursorActionTarget2 = 11
	CursorActionNoWalk  = 13
)
View Source
const (
	ROWindowTitleHeight   = 28
	ROWindowFooterHeight  = 42
	ROWindowFooterPadding = 10
	ROWindowFooterGap     = 8
)
View Source
const CharacterCreateStatCount = 6
View Source
const HungerBarLowThreshold = 0.25
View Source
const IconButtonSize = 17
View Source
const ROScrollbarGutter = 12

Variables

View Source
var (
	WindowRadius      = float32(6)
	ButtonRadius      = float32(6)
	ButtonPaddingX    = 14
	WindowBodyColor   = color.RGBA{R: 255, G: 255, B: 255, A: 255}
	WindowTitleTop    = color.RGBA{R: 214, G: 232, B: 250, A: 255}
	WindowTitleColor  = color.RGBA{R: 184, G: 214, B: 242, A: 255}
	WindowBorderColor = color.RGBA{R: 118, G: 160, B: 206, A: 255}
	WindowFooterColor = color.RGBA{R: 244, G: 246, B: 248, A: 255}
	PanelBodyColor    = color.RGBA{R: 250, G: 252, B: 255, A: 255}
	PanelAltColor     = color.RGBA{R: 236, G: 244, B: 252, A: 255}
	PanelHoverColor   = color.RGBA{R: 222, G: 236, B: 250, A: 255}
	DisabledColor     = color.RGBA{R: 226, G: 230, B: 235, A: 255}
	TextColor         = color.RGBA{R: 38, G: 48, B: 58, A: 255}
	MutedTextColor    = color.RGBA{R: 98, G: 112, B: 126, A: 255}
	TitleTextColor    = color.RGBA{R: 22, G: 54, B: 88, A: 255}
	GoodTextColor     = color.RGBA{R: 34, G: 142, B: 72, A: 255}
	ErrorTextColor    = color.RGBA{R: 204, G: 48, B: 48, A: 255}
	ButtonColor       = color.RGBA{R: 236, G: 244, B: 252, A: 255}
	ButtonHoverColor  = color.RGBA{R: 218, G: 235, B: 250, A: 255}
	ButtonDownColor   = color.RGBA{R: 198, G: 222, B: 245, A: 255}
	ButtonBorderColor = color.RGBA{R: 138, G: 174, B: 214, A: 255}
	PlayerHPBarColor  = color.RGBA{R: 16, G: 239, B: 33, A: 255}
	PlayerSPBarColor  = color.RGBA{R: 24, G: 99, B: 222, A: 255}
	HungerBarColor    = color.RGBA{R: 255, G: 231, B: 231, A: 255}
	HungerBarLowColor = color.RGBA{R: 255, G: 255, B: 0, A: 255}
	SeparatorColor    = color.RGBA{R: 160, G: 190, B: 222, A: 190}
	FooterLineColor   = color.RGBA{R: 174, G: 180, B: 188, A: 255}
	SelectionColor    = color.RGBA{R: 206, G: 226, B: 248, A: 255}
	SelectionBorder   = color.RGBA{R: 82, G: 138, B: 200, A: 255}
)

Functions

func ButtonLabelWidth

func ButtonLabelWidth(label string) int

func CharacterCreateGraphDrawOrder

func CharacterCreateGraphDrawOrder() [CharacterCreateStatCount]int

func CharacterCreateGraphPoints

func CharacterCreateGraphPoints(cx, cy int, radius float64) [CharacterCreateStatCount][2]float64

func CharacterCreateStatLabels

func CharacterCreateStatLabels() [CharacterCreateStatCount]string

func CharacterSelectPage

func CharacterSelectPage(slot int) int

func Color

func Color(c color.RGBA) uiwidget.Color

func DisplayWeight

func DisplayWeight(raw int) int

func DrawBlinkingCaret

func DrawBlinkingCaret(screen *render.Frame, x, y, h int, c color.RGBA)

func DrawButtonLabel

func DrawButtonLabel(screen *render.Frame, x, y, w, h int, label string, bg, text color.RGBA)

func DrawButtonSurface

func DrawButtonSurface(screen *render.Frame, x, y, w, h int, bg color.RGBA)

func DrawCenteredText

func DrawCenteredText(screen *render.Frame, x, y, w, h int, label string, text color.RGBA)

func DrawCheckboxButton

func DrawCheckboxButton(screen *render.Frame, x, y int, bg, line color.RGBA, checked bool)

func DrawCloseButton

func DrawCloseButton(screen *render.Frame, x, y, w, h int, bg, line color.RGBA)

func DrawCloseGlyph

func DrawCloseGlyph(screen *render.Frame, x, y, w, h int, line color.RGBA)

func DrawIconButton

func DrawIconButton(screen *render.Frame, x, y, w, h int, bg, line color.RGBA, vertical bool)

func DrawMinusButton

func DrawMinusButton(screen *render.Frame, x, y int, bg, line color.RGBA)

func DrawPanelSurface

func DrawPanelSurface(screen *render.Frame, x, y, w, h int, bg color.RGBA)

func DrawPlusButton

func DrawPlusButton(screen *render.Frame, x, y int, bg, line color.RGBA)

func DrawRoundedGradientSurface

func DrawRoundedGradientSurface(screen imageDrawTarget, x, y, w, h int, top, bottom, border color.RGBA, radius float32)

func DrawRoundedSurface

func DrawRoundedSurface(screen imageDrawTarget, x, y, w, h int, bg, border color.RGBA, radius float32)

func DrawRowSurface

func DrawRowSurface(screen *render.Frame, x, y, w, h int, bg color.RGBA)

func DrawSurface

func DrawSurface(screen imageDrawTarget, x, y, w, h int, bg, border color.RGBA)

func DrawTextBoxSurface

func DrawTextBoxSurface(screen *render.Frame, x, y, w, h int, bg, border color.RGBA)

func DrawTitleBar

func DrawTitleBar(screen *render.Frame, x, y, w, titleH int)

func DrawTitleTextAt

func DrawTitleTextAt(screen *render.Frame, x, y, titleH int, title string, text color.RGBA)

func DrawTitledWindowFrame

func DrawTitledWindowFrame(screen *render.Frame, x, y, w, h, titleH int)

func DrawWindowFooter

func DrawWindowFooter(screen *render.Frame, x, y, w, h, footerH int)

func DrawWindowFrame

func DrawWindowFrame(screen *render.Frame, x, y, w, h int)

func DrawWindowTitle

func DrawWindowTitle(screen *render.Frame, x, y, titleH, pad int, title string, text color.RGBA)

func FormatEXPPercent

func FormatEXPPercent(current, next int64) string

func FormatHUDNumber

func FormatHUDNumber(value int64) string

func HomunculusASPDDisplay

func HomunculusASPDDisplay(value int) int

func HomunculusIntimacyText

func HomunculusIntimacyText(value int) string

func HungerBarFillColor

func HungerBarFillColor(current, maxValue int) color.RGBA

func IsLevelOneTeleportSkill

func IsLevelOneTeleportSkill(skill session.Skill) bool

func LerpColor

func LerpColor(a, b color.RGBA, t float64) color.RGBA

func Lighten

func Lighten(c color.RGBA, amount float64) color.RGBA

func MinimapBounds

func MinimapBounds(width, height int) (int, int, int, int)

func PointInRect

func PointInRect(px, py, x, y, w, h int) bool

func TeleportWarpListBypassesModal

func TeleportWarpListBypassesModal(skill session.Skill, list network.WarpPointList) bool

func TooltipsSuppressed added in v0.6.0

func TooltipsSuppressed(ctx Context) bool

TooltipsSuppressed reports whether transient hover UI should stay hidden. Window dragging uses a renderer-owned fast path, so that drag state is the authoritative signal shared by every window and tooltip.

func UseInventoryItem added in v0.7.0

func UseInventoryItem(ctx Context, item session.InventoryItem) error

UseInventoryItem requests use of a consumable inventory entry.

func VisibleStatusIconIDs

func VisibleStatusIconIDs(active map[uint16]session.StatusEffect) []uint16

func Win

func Win(options ...WindowOption) widget.Widget

Types

type Announcement added in v0.8.0

type Announcement struct {
	// contains filtered or unexported fields
}

func (*Announcement) Draw added in v0.8.0

func (a *Announcement) Draw(screen *render.Frame, now time.Time)

func (*Announcement) Show added in v0.8.0

func (a *Announcement) Show(text string, messageColor color.RGBA, style AnnouncementStyle, now time.Time)

func (*Announcement) Visible added in v0.8.0

func (a *Announcement) Visible(now time.Time) bool

type AnnouncementStyle added in v0.8.0

type AnnouncementStyle struct {
	Y        int
	FontSize int
	Bold     bool
}

type AssetProvider

type AssetProvider interface {
	DrawInventoryItemIcon(screen *render.Frame, manager *res.Manager, item session.InventoryItem, x, y int)
	DrawSkillIcon(screen *render.Frame, manager *res.Manager, skill session.Skill, x, y, size int)
	SkillIconImage(manager *res.Manager, skill session.Skill, size int) image.Image
	ItemInfoIllustrationImage(manager *res.Manager, item session.InventoryItem, width, height int) image.Image
	EquipmentPreviewImage(ctx client.Context, width, height int) image.Image
	EquipmentPreviewImageForCharacter(ctx client.Context, character session.Character, sex byte, width, height int) image.Image
}

type AutoSpellWindow added in v0.9.0

type AutoSpellWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*AutoSpellWindow) OpenList added in v0.9.0

func (w *AutoSpellWindow) OpenList(ctx Context, list network.AutoSpellList, assets AssetProvider)

func (*AutoSpellWindow) PopSelection added in v0.9.0

func (w *AutoSpellWindow) PopSelection() (uint16, bool)

func (*AutoSpellWindow) Reset added in v0.9.0

func (w *AutoSpellWindow) Reset(ctx Context)

func (*AutoSpellWindow) Update added in v0.9.0

func (w *AutoSpellWindow) Update(ctx Context) bool

type BasicMenu

type BasicMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*BasicMenu) FollowCharacterWindow added in v0.6.0

func (m *BasicMenu) FollowCharacterWindow(ctx client.Context, character *CharacterWindow)

FollowCharacterWindow keeps the menu attached below the character window while leaving both as independent overlays for input and redraw purposes.

func (*BasicMenu) Rebind

func (m *BasicMenu) Rebind(ctx client.Context, callbacks BasicMenuCallbacks)

func (*BasicMenu) Update

func (m *BasicMenu) Update(ctx client.Context, callbacks BasicMenuCallbacks) bool

type BasicMenuCallbacks

type BasicMenuCallbacks struct {
	OnStatus func()
	OnOption func()
	OnItems  func()
	OnEquip  func()
	OnSkill  func()
	OnMap    func()
	OnComm   func()
	OnFriend func()
}

type BookWindow added in v0.10.0

type BookWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*BookWindow) Open added in v0.10.0

func (w *BookWindow) Open(ctx Context, itemID uint16, title string) error

func (*BookWindow) Rebind added in v0.10.0

func (w *BookWindow) Rebind(ctx Context)

func (*BookWindow) Update added in v0.10.0

func (w *BookWindow) Update(ctx Context) bool

type CardCompositionWindow

type CardCompositionWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CardCompositionWindow) ApplyAck

func (*CardCompositionWindow) ClampScroll

func (w *CardCompositionWindow) ClampScroll(s *session.Session)

func (*CardCompositionWindow) OpenList

func (w *CardCompositionWindow) OpenList(ctx Context, cardIndex uint16, list network.ItemCompositionList)

func (*CardCompositionWindow) Update

func (w *CardCompositionWindow) Update(ctx Context) bool

type CardIllustrationWindow added in v0.10.0

type CardIllustrationWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CardIllustrationWindow) Open added in v0.10.0

func (w *CardIllustrationWindow) Open(ctx Context, itemID uint16, title string) error

func (*CardIllustrationWindow) Rebind added in v0.10.0

func (w *CardIllustrationWindow) Rebind(ctx Context)

func (*CardIllustrationWindow) Update added in v0.10.0

func (w *CardIllustrationWindow) Update(ctx Context) bool

type CartWindow

type CartWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CartWindow) AcceptInventoryDrop

func (w *CartWindow) AcceptInventoryDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*CartWindow) AcceptStorageDrop

func (w *CartWindow) AcceptStorageDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*CartWindow) ClampScroll

func (w *CartWindow) ClampScroll(s *session.Session)

func (*CartWindow) Draw

func (w *CartWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*CartWindow) DrawDragGhost

func (w *CartWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*CartWindow) DrawTooltip

func (w *CartWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*CartWindow) OpenWindow

func (w *CartWindow) OpenWindow(ctx Context)

func (*CartWindow) Rebind

func (w *CartWindow) Rebind(ctx Context, itemInfo *ItemInfoWindow)

func (*CartWindow) Refresh

func (w *CartWindow) Refresh(ctx Context, itemInfo *ItemInfoWindow)

func (*CartWindow) SetOpen

func (w *CartWindow) SetOpen(open bool)

func (*CartWindow) Toggle

func (w *CartWindow) Toggle(ctx Context)

func (*CartWindow) Update

func (w *CartWindow) Update(ctx Context, inventory *InventoryBagWindow, storage *StorageWindow, itemInfo *ItemInfoWindow) bool

func (*CartWindow) UpdateDrag

func (w *CartWindow) UpdateDrag(ctx Context, inventory *InventoryBagWindow, storage *StorageWindow) bool

type ChangeCartWindow

type ChangeCartWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*ChangeCartWindow) Open

func (w *ChangeCartWindow) Open(ctx client.Context)

func (*ChangeCartWindow) Update

func (w *ChangeCartWindow) Update(ctx client.Context) bool

type CharacterCreateWindow

type CharacterCreateWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CharacterCreateWindow) SetOptions

func (*CharacterCreateWindow) Update

func (w *CharacterCreateWindow) Update(ctx client.Context) bool

type CharacterCreateWindowCallbacks

type CharacterCreateWindowCallbacks struct {
	OnNameChange func(string)
	OnSubmit     func()
	OnCancel     func()
	OnHairPrev   func()
	OnHairNext   func()
	OnHairColor  func()
	OnStat       func(int)
}

type CharacterCreateWindowOptions

type CharacterCreateWindowOptions struct {
	Name    string
	Stats   [CharacterCreateStatCount]uint8
	Preview image.Image
}

type CharacterSelectWindow

type CharacterSelectWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CharacterSelectWindow) SetOptions

func (*CharacterSelectWindow) Update

func (w *CharacterSelectWindow) Update(ctx client.Context) bool

type CharacterSelectWindowCallbacks

type CharacterSelectWindowCallbacks struct {
	OnSelectSlot   func(int)
	OnActivateSlot func(int)
	OnPreviousSlot func()
	OnNextSlot     func()
	OnMake         func()
	OnOK           func()
	OnCancel       func()
	OnDelete       func()
}

type CharacterSelectWindowOptions

type CharacterSelectWindowOptions struct {
	SelectedSlot  int
	MaxSlots      int
	Characters    []session.Character
	PreviewImages map[int]image.Image
}

type CharacterWindow

type CharacterWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*CharacterWindow) Update

func (w *CharacterWindow) Update(ctx Context) bool

type ChatConsole

type ChatConsole struct {
	OnGuildWindow func()
	// contains filtered or unexported fields
}

func (*ChatConsole) Active

func (c *ChatConsole) Active() bool

func (*ChatConsole) AddBlueMessage

func (c *ChatConsole) AddBlueMessage(format string, args ...any)

func (*ChatConsole) AddColoredMessage

func (c *ChatConsole) AddColoredMessage(messageColor color.RGBA, format string, args ...any)

func (*ChatConsole) AddErrorMessage

func (c *ChatConsole) AddErrorMessage(format string, args ...any)

func (*ChatConsole) AddGuildChatMessage added in v0.8.1

func (c *ChatConsole) AddGuildChatMessage(format string, args ...any)

func (*ChatConsole) AddGuildMessage

func (c *ChatConsole) AddGuildMessage(format string, args ...any)

func (*ChatConsole) AddMessage

func (c *ChatConsole) AddMessage(format string, args ...any)

func (*ChatConsole) AddSystemMessage

func (c *ChatConsole) AddSystemMessage(format string, args ...any)

func (*ChatConsole) DiscardTextInput added in v0.8.1

func (c *ChatConsole) DiscardTextInput(text string)

DiscardTextInput removes text emitted for a keyboard shortcut before the frame is dispatched. UI text events arrive before the game's key handling.

func (*ChatConsole) Messages

func (c *ChatConsole) Messages() []ConsoleMessage

func (*ChatConsole) Publish

func (c *ChatConsole) Publish(ctx client.Context)

func (*ChatConsole) SubmitCommand

func (c *ChatConsole) SubmitCommand(ctx client.Context, text string) bool

func (*ChatConsole) Unpublish

func (c *ChatConsole) Unpublish(ctx client.Context)

func (*ChatConsole) Update

func (c *ChatConsole) Update(ctx client.Context) bool

func (*ChatConsole) UpdateInput added in v0.6.0

func (c *ChatConsole) UpdateInput(ctx client.Context) bool

UpdateInput handles chat focus, typing, and pointer input after presentation maintenance has already run for the frame.

func (*ChatConsole) UpdatePresentation added in v0.6.0

func (c *ChatConsole) UpdatePresentation(ctx client.Context)

UpdatePresentation advances deferred message redraws independently of input. World mode calls this before modal input can return early for the frame.

type ChatRoomCreateWindow

type ChatRoomCreateWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*ChatRoomCreateWindow) Open

func (w *ChatRoomCreateWindow) Open(ctx Context)

func (*ChatRoomCreateWindow) PopAction

func (*ChatRoomCreateWindow) Rebind

func (w *ChatRoomCreateWindow) Rebind(ctx Context)

func (*ChatRoomCreateWindow) Update

func (w *ChatRoomCreateWindow) Update(ctx Context) bool

type ChatRoomCreateWindowAction

type ChatRoomCreateWindowAction struct {
	Title    string
	Password string
	Limit    uint16
	Public   bool
}

type ChatRoomWindow

type ChatRoomWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*ChatRoomWindow) AddError

func (w *ChatRoomWindow) AddError(ctx Context, text string)

func (*ChatRoomWindow) AddMember

func (w *ChatRoomWindow) AddMember(ctx Context, name string, count uint16)

func (*ChatRoomWindow) AddMessage

func (w *ChatRoomWindow) AddMessage(ctx Context, text string)

func (*ChatRoomWindow) AddSystem

func (w *ChatRoomWindow) AddSystem(ctx Context, text string)

func (*ChatRoomWindow) Open

func (w *ChatRoomWindow) Open(ctx Context, title string, limit uint16, public bool, members []string)

func (*ChatRoomWindow) PopAction

func (w *ChatRoomWindow) PopAction() ChatRoomWindowAction

func (*ChatRoomWindow) Rebind

func (w *ChatRoomWindow) Rebind(ctx Context)

func (*ChatRoomWindow) RemoveMember

func (w *ChatRoomWindow) RemoveMember(ctx Context, name string, count uint16)

func (*ChatRoomWindow) SetMembers

func (w *ChatRoomWindow) SetMembers(ctx Context, members []string, owner string)

func (*ChatRoomWindow) SetOwner

func (w *ChatRoomWindow) SetOwner(ctx Context, name string)

func (*ChatRoomWindow) Update

func (w *ChatRoomWindow) Update(ctx Context) bool

func (*ChatRoomWindow) UpdateRoom

func (w *ChatRoomWindow) UpdateRoom(ctx Context, title string, limit uint16, count uint16, public bool)

type ChatRoomWindowAction

type ChatRoomWindowAction struct {
	Message string
	Leave   bool
}

type ConfirmModal

type ConfirmModal struct {
	Window
	// contains filtered or unexported fields
}

func (*ConfirmModal) Cancel

func (m *ConfirmModal) Cancel(ctx client.Context)

func (*ConfirmModal) Close

func (m *ConfirmModal) Close(ctx client.Context)

func (*ConfirmModal) Confirm

func (m *ConfirmModal) Confirm(ctx client.Context)

func (*ConfirmModal) Open

func (m *ConfirmModal) Open(ctx client.Context, title, message string, onOK, onCancel func())

func (*ConfirmModal) OpenAlert

func (m *ConfirmModal) OpenAlert(ctx client.Context, title, message string, onOK func())

func (*ConfirmModal) Update

func (m *ConfirmModal) Update(ctx client.Context) bool

type ConsoleMessage

type ConsoleMessage struct {
	Text  string
	Color color.RGBA
}

type Context

type Context = client.Context

type EmoteWindow

type EmoteWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*EmoteWindow) OpenWindow

func (w *EmoteWindow) OpenWindow(ctx Context, console *ChatConsole)

func (*EmoteWindow) Rebind

func (w *EmoteWindow) Rebind(ctx Context, console *ChatConsole)

func (*EmoteWindow) Toggle

func (w *EmoteWindow) Toggle(ctx Context, console *ChatConsole)

func (*EmoteWindow) Update

func (w *EmoteWindow) Update(ctx Context, console *ChatConsole) bool

type EquipmentWindow

type EquipmentWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*EquipmentWindow) AcceptInventoryDrop

func (w *EquipmentWindow) AcceptInventoryDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*EquipmentWindow) DrawTooltip

func (w *EquipmentWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*EquipmentWindow) Rebind

func (w *EquipmentWindow) Rebind(ctx Context, itemInfo *ItemInfoWindow, cart *CartWindow, assets AssetProvider)

func (*EquipmentWindow) Toggle

func (w *EquipmentWindow) Toggle(ctx Context)

func (*EquipmentWindow) Update

func (w *EquipmentWindow) Update(ctx Context, itemInfo *ItemInfoWindow, cart *CartWindow, assets AssetProvider) bool

type EscapeMenu

type EscapeMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*EscapeMenu) Action

func (m *EscapeMenu) Action() EscapeMenuAction

func (*EscapeMenu) ApplyQuitGameAck

func (m *EscapeMenu) ApplyQuitGameAck(ack network.QuitGameAck) bool

func (*EscapeMenu) ApplyRestartAck

func (m *EscapeMenu) ApplyRestartAck(ack network.RestartAck) bool

func (*EscapeMenu) ConsumeAction

func (m *EscapeMenu) ConsumeAction() EscapeMenuAction

func (*EscapeMenu) DeathMode added in v0.7.0

func (m *EscapeMenu) DeathMode() bool

func (*EscapeMenu) OpenDeath added in v0.7.0

func (m *EscapeMenu) OpenDeath(ctx client.Context)

OpenDeath switches the regular escape menu to its death variant and opens it. The death mode remains active if the player later hides the window with Escape.

func (*EscapeMenu) Pending

func (m *EscapeMenu) Pending() bool

func (*EscapeMenu) PendingAction added in v0.6.0

func (m *EscapeMenu) PendingAction() EscapeMenuAction

func (*EscapeMenu) RequestAutoRevive added in v0.10.0

func (m *EscapeMenu) RequestAutoRevive(ctx client.Context)

func (*EscapeMenu) RequestCharacterSelect

func (m *EscapeMenu) RequestCharacterSelect(ctx client.Context)

func (*EscapeMenu) RequestQuitGame

func (m *EscapeMenu) RequestQuitGame(ctx client.Context)

func (*EscapeMenu) ResetDeath added in v0.7.0

func (m *EscapeMenu) ResetDeath(ctx client.Context)

ResetDeath returns the escape menu to its regular mode after resurrection or a map change. It also closes a death menu that the player left visible.

func (*EscapeMenu) ReturnToSavePoint added in v0.7.0

func (m *EscapeMenu) ReturnToSavePoint(ctx client.Context)

func (*EscapeMenu) Toggle

func (m *EscapeMenu) Toggle(ctx client.Context)

func (*EscapeMenu) Update

func (m *EscapeMenu) Update(ctx client.Context) bool

type EscapeMenuAction

type EscapeMenuAction int
const (
	EscapeMenuActionNone EscapeMenuAction = iota
	EscapeMenuActionAutoRevive
	EscapeMenuActionSavePoint
	EscapeMenuActionCharacterSelect
	EscapeMenuActionSettings
	EscapeMenuActionCancel
	EscapeMenuActionExit
)

type FriendContextMenu

type FriendContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*FriendContextMenu) Open

func (m *FriendContextMenu) Open(ctx Context, x, y int, friend session.Friend)

func (*FriendContextMenu) PopAction

func (m *FriendContextMenu) PopAction() FriendsWindowAction

func (*FriendContextMenu) Rebind

func (m *FriendContextMenu) Rebind(ctx Context)

func (*FriendContextMenu) Update

func (m *FriendContextMenu) Update(ctx Context) bool

type FriendSettingsWindow

type FriendSettingsWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*FriendSettingsWindow) Open

func (w *FriendSettingsWindow) Open(ctx Context)

func (*FriendSettingsWindow) Rebind

func (w *FriendSettingsWindow) Rebind(ctx Context)

func (*FriendSettingsWindow) Update

func (w *FriendSettingsWindow) Update(ctx Context) bool

type FriendsWindow

type FriendsWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*FriendsWindow) Close

func (w *FriendsWindow) Close()

func (*FriendsWindow) OpenWindow

func (w *FriendsWindow) OpenWindow(ctx Context)

func (*FriendsWindow) PopAction

func (w *FriendsWindow) PopAction() FriendsWindowAction

func (*FriendsWindow) Rebind

func (w *FriendsWindow) Rebind(ctx Context)

func (*FriendsWindow) Toggle

func (w *FriendsWindow) Toggle(ctx Context)

func (*FriendsWindow) Update

func (w *FriendsWindow) Update(ctx Context) bool

type FriendsWindowAction

type FriendsWindowAction struct {
	Kind         FriendsWindowActionKind
	Friend       session.Friend
	PartyMember  session.PartyMember
	PartyName    string
	InviteName   string
	ItemPickup   uint8
	ItemDivision uint8
}

type FriendsWindowActionKind

type FriendsWindowActionKind int
const (
	FriendsWindowActionNone FriendsWindowActionKind = iota
	FriendsWindowActionPartySettings
	FriendsWindowActionPartyLeave
	FriendsWindowActionFriendWhisper
	FriendsWindowActionFriendDelete
	FriendsWindowActionFriendSettings
	FriendsWindowActionFriendBlockWhisper
	FriendsWindowActionPartyCreate
	FriendsWindowActionPartyInvite
	FriendsWindowActionPartyMemberInfo
	FriendsWindowActionPartyMemberWhisper
	FriendsWindowActionPartyMemberExpel
)

type GameActions

type GameActions interface {
	UseShortcutSkill(ctx client.Context, skill session.Skill) error
	AddTeleportEffect(ctx client.Context)
}

type GuildEmblemOption

type GuildEmblemOption struct {
	Label string
	Path  string
}

type GuildMemberAction added in v0.8.1

type GuildMemberAction struct {
	Kind   GuildMemberActionKind
	Member session.GuildMember
}

type GuildMemberActionKind added in v0.8.1

type GuildMemberActionKind uint8
const (
	GuildMemberActionNone GuildMemberActionKind = iota
	GuildMemberActionLeave
	GuildMemberActionExpel
)

type GuildMemberContextMenu added in v0.8.1

type GuildMemberContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*GuildMemberContextMenu) Open added in v0.8.1

func (m *GuildMemberContextMenu) Open(ctx Context, x, y int, member session.GuildMember, canExpel, isSelf, isMaster bool)

func (*GuildMemberContextMenu) PopAction added in v0.8.1

func (*GuildMemberContextMenu) Rebind added in v0.8.1

func (m *GuildMemberContextMenu) Rebind(ctx Context)

func (*GuildMemberContextMenu) Update added in v0.8.1

func (m *GuildMemberContextMenu) Update(ctx Context) bool

type GuildMemberPositionUpdate

type GuildMemberPositionUpdate struct {
	AccountID  uint32
	CharID     uint32
	PositionID uint32
}

type GuildPositionUpdate

type GuildPositionUpdate struct {
	PositionID uint32
	Right      uint32
	Ranking    uint32
	PayRate    uint32
	PosName    string
}

type GuildRelationDelete added in v0.8.0

type GuildRelationDelete struct {
	Relation session.GuildRelation
}

type GuildWindow

type GuildWindow struct {
	Window

	EmblemImage func(Context) image.Image
	// contains filtered or unexported fields
}

func (*GuildWindow) Close added in v0.6.0

func (w *GuildWindow) Close()

func (*GuildWindow) DrawDragGhost added in v0.6.0

func (w *GuildWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*GuildWindow) DrawTooltip

func (w *GuildWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*GuildWindow) KeyboardShortcutsBlocked added in v0.11.0

func (w *GuildWindow) KeyboardShortcutsBlocked() bool

func (*GuildWindow) OpenWindow

func (w *GuildWindow) OpenWindow(ctx Context)

func (*GuildWindow) PopAction

func (w *GuildWindow) PopAction() GuildWindowAction

func (*GuildWindow) Rebind

func (w *GuildWindow) Rebind(ctx Context)

func (*GuildWindow) Refresh

func (w *GuildWindow) Refresh(ctx Context)

func (*GuildWindow) SetEmblemOptions

func (w *GuildWindow) SetEmblemOptions(ctx Context, options []GuildEmblemOption)

func (*GuildWindow) Toggle

func (w *GuildWindow) Toggle(ctx Context)

func (*GuildWindow) Update

func (w *GuildWindow) Update(ctx Context, shortcuts *ShortcutBar, actions GameActions) bool

func (*GuildWindow) UpdateDrag added in v0.6.0

func (w *GuildWindow) UpdateDrag(ctx Context, shortcuts *ShortcutBar) bool

func (*GuildWindow) UpdateKeyboardInput added in v0.11.0

func (w *GuildWindow) UpdateKeyboardInput(ctx Context) bool

type GuildWindowAction

type GuildWindowAction struct {
	RequestMenu        bool
	MenuTab            uint32
	SelectedEmblemPath string
	MemberPositions    []GuildMemberPositionUpdate
	LevelUpSkillIDs    []uint16
	UpdatePositions    bool
	Positions          []GuildPositionUpdate
	UpdateNotice       bool
	NoticeSubject      string
	Notice             string
	DeleteRelation     *GuildRelationDelete
	MemberAction       *GuildMemberAction
}

type HomunculusContextAction

type HomunculusContextAction struct {
	Kind HomunculusContextActionKind
}

type HomunculusContextActionKind

type HomunculusContextActionKind uint8
const (
	HomunculusContextActionNone HomunculusContextActionKind = iota
	HomunculusContextActionInfo
	HomunculusContextActionFeed
	HomunculusContextActionToggleAssist
)

type HomunculusContextMenu

type HomunculusContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*HomunculusContextMenu) Open

func (m *HomunculusContextMenu) Open(ctx Context, x, y int, aggressive bool)

func (*HomunculusContextMenu) PopAction

func (*HomunculusContextMenu) Update

func (m *HomunculusContextMenu) Update(ctx Context) bool

type HomunculusInfoAction

type HomunculusInfoAction struct {
	Kind HomunculusInfoActionKind
	Name string
}

type HomunculusInfoActionKind

type HomunculusInfoActionKind uint8
const (
	HomunculusInfoActionNone HomunculusInfoActionKind = iota
	HomunculusInfoActionSkill
	HomunculusInfoActionFeed
	HomunculusInfoActionDelete
	HomunculusInfoActionRename
)

type HomunculusInfoWindow

type HomunculusInfoWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*HomunculusInfoWindow) OpenInfo

func (w *HomunculusInfoWindow) OpenInfo(ctx Context, companion session.Companion)

func (*HomunculusInfoWindow) PopAction

func (*HomunculusInfoWindow) Rebind

func (w *HomunculusInfoWindow) Rebind(ctx Context)

func (*HomunculusInfoWindow) Update

func (w *HomunculusInfoWindow) Update(ctx Context) bool

type HomunculusSkillWindow

type HomunculusSkillWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*HomunculusSkillWindow) Close

func (w *HomunculusSkillWindow) Close()

func (*HomunculusSkillWindow) Draw

func (w *HomunculusSkillWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*HomunculusSkillWindow) DrawDragGhost

func (w *HomunculusSkillWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*HomunculusSkillWindow) DrawTooltip

func (w *HomunculusSkillWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*HomunculusSkillWindow) Open

func (w *HomunculusSkillWindow) Open(ctx Context, actions GameActions)

func (*HomunculusSkillWindow) Publish

func (w *HomunculusSkillWindow) Publish(ctx Context)

func (*HomunculusSkillWindow) Rebind

func (w *HomunculusSkillWindow) Rebind(ctx Context, actions GameActions)

func (*HomunculusSkillWindow) Toggle

func (w *HomunculusSkillWindow) Toggle(ctx Context, actions GameActions)

func (*HomunculusSkillWindow) Update

func (w *HomunculusSkillWindow) Update(ctx Context, shortcuts *ShortcutBar, actions GameActions) bool

func (*HomunculusSkillWindow) UpdateDrag

func (w *HomunculusSkillWindow) UpdateDrag(ctx Context, shortcuts *ShortcutBar) bool

type IdentifyWindow

type IdentifyWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*IdentifyWindow) ApplyAck

func (w *IdentifyWindow) ApplyAck(ctx Context, ack network.ItemIdentifyAck)

func (*IdentifyWindow) ClampScroll

func (w *IdentifyWindow) ClampScroll(s *session.Session)

func (*IdentifyWindow) OpenList

func (w *IdentifyWindow) OpenList(ctx Context, list network.ItemIdentifyList)

func (*IdentifyWindow) Update

func (w *IdentifyWindow) Update(ctx Context) bool

type InventoryBagWindow

type InventoryBagWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*InventoryBagWindow) AcceptStorageDrop

func (w *InventoryBagWindow) AcceptStorageDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*InventoryBagWindow) ClampScroll

func (w *InventoryBagWindow) ClampScroll(s *session.Session)

func (*InventoryBagWindow) Draw

func (w *InventoryBagWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*InventoryBagWindow) DrawDragGhost

func (w *InventoryBagWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*InventoryBagWindow) DrawTooltip

func (w *InventoryBagWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*InventoryBagWindow) KeyboardShortcutsBlocked added in v0.10.0

func (w *InventoryBagWindow) KeyboardShortcutsBlocked() bool

func (*InventoryBagWindow) PendingCardIndex

func (w *InventoryBagWindow) PendingCardIndex() uint16

func (*InventoryBagWindow) Rebind

func (w *InventoryBagWindow) Rebind(ctx Context, itemInfo *ItemInfoWindow)

func (*InventoryBagWindow) Toggle

func (w *InventoryBagWindow) Toggle(ctx Context)

func (*InventoryBagWindow) Update

func (w *InventoryBagWindow) Update(ctx Context, shortcuts *ShortcutBar, storage *StorageWindow, cart *CartWindow, trade *TradeWindow, equipment *EquipmentWindow, itemInfo *ItemInfoWindow, dropTargets ...InventoryDropTarget) bool

func (*InventoryBagWindow) UpdateDrag

func (w *InventoryBagWindow) UpdateDrag(ctx Context, shortcuts *ShortcutBar, storage *StorageWindow, cart *CartWindow, trade *TradeWindow, equipment *EquipmentWindow, dropTargets ...InventoryDropTarget) bool

func (*InventoryBagWindow) UpdateDropPrompt added in v0.10.0

func (w *InventoryBagWindow) UpdateDropPrompt(ctx Context) bool

type InventoryDropTarget added in v0.11.0

type InventoryDropTarget interface {
	AcceptInventoryDrop(Context, session.InventoryItem, int, int) bool
}

type ItemInfoCardIllustrationRequest added in v0.10.0

type ItemInfoCardIllustrationRequest struct {
	ItemID uint16
	Title  string
}

type ItemInfoReadBookRequest added in v0.10.0

type ItemInfoReadBookRequest struct {
	ItemID uint16
	Title  string
}

type ItemInfoWindow

type ItemInfoWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*ItemInfoWindow) DrawTooltip

func (w *ItemInfoWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*ItemInfoWindow) PopCardIllustrationRequest added in v0.10.0

func (w *ItemInfoWindow) PopCardIllustrationRequest() ItemInfoCardIllustrationRequest

func (*ItemInfoWindow) PopReadBookRequest added in v0.10.0

func (w *ItemInfoWindow) PopReadBookRequest() ItemInfoReadBookRequest

func (*ItemInfoWindow) Rebind

func (w *ItemInfoWindow) Rebind(ctx Context, assets AssetProvider)

func (*ItemInfoWindow) Update

func (w *ItemInfoWindow) Update(ctx Context, assets AssetProvider) bool

type ItemPickupNotification

type ItemPickupNotification struct {
	// contains filtered or unexported fields
}

func (*ItemPickupNotification) Draw

func (n *ItemPickupNotification) Draw(screen *render.Frame, ctx Context, assets AssetProvider, now time.Time)

func (*ItemPickupNotification) Show

func (n *ItemPickupNotification) Show(ctx Context, item session.InventoryItem, count int, now time.Time)

type KeyboardShortcutBlocker

type KeyboardShortcutBlocker interface {
	KeyboardShortcutsBlocked(ctx client.Context) bool
}

type LevelUpNotificationAction added in v0.9.0

type LevelUpNotificationAction uint8
const (
	LevelUpNotificationBase LevelUpNotificationAction = 1 << iota
	LevelUpNotificationJob
)
const LevelUpNotificationNone LevelUpNotificationAction = 0

type LevelUpNotifications added in v0.9.0

type LevelUpNotifications struct {
	// contains filtered or unexported fields
}

func (*LevelUpNotifications) BaseVisible added in v0.9.0

func (n *LevelUpNotifications) BaseVisible() bool

func (*LevelUpNotifications) JobVisible added in v0.9.0

func (n *LevelUpNotifications) JobVisible() bool

func (*LevelUpNotifications) NotifyBase added in v0.9.0

func (n *LevelUpNotifications) NotifyBase()

func (*LevelUpNotifications) NotifyJob added in v0.9.0

func (n *LevelUpNotifications) NotifyJob()

func (*LevelUpNotifications) Rebind added in v0.9.0

func (n *LevelUpNotifications) Rebind(ctx Context)

Rebind detaches callbacks captured by a previous WorldMode while preserving pending notifications across a map change.

func (*LevelUpNotifications) Update added in v0.9.0

type LoginWindow

type LoginWindow struct {
	Username string
	Password string

	Window
	// contains filtered or unexported fields
}

func NewLoginWindow

func NewLoginWindow(ctx client.Context, username, password string, callbacks LoginWindowCallbacks) *LoginWindow

func (*LoginWindow) SetContext

func (w *LoginWindow) SetContext(ctx client.Context)

func (*LoginWindow) Update

func (w *LoginWindow) Update(ctx client.Context) bool

type LoginWindowCallbacks

type LoginWindowCallbacks struct {
	OnSubmit func()
}

type MailAction added in v0.11.0

type MailAction struct {
	Kind                   MailActionKind
	ID                     uint32
	Item                   session.InventoryItem
	Recipient, Title, Body string
	Zeny                   uint32
}

MailAction describes user intent only. The game owns packet sending and acknowledgement correlation; the window never changes inventory balances.

type MailActionKind added in v0.11.0

type MailActionKind uint8
const (
	MailActionNone MailActionKind = iota
	MailActionRefresh
	MailActionCompose
	MailActionRead
	MailActionTake
	MailActionDelete
	MailActionReturn
	MailActionAttach
	MailActionRemoveAttachment
	MailActionSend
	MailActionClose
)

type MailWindow added in v0.11.0

type MailWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*MailWindow) AcceptInventoryDrop added in v0.11.0

func (w *MailWindow) AcceptInventoryDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*MailWindow) BeginCompose added in v0.11.0

func (w *MailWindow) BeginCompose(recipient, title string)

func (*MailWindow) CloseFromServer added in v0.11.0

func (w *MailWindow) CloseFromServer(ctx Context)

func (*MailWindow) IsComposing added in v0.11.0

func (w *MailWindow) IsComposing() bool

func (*MailWindow) ModalOpen added in v0.11.0

func (w *MailWindow) ModalOpen() bool

func (*MailWindow) Open added in v0.11.0

func (w *MailWindow) Open(ctx Context, onError func(string))

func (*MailWindow) PopAction added in v0.11.0

func (w *MailWindow) PopAction() MailAction

func (*MailWindow) ReadMessage added in v0.11.0

func (w *MailWindow) ReadMessage() (network.MailMessage, bool)

func (*MailWindow) RemoveMail added in v0.11.0

func (w *MailWindow) RemoveMail(id uint32)

func (*MailWindow) SetAttachment added in v0.11.0

func (w *MailWindow) SetAttachment(item session.InventoryItem)

func (*MailWindow) SetBusy added in v0.11.0

func (w *MailWindow) SetBusy(busy bool)

func (*MailWindow) SetInbox added in v0.11.0

func (w *MailWindow) SetInbox(entries []network.MailEntry)

func (*MailWindow) ShowInbox added in v0.11.0

func (w *MailWindow) ShowInbox()

func (*MailWindow) ShowMail added in v0.11.0

func (w *MailWindow) ShowMail(message network.MailMessage)

func (*MailWindow) Update added in v0.11.0

func (w *MailWindow) Update(ctx Context, itemInfo *ItemInfoWindow) bool

func (*MailWindow) UpdateKeyboardInput added in v0.11.0

func (w *MailWindow) UpdateKeyboardInput(ctx Context) bool

UI text events are dispatched before world input. Keep their Enter/arrows from also activating the console or navigating its history this frame.

func (*MailWindow) UpdateModal added in v0.11.0

func (w *MailWindow) UpdateModal(ctx Context) bool

func (*MailWindow) UpdateReadMessage added in v0.11.0

func (w *MailWindow) UpdateReadMessage(message network.MailMessage)

UpdateReadMessage refreshes attachments without reopening a dismissed reader.

type MakingArrowWindow

type MakingArrowWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*MakingArrowWindow) OpenList

func (w *MakingArrowWindow) OpenList(ctx Context, list network.MakingArrowList)

func (*MakingArrowWindow) Update

func (w *MakingArrowWindow) Update(ctx Context) bool

type MakingItemWindow

type MakingItemWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*MakingItemWindow) ApplyAck

func (w *MakingItemWindow) ApplyAck(ctx Context, ack network.MakingItemAck)

func (*MakingItemWindow) OpenList

func (w *MakingItemWindow) OpenList(ctx Context, list network.MakingItemList)

func (*MakingItemWindow) Update

func (w *MakingItemWindow) Update(ctx Context) bool

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) AddForegroundOverlay added in v0.9.0

func (m *Manager) AddForegroundOverlay(root widget.Widget)

AddForegroundOverlay publishes an overlay above ordinary windows. New and raised windows remain below it until the foreground overlay is removed.

func (*Manager) AddOverlay

func (m *Manager) AddOverlay(root widget.Widget)

func (*Manager) Clear

func (m *Manager) Clear()

func (*Manager) OverlayAt added in v0.11.0

func (m *Manager) OverlayAt(x, y int) widget.Widget

OverlayAt returns the same topmost hit target used for pointer dispatch. Drag-and-drop destinations use it to avoid accepting items through a window.

func (*Manager) PointerBlocked

func (m *Manager) PointerBlocked(x, y int) bool

func (*Manager) RaiseOverlay added in v0.9.0

func (m *Manager) RaiseOverlay(root widget.Widget)

func (*Manager) RemoveOverlay

func (m *Manager) RemoveOverlay(root widget.Widget)

func (*Manager) SetUIApp

func (m *Manager) SetUIApp(app client.UIApp)

type MercenaryContextAction

type MercenaryContextAction struct {
	Kind MercenaryContextActionKind
}

type MercenaryContextActionKind

type MercenaryContextActionKind uint8
const (
	MercenaryContextActionNone MercenaryContextActionKind = iota
	MercenaryContextActionInfo
	MercenaryContextActionToggleAssist
)

type MercenaryContextMenu

type MercenaryContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*MercenaryContextMenu) Open

func (m *MercenaryContextMenu) Open(ctx Context, x, y int, aggressive bool)

func (*MercenaryContextMenu) PopAction

func (*MercenaryContextMenu) Update

func (m *MercenaryContextMenu) Update(ctx Context) bool

type MercenaryInfoAction

type MercenaryInfoAction struct {
	Kind MercenaryInfoActionKind
}

type MercenaryInfoActionKind

type MercenaryInfoActionKind uint8
const (
	MercenaryInfoActionNone MercenaryInfoActionKind = iota
	MercenaryInfoActionSkill
	MercenaryInfoActionDelete
)

type MercenaryInfoWindow

type MercenaryInfoWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*MercenaryInfoWindow) OpenInfo

func (w *MercenaryInfoWindow) OpenInfo(ctx Context, companion session.Companion)

func (*MercenaryInfoWindow) PopAction

func (*MercenaryInfoWindow) Rebind

func (w *MercenaryInfoWindow) Rebind(ctx Context)

func (*MercenaryInfoWindow) Update

func (w *MercenaryInfoWindow) Update(ctx Context) bool

type MercenarySkillWindow

type MercenarySkillWindow struct {
	HomunculusSkillWindow
}

func (*MercenarySkillWindow) Open

func (w *MercenarySkillWindow) Open(ctx Context, actions GameActions)

func (*MercenarySkillWindow) Rebind

func (w *MercenarySkillWindow) Rebind(ctx Context, actions GameActions)

func (*MercenarySkillWindow) Toggle

func (w *MercenarySkillWindow) Toggle(ctx Context, actions GameActions)

func (*MercenarySkillWindow) Update

func (w *MercenarySkillWindow) Update(ctx Context, shortcuts *ShortcutBar, actions GameActions) bool

func (*MercenarySkillWindow) UpdateDrag

func (w *MercenarySkillWindow) UpdateDrag(ctx Context, shortcuts *ShortcutBar) bool

type Minimap

type Minimap struct {
	// contains filtered or unexported fields
}

func (*Minimap) ApplyCompass

func (m *Minimap) ApplyCompass(id uint8, typ, x, y int, rgb uint32, now time.Time)

func (*Minimap) ApplyGuildMemberPosition added in v0.8.0

func (m *Minimap) ApplyGuildMemberPosition(accountID uint32, x, y int)

ApplyGuildMemberPosition updates one guild member marker. The server uses negative coordinates to remove a member who left the map or went offline.

func (*Minimap) ClearBossMarker added in v0.10.0

func (m *Minimap) ClearBossMarker()

func (*Minimap) ClearGuildMemberPositions added in v0.8.1

func (m *Minimap) ClearGuildMemberPositions()

ClearGuildMemberPositions removes every guild marker after the local player leaves, is expelled, or loses the guild through disbanding.

func (*Minimap) SetBossMarker added in v0.10.0

func (m *Minimap) SetBossMarker(x, y int)

func (*Minimap) Toggle

func (m *Minimap) Toggle(ctx Context)

func (*Minimap) Update

func (m *Minimap) Update(ctx Context) bool

type MonsterInfoView added in v0.10.0

type MonsterInfoView struct {
	Info    network.MonsterInfo
	Name    string
	MaxHP   uint32
	Preview image.Image
}

type MonsterInfoWindow added in v0.10.0

type MonsterInfoWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*MonsterInfoWindow) OpenInfo added in v0.10.0

func (w *MonsterInfoWindow) OpenInfo(ctx Context, view MonsterInfoView)

func (*MonsterInfoWindow) Update added in v0.10.0

func (w *MonsterInfoWindow) Update(ctx Context) bool

type NPCCutinOverlay added in v0.9.0

type NPCCutinOverlay struct {
	// contains filtered or unexported fields
}

NPCCutinOverlay owns the single illustration displayed by an NPC script. The position byte selects its placement; receiving another image replaces it. Static cut-ins draw below the UI, while movable variants reuse Window.

func (*NPCCutinOverlay) Apply added in v0.9.0

func (c *NPCCutinOverlay) Apply(cutin network.NPCCutin, texture *render.Image)

Apply first removes the previous illustration, matching the original client. A nil texture leaves it cleared, preventing stale artwork after a load error.

func (*NPCCutinOverlay) Clear added in v0.9.0

func (c *NPCCutinOverlay) Clear()

func (*NPCCutinOverlay) Draw added in v0.9.0

func (c *NPCCutinOverlay) Draw(screen *render.Frame)

func (*NPCCutinOverlay) PointerBlocked added in v0.9.0

func (c *NPCCutinOverlay) PointerBlocked(screenWidth, screenHeight, x, y int) bool

func (*NPCCutinOverlay) Update added in v0.9.0

func (c *NPCCutinOverlay) Update(ctx Context) bool

Update owns the two windowed cut-in variants. The ordinary left, center and right illustrations remain lightweight render overlays and need no update.

func (*NPCCutinOverlay) Visible added in v0.9.0

func (c *NPCCutinOverlay) Visible() bool

type NPCDialog

type NPCDialog struct {
	// contains filtered or unexported fields
}

func (*NPCDialog) Apply

func (d *NPCDialog) Apply(packet network.NPCDialog)

func (*NPCDialog) IsOpen

func (d *NPCDialog) IsOpen() bool

func (*NPCDialog) Reset

func (d *NPCDialog) Reset()

func (*NPCDialog) ResetPublished

func (d *NPCDialog) ResetPublished(ctx Context)

func (*NPCDialog) SetCloseHandler added in v0.9.0

func (d *NPCDialog) SetCloseHandler(handler func())

func (*NPCDialog) Update

func (d *NPCDialog) Update(ctx Context) bool

type PartyContextMenu

type PartyContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*PartyContextMenu) Open

func (m *PartyContextMenu) Open(ctx Context, x, y int, member session.PartyMember, canManage, isSelf bool)

func (*PartyContextMenu) PopAction

func (m *PartyContextMenu) PopAction() FriendsWindowAction

func (*PartyContextMenu) Rebind

func (m *PartyContextMenu) Rebind(ctx Context)

func (*PartyContextMenu) Update

func (m *PartyContextMenu) Update(ctx Context) bool

type PartyCreateWindow

type PartyCreateWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*PartyCreateWindow) Open

func (w *PartyCreateWindow) Open(ctx Context)

func (*PartyCreateWindow) PopAction

func (*PartyCreateWindow) Rebind

func (w *PartyCreateWindow) Rebind(ctx Context)

func (*PartyCreateWindow) Update

func (w *PartyCreateWindow) Update(ctx Context) bool

type PartyCreateWindowAction

type PartyCreateWindowAction struct {
	Name         string
	ItemPickup   uint8
	ItemDivision uint8
}

type PartyInviteWindow

type PartyInviteWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*PartyInviteWindow) Open

func (w *PartyInviteWindow) Open(ctx Context)

func (*PartyInviteWindow) PopAction

func (w *PartyInviteWindow) PopAction() string

func (*PartyInviteWindow) Rebind

func (w *PartyInviteWindow) Rebind(ctx Context)

func (*PartyInviteWindow) Update

func (w *PartyInviteWindow) Update(ctx Context) bool

type PartySettingsWindow

type PartySettingsWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*PartySettingsWindow) Open

func (w *PartySettingsWindow) Open(ctx Context)

func (*PartySettingsWindow) Rebind

func (w *PartySettingsWindow) Rebind(ctx Context)

func (*PartySettingsWindow) Update

func (w *PartySettingsWindow) Update(ctx Context) bool

type PetContextAction

type PetContextAction struct {
	Kind PetContextActionKind
}

type PetContextActionKind

type PetContextActionKind uint8
const (
	PetContextActionNone PetContextActionKind = iota
	PetContextActionInfo
	PetContextActionFeed
	PetContextActionPerformance
	PetContextActionBackToEgg
	PetContextActionUnequipAccessory
)

type PetContextMenu

type PetContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*PetContextMenu) Open

func (m *PetContextMenu) Open(ctx Context, x, y int)

func (*PetContextMenu) PopAction

func (m *PetContextMenu) PopAction() PetContextAction

func (*PetContextMenu) Update

func (m *PetContextMenu) Update(ctx Context) bool

type PetEggWindow

type PetEggWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*PetEggWindow) ClampScroll

func (w *PetEggWindow) ClampScroll(s *session.Session)

func (*PetEggWindow) OpenList

func (w *PetEggWindow) OpenList(ctx Context, list network.PetEggList)

func (*PetEggWindow) Update

func (w *PetEggWindow) Update(ctx Context) bool

type PetInfoWindow

type PetInfoWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*PetInfoWindow) OpenInfo

func (w *PetInfoWindow) OpenInfo(ctx Context, property network.PetProperty)

func (*PetInfoWindow) Update

func (w *PetInfoWindow) Update(ctx Context) bool

type PlayerContextAction

type PlayerContextAction struct {
	Kind    PlayerContextActionKind
	ActorID uint32
	Name    string
}

type PlayerContextActionKind

type PlayerContextActionKind uint8
const (
	PlayerContextActionNone PlayerContextActionKind = iota
	PlayerContextActionAddFriend
	PlayerContextActionInviteParty
	PlayerContextActionInviteGuild
	PlayerContextActionTrade
	PlayerContextActionSeeEquipment
	PlayerContextActionAdopt
	PlayerContextActionGuildAlliance
	PlayerContextActionGuildHostility
)

type PlayerContextMenu

type PlayerContextMenu struct {
	Window
	// contains filtered or unexported fields
}

func (*PlayerContextMenu) Open

func (m *PlayerContextMenu) Open(ctx Context, x, y int, actorID uint32, name string, options PlayerContextOptions)

func (*PlayerContextMenu) PopAction

func (m *PlayerContextMenu) PopAction() PlayerContextAction

func (*PlayerContextMenu) Update

func (m *PlayerContextMenu) Update(ctx Context) bool

type PlayerContextOptions added in v0.8.0

type PlayerContextOptions struct {
	CanAddFriend       bool
	CanInviteParty     bool
	CanInviteGuild     bool
	CanAdopt           bool
	CanRequestAlliance bool
	CanDeclareHostile  bool
}

type Poptips added in v0.10.0

type Poptips struct {
	// contains filtered or unexported fields
}

Poptips is the short, server-driven message stack shown near the top of the game view. It is deliberately input-transparent.

func (*Poptips) Clear added in v0.10.0

func (p *Poptips) Clear()

func (*Poptips) Draw added in v0.10.0

func (p *Poptips) Draw(screen *render.Frame, now time.Time)

func (*Poptips) Show added in v0.10.0

func (p *Poptips) Show(text string, now time.Time)

type PvPCounter added in v0.7.0

type PvPCounter struct {
	// contains filtered or unexported fields
}

func (*PvPCounter) Unpublish added in v0.7.0

func (c *PvPCounter) Unpublish(ctx Context)

func (*PvPCounter) Update added in v0.7.0

func (c *PvPCounter) Update(ctx Context)

type RepairItemWindow

type RepairItemWindow struct {
	// contains filtered or unexported fields
}

func (*RepairItemWindow) ApplyAck

func (w *RepairItemWindow) ApplyAck(ctx Context, ack network.RepairItemAck)

func (*RepairItemWindow) OpenChoices

func (w *RepairItemWindow) OpenChoices(ctx Context, title, emptyText string, items []equipmentChoice, onConfirm func(Context, equipmentChoice), onCancel func(Context))

func (*RepairItemWindow) OpenList

func (w *RepairItemWindow) OpenList(ctx Context, list network.RepairItemList)

func (*RepairItemWindow) Update

func (w *RepairItemWindow) Update(ctx Context) bool

type ServiceWindow added in v0.8.1

type ServiceWindow struct {
	Window
	// contains filtered or unexported fields
}

func NewServiceWindow added in v0.8.1

func NewServiceWindow(ctx client.Context, services []string, options ServiceWindowOptions, callbacks ServiceWindowCallbacks) *ServiceWindow

func (*ServiceWindow) SelectedIndex added in v0.8.1

func (w *ServiceWindow) SelectedIndex() int

func (*ServiceWindow) SetContext added in v0.8.1

func (w *ServiceWindow) SetContext(ctx client.Context)

func (*ServiceWindow) Update added in v0.8.1

func (w *ServiceWindow) Update(ctx client.Context) bool

type ServiceWindowCallbacks added in v0.8.1

type ServiceWindowCallbacks struct {
	OnSelect func(int)
	OnCancel func()
}

type ServiceWindowOptions added in v0.8.1

type ServiceWindowOptions struct {
	Title    string
	Selected int
}

type SettingsWindow

type SettingsWindow struct {
	Window
}

func (*SettingsWindow) OpenWindow

func (w *SettingsWindow) OpenWindow(ctx client.Context)

func (*SettingsWindow) Rebind

func (w *SettingsWindow) Rebind(ctx client.Context)

func (*SettingsWindow) Update

func (w *SettingsWindow) Update(ctx client.Context) bool

type ShopWindow

type ShopWindow struct {
	// contains filtered or unexported fields
}

func (*ShopWindow) ApplyResult

func (w *ShopWindow) ApplyResult(ctx Context, result network.ShopResult)

func (*ShopWindow) Draw

func (w *ShopWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*ShopWindow) DrawDragGhost

func (w *ShopWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*ShopWindow) KeyboardShortcutsBlocked

func (w *ShopWindow) KeyboardShortcutsBlocked() bool

func (*ShopWindow) OpenBuy

func (w *ShopWindow) OpenBuy(list []network.ShopBuyItem, ctx Context)

func (*ShopWindow) OpenDeal

func (w *ShopWindow) OpenDeal(selection network.ShopDealSelection, ctx Context)

func (*ShopWindow) OpenSell

func (w *ShopWindow) OpenSell(list []network.ShopSellItem, ctx Context)

func (*ShopWindow) Update

func (w *ShopWindow) Update(ctx Context, itemInfo *ItemInfoWindow) bool

type ShortcutBar

type ShortcutBar struct {
	// contains filtered or unexported fields
}

func (*ShortcutBar) AcceptItemDrop

func (b *ShortcutBar) AcceptItemDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*ShortcutBar) AcceptSkillDrop

func (b *ShortcutBar) AcceptSkillDrop(ctx Context, skill session.Skill, mx, my int) bool

func (*ShortcutBar) ClearDepletedItem

func (b *ShortcutBar) ClearDepletedItem(ctx Context, index, itemID uint16) bool

func (*ShortcutBar) DrawTooltip

func (b *ShortcutBar) DrawTooltip(ctx Context, screen *render.Frame)

func (*ShortcutBar) Publish

func (b *ShortcutBar) Publish(ctx Context, actions GameActions, assets AssetProvider)

func (*ShortcutBar) ResetOverlay

func (b *ShortcutBar) ResetOverlay(ctx Context)

func (*ShortcutBar) SyncFromSession

func (b *ShortcutBar) SyncFromSession(ctx Context)

func (*ShortcutBar) Update

func (b *ShortcutBar) Update(ctx Context, actions GameActions) bool

type SkillWindow

type SkillWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*SkillWindow) ClampScroll

func (w *SkillWindow) ClampScroll(s *session.Session)

func (*SkillWindow) Draw

func (w *SkillWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*SkillWindow) DrawDragGhost

func (w *SkillWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*SkillWindow) DrawTooltip

func (w *SkillWindow) DrawTooltip(ctx Context, screen *render.Frame)

func (*SkillWindow) OpenWindow added in v0.9.0

func (w *SkillWindow) OpenWindow(ctx Context)

func (*SkillWindow) Publish

func (w *SkillWindow) Publish(ctx Context)

func (*SkillWindow) Rebind

func (w *SkillWindow) Rebind(ctx Context, actions GameActions)

func (*SkillWindow) Toggle

func (w *SkillWindow) Toggle(ctx Context)

func (*SkillWindow) Update

func (w *SkillWindow) Update(ctx Context, shortcuts *ShortcutBar, actions GameActions) bool

func (*SkillWindow) UpdateDrag

func (w *SkillWindow) UpdateDrag(ctx Context, shortcuts *ShortcutBar) bool

type StatsWindow

type StatsWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*StatsWindow) ApplyStatusChangeAck

func (w *StatsWindow) ApplyStatusChangeAck(ctx Context, ack network.StatusChangeAck)

func (*StatsWindow) OpenWindow added in v0.9.0

func (w *StatsWindow) OpenWindow(ctx Context)

func (*StatsWindow) Rebind

func (w *StatsWindow) Rebind(ctx Context)

func (*StatsWindow) Toggle

func (w *StatsWindow) Toggle(ctx Context)

func (*StatsWindow) Update

func (w *StatsWindow) Update(ctx Context) bool

type StatusIcons

type StatusIcons struct {
	// contains filtered or unexported fields
}

func (*StatusIcons) Unpublish

func (s *StatusIcons) Unpublish(ctx Context)

func (*StatusIcons) Update

func (s *StatusIcons) Update(ctx Context, now time.Time) bool

type StoragePasswordAction added in v0.10.0

type StoragePasswordAction struct {
	Kind     StoragePasswordActionKind
	Password string
}

type StoragePasswordActionKind added in v0.10.0

type StoragePasswordActionKind uint8
const (
	StoragePasswordActionNone StoragePasswordActionKind = iota
	StoragePasswordActionCheck
	StoragePasswordActionChange
	StoragePasswordActionCancel
)

type StoragePasswordMode added in v0.10.0

type StoragePasswordMode uint8
const (
	StoragePasswordModeEnter StoragePasswordMode = iota
	StoragePasswordModeSet
	StoragePasswordModeLocked
)

type StoragePasswordWindow added in v0.10.0

type StoragePasswordWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*StoragePasswordWindow) CloseFromServer added in v0.10.0

func (w *StoragePasswordWindow) CloseFromServer(ctx Context)

func (*StoragePasswordWindow) OpenPrompt added in v0.10.0

func (w *StoragePasswordWindow) OpenPrompt(ctx Context, mode StoragePasswordMode, message string)

func (*StoragePasswordWindow) PopAction added in v0.10.0

func (*StoragePasswordWindow) ShowMessage added in v0.10.0

func (w *StoragePasswordWindow) ShowMessage(ctx Context, message string)

func (*StoragePasswordWindow) Update added in v0.10.0

func (w *StoragePasswordWindow) Update(ctx Context) bool

type StorageWindow

type StorageWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*StorageWindow) AcceptCartDrop

func (w *StorageWindow) AcceptCartDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*StorageWindow) AcceptInventoryDrop

func (w *StorageWindow) AcceptInventoryDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*StorageWindow) ClampScroll

func (w *StorageWindow) ClampScroll(s *session.Session)

func (*StorageWindow) Draw

func (w *StorageWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*StorageWindow) DrawDragGhost

func (w *StorageWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*StorageWindow) OpenWindow

func (w *StorageWindow) OpenWindow(ctx Context)

func (*StorageWindow) Refresh

func (w *StorageWindow) Refresh(ctx Context, itemInfo *ItemInfoWindow)

func (*StorageWindow) SetOpen

func (w *StorageWindow) SetOpen(open bool)

func (*StorageWindow) Update

func (w *StorageWindow) Update(ctx Context, inventory *InventoryBagWindow, cart *CartWindow, itemInfo *ItemInfoWindow) bool

func (*StorageWindow) UpdateDrag

func (w *StorageWindow) UpdateDrag(ctx Context, inventory *InventoryBagWindow, cart *CartWindow) bool

type TeleportModal

type TeleportModal struct {
	Window
	// contains filtered or unexported fields
}

func (*TeleportModal) OpenWarpPointList

func (m *TeleportModal) OpenWarpPointList(list network.WarpPointList, skill session.Skill)

func (*TeleportModal) Reset

func (m *TeleportModal) Reset()

func (TeleportModal) Title

func (m TeleportModal) Title() string

func (*TeleportModal) Update

func (m *TeleportModal) Update(ctx Context, actions GameActions) bool

type TextPromptAction

type TextPromptAction struct {
	Text      string
	Submitted bool
}

type TextPromptWindow

type TextPromptWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*TextPromptWindow) Open

func (w *TextPromptWindow) Open(ctx Context, title, label, placeholder string, maxLength int)

func (*TextPromptWindow) PopAction

func (w *TextPromptWindow) PopAction() TextPromptAction

func (*TextPromptWindow) Rebind

func (w *TextPromptWindow) Rebind(ctx Context)

func (*TextPromptWindow) Update

func (w *TextPromptWindow) Update(ctx Context) bool

type TradeWindow

type TradeWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*TradeWindow) AcceptInventoryDrop

func (w *TradeWindow) AcceptInventoryDrop(ctx Context, item session.InventoryItem, mx, my int) bool

func (*TradeWindow) AddOwnItemAck

func (w *TradeWindow) AddOwnItemAck(ctx Context, ack network.TradeAddItemAck)

func (*TradeWindow) AddReceivedItem

func (w *TradeWindow) AddReceivedItem(ctx Context, item network.TradeItem)

func (*TradeWindow) Close

func (w *TradeWindow) Close(ctx Context)

func (*TradeWindow) Open

func (w *TradeWindow) Open(ctx Context, partnerName string)

func (*TradeWindow) SetConcluded

func (w *TradeWindow) SetConcluded(ctx Context, other bool)

func (*TradeWindow) Undo

func (w *TradeWindow) Undo(ctx Context)

func (*TradeWindow) Update

func (w *TradeWindow) Update(ctx Context, itemInfo *ItemInfoWindow) bool

type VendingWindow

type VendingWindow struct {
	// contains filtered or unexported fields
}

func (*VendingWindow) ApplyOwnList

func (w *VendingWindow) ApplyOwnList(ctx Context, list network.VendingItemList)

func (*VendingWindow) ApplyPurchaseResult

func (w *VendingWindow) ApplyPurchaseResult(ctx Context, result network.VendingPurchaseResult)

func (*VendingWindow) ApplySoldItem

func (w *VendingWindow) ApplySoldItem(ctx Context, sold network.VendingSoldItem)

func (*VendingWindow) Draw

func (w *VendingWindow) Draw(screen *render.Frame, ctx Context, assets AssetProvider)

func (*VendingWindow) DrawDragGhost

func (w *VendingWindow) DrawDragGhost(screen *render.Frame, ctx Context, assets AssetProvider)

func (*VendingWindow) KeyboardShortcutsBlocked

func (w *VendingWindow) KeyboardShortcutsBlocked() bool

func (*VendingWindow) OpenBuy

func (w *VendingWindow) OpenBuy(ctx Context, list network.VendingItemList)

func (*VendingWindow) OpenSetup

func (w *VendingWindow) OpenSetup(ctx Context, req network.VendingOpenRequest)

func (*VendingWindow) Update

func (w *VendingWindow) Update(ctx Context, itemInfo *ItemInfoWindow) bool

type ViewEquipmentWindow

type ViewEquipmentWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*ViewEquipmentWindow) Open

func (*ViewEquipmentWindow) Update

func (w *ViewEquipmentWindow) Update(ctx Context, itemInfo *ItemInfoWindow) bool

type WeaponRefineWindow

type WeaponRefineWindow struct {
	// contains filtered or unexported fields
}

func (*WeaponRefineWindow) ApplyAck

func (w *WeaponRefineWindow) ApplyAck(ctx Context, ack network.WeaponRefineAck)

func (*WeaponRefineWindow) OpenChoices

func (w *WeaponRefineWindow) OpenChoices(ctx Context, title, emptyText string, items []equipmentChoice, onConfirm func(Context, equipmentChoice), onCancel func(Context))

func (*WeaponRefineWindow) OpenList

func (w *WeaponRefineWindow) OpenList(ctx Context, list network.WeaponRefineList)

func (*WeaponRefineWindow) Update

func (w *WeaponRefineWindow) Update(ctx Context) bool

type WhisperWindow

type WhisperWindow struct {
	Window
	// contains filtered or unexported fields
}

func (*WhisperWindow) AddError

func (w *WhisperWindow) AddError(ctx Context, message string)

func (*WhisperWindow) AddIncoming

func (w *WhisperWindow) AddIncoming(ctx Context, sender, message string)

func (*WhisperWindow) AddOutgoing

func (w *WhisperWindow) AddOutgoing(ctx Context, message string)

func (*WhisperWindow) Open

func (w *WhisperWindow) Open(ctx Context, target string)

func (*WhisperWindow) PopAction

func (w *WhisperWindow) PopAction() WhisperWindowAction

func (*WhisperWindow) Rebind

func (w *WhisperWindow) Rebind(ctx Context)

func (*WhisperWindow) Update

func (w *WhisperWindow) Update(ctx Context) bool

type WhisperWindowAction

type WhisperWindowAction struct {
	Target  string
	Message string
}

type Window

type Window struct {
	CloseOnEsc bool
	// contains filtered or unexported fields
}

func NewWindow

func NewWindow(width, height int) Window

func (*Window) Close

func (w *Window) Close()

func (*Window) EnsureWindow

func (w *Window) EnsureWindow(width, height int) bool

func (*Window) IsOpen

func (w *Window) IsOpen() bool

func (*Window) Open

func (w *Window) Open(ctx client.Context, content widget.Widget)

func (*Window) OpenAt

func (w *Window) OpenAt(x, y int, content widget.Widget)

func (*Window) Publish

func (w *Window) Publish(ctx client.Context)

func (*Window) Raise added in v0.9.0

func (w *Window) Raise(ctx client.Context)

func (*Window) RebindContent

func (w *Window) RebindContent(ctx client.Context, content widget.Widget)

func (*Window) SetAutoPosition

func (w *Window) SetAutoPosition(x, y int) bool

func (*Window) SetBackground

func (w *Window) SetBackground(color widget.Color)

func (*Window) SetContent

func (w *Window) SetContent(content widget.Widget)

func (*Window) SetFullRedraw

func (w *Window) SetFullRedraw(enabled bool)

func (*Window) SetSize

func (w *Window) SetSize(width, height int)

func (*Window) Unpublish

func (w *Window) Unpublish(ctx client.Context)

func (*Window) Update

func (w *Window) Update(ctx client.Context) bool

func (*Window) Widget

func (w *Window) Widget() widget.Widget

type WindowOption

type WindowOption func(*windowConfig)

func Background

func Background(color widget.Color) WindowOption

func CloseButton

func CloseButton(enabled bool) WindowOption

func Content

func Content(content widget.Widget) WindowOption
func Footer(children ...widget.Widget) WindowOption

func OnClose

func OnClose(onClose func()) WindowOption

func Radius

func Radius(radius float32) WindowOption

func Size

func Size(width, height float32) WindowOption

func Title

func Title(title string) WindowOption

func TitleBar

func TitleBar(enabled bool) WindowOption

func TitleButton added in v0.10.0

func TitleButton(kind rotheme.IconButtonKind, onClick func()) WindowOption

Source Files

Directories

Path Synopsis
Package rotheme centralizes the Ragnarok-style gogpu/ui theme values.
Package rotheme centralizes the Ragnarok-style gogpu/ui theme values.

Jump to

Keyboard shortcuts

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