Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDialog = &DialogManager{
ShowAllChecker: defaultShowAll,
AdvanceChecker: defaultAdvance,
}
Functions ¶
This section is empty.
Types ¶
type DialogManager ¶
type DialogManager struct {
ShowAllChecker func() bool
AdvanceChecker func() bool
SoundPlayer *sound.SoundPlayer
// contains filtered or unexported fields
}
func (*DialogManager) Active ¶
func (dm *DialogManager) Active() bool
func (*DialogManager) RevealedAll ¶
func (dm *DialogManager) RevealedAll() bool
func (*DialogManager) Show ¶
func (dm *DialogManager) Show(text string, style TextStyle, charSound string)
func (*DialogManager) Update ¶
func (dm *DialogManager) Update(dt time.Duration)
func (*DialogManager) Waiting ¶
func (dm *DialogManager) Waiting() bool
type DialogueCommand ¶
type Glyph ¶
type TextDisplay ¶
type TextDisplay struct {
Commands []DialogueCommand
CmdIndex int
Displayed []*Glyph
IsComplete bool
OnComplete func()
CharSound string
// contains filtered or unexported fields
}
func NewTextDisplay ¶
func NewTextDisplay(text string, style TextStyle) *TextDisplay
func (*TextDisplay) Advance ¶
func (t *TextDisplay) Advance() bool
func (*TextDisplay) Destroy ¶
func (t *TextDisplay) Destroy()
func (*TextDisplay) Draw ¶
func (t *TextDisplay) Draw(s *ebiten.Image)
func (*TextDisplay) RevealedAll ¶
func (t *TextDisplay) RevealedAll() bool
func (*TextDisplay) ShowAll ¶
func (t *TextDisplay) ShowAll()
func (*TextDisplay) Update ¶
func (t *TextDisplay) Update(deltaTime time.Duration)
func (*TextDisplay) Waiting ¶
func (t *TextDisplay) Waiting() bool
type TextParser ¶
type TextParser struct {
Text string
StartX float64
StartY float64
ScaleX float64
ScaleY float64
FontHeight float64
LineSpacing float64
Delay float64
CharWidth map[string]int
CharSpacing float64
DefaultColor color.Color
}
func (*TextParser) Parse ¶
func (p *TextParser) Parse() []DialogueCommand
type TextString ¶
type TextString struct {
X, Y float64
Rotation float64
Alpha float64
Text string
Style TextStyle
Layer int
Visible bool
Centered bool
UpdateFunc func(ts *TextString, dt time.Duration)
// contains filtered or unexported fields
}
func NewTextString ¶
func NewTextString(text string, x, y float64, style TextStyle) *TextString
func (*TextString) Destroy ¶
func (ts *TextString) Destroy()
func (*TextString) Draw ¶
func (ts *TextString) Draw(screen *ebiten.Image)
func (*TextString) Hide ¶
func (ts *TextString) Hide()
func (*TextString) SetPosition ¶
func (ts *TextString) SetPosition(x, y float64)
func (*TextString) SetText ¶
func (ts *TextString) SetText(text string)
func (*TextString) Show ¶
func (ts *TextString) Show()
func (*TextString) Update ¶
func (ts *TextString) Update(deltaTime time.Duration)
Click to show internal directories.
Click to hide internal directories.