ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameWindow

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

FrameWindow is a struct to draw a window with frame.

func NewFrameWindow

func NewFrameWindow(x, y, width, height, frameWidth int) *FrameWindow

NewFrameWindow returns a FrameWindow.

The width and height are used for the inner region excluding the frame. If 0 is set to the frameWidth, the frame will not be drawn.

func (*FrameWindow) DrawWindow

func (w *FrameWindow) DrawWindow(screen *ebiten.Image)

DrawWindow draws this window.

func (*FrameWindow) GetWindowRect

func (w *FrameWindow) GetWindowRect() image.Rectangle

GetWindowRect returns the rectangle of this window.

func (w *FrameWindow) SetBlink(enableBlink bool)

SetBlink sets the flag to blink the frame.

func (*FrameWindow) SetColors

func (w *FrameWindow) SetColors(inner, frameDark, frameLight color.RGBA)

SetColors sets the colors of the window's inner region and the frame's normal color. If you need to blink the frame, please use the SetBlinkFrame method.

type MessageWindow added in v0.0.5

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

MessageWindow is a struct to draw a window with frame.

func NewMessageWindow added in v0.0.5

func NewMessageWindow(x, y, width, height, frameWidth int) *MessageWindow

NewMessageWindow returns a MessageWindow.

The width and height are used for the inner region excluding the frame. If 0 is set to the frameWidth, the frame will not be drawn.

func (*MessageWindow) DrawWindow added in v0.0.5

func (mw *MessageWindow) DrawWindow(screen *ebiten.Image, msg string)

DrawWindow draws this window.

func (*MessageWindow) GetWindowRect added in v0.0.5

func (mw *MessageWindow) GetWindowRect() image.Rectangle

GetWindowRect returns the rectangle of this window.

func (mw *MessageWindow) SetBlink(enableBlink bool)

SetBlink sets the flag to blink the frame.

func (*MessageWindow) SetColors added in v0.0.5

func (mw *MessageWindow) SetColors(inner, frameDark, frameLight color.RGBA)

SetColors sets the colors of the window's inner region and the frame's normal color. If you need to blink the frame, please use the SetBlinkFrame method.

Jump to

Keyboard shortcuts

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