Documentation
¶
Index ¶
- func NRGBAtoFloat32(newColor color.NRGBA) (float32, float32, float32, float32)
- type TextWrapper
- func (t *TextWrapper) Draw(screen *ebiten.Image)
- func (t *TextWrapper) GetFace() *text.GoTextFace
- func (t *TextWrapper) ScrollDown(scrollAmount int)
- func (t *TextWrapper) ScrollUp(scrollAmount int)
- func (t *TextWrapper) SetSize(newSize float64, lineHeight float64)
- func (t *TextWrapper) SetText(newText []string)
- func (t *TextWrapper) SetTextFromBytes(byt []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TextWrapper ¶
type TextWrapper struct {
X, Y, W, H float64 //Width must be greater than 0,
Color color.NRGBA //Any image.Color should work
Scroll, ScrollMax, ScrollCurrentMax, ScrollVisible int //Based off height (H)
// contains filtered or unexported fields
}
func NewTextWrapper ¶
func NewTextWrapper(width float64, height float64, fontData []byte) *TextWrapper
Create
func (*TextWrapper) GetFace ¶
func (t *TextWrapper) GetFace() *text.GoTextFace
func (*TextWrapper) ScrollDown ¶
func (t *TextWrapper) ScrollDown(scrollAmount int)
func (*TextWrapper) ScrollUp ¶
func (t *TextWrapper) ScrollUp(scrollAmount int)
func (*TextWrapper) SetSize ¶
func (t *TextWrapper) SetSize(newSize float64, lineHeight float64)
func (*TextWrapper) SetText ¶
func (t *TextWrapper) SetText(newText []string)
Actions Set text allows you to use mutltiple lines of input in the form of a string slice. New lines will be inserted where needed as the text wraps across the bounds set by the W (width) property of the TextWrapper
func (*TextWrapper) SetTextFromBytes ¶
func (t *TextWrapper) SetTextFromBytes(byt []byte)
Click to show internal directories.
Click to hide internal directories.