Documentation ¶
Index ¶
- type Style
- type StyleState
- type Theme
- func (th *Theme) Button(text string) []widget.ButtonOpt
- func (th *Theme) Caret() []widget.CaretOpt
- func (th *Theme) Container() []widget.ContainerOpt
- func (th *Theme) Graphic(img *ebiten.Image) []widget.GraphicOpt
- func (th *Theme) Label(text string) []widget.LabelOpt
- func (th *Theme) ProgressBar() []widget.ProgressBarOpt
- func (th *Theme) Text(text string) []widget.TextOpt
- func (th *Theme) TextInput() []widget.TextInputOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Style ¶
type Style struct { BackgroundColor color.RGBA `yaml:"bg_color"` ForegroundColor color.RGBA `yaml:"fg_color"` Image *eimage.NineSlice `yaml:"image"` }
Style represents the style data for a widget.
type StyleState ¶
type StyleState struct { Idle Style `yaml:"idle"` Disabled *Style `yaml:"disabled"` Hover *Style `yaml:"hover"` Pressed *Style `yaml:"pressed"` CustomData map[string]interface{} `yaml:"custom_data"` Font *text.Face `yaml:"-"` }
StyleState represents the style state data for a widget.
type Theme ¶
type Theme struct { ButtonStyle StyleState `yaml:"button"` LabelStyle StyleState `yaml:"label"` TextStyle StyleState `yaml:"text"` ProgressBarStyle StyleState `yaml:"progressbar"` TextInputStyle StyleState `yaml:"textinput"` ContainerStyle StyleState `yaml:"container"` CaretStyle StyleState `yaml:"caret"` GraphicStyle StyleState `yaml:"graphic"` Font text.Face `yaml:"-"` }
Theme represents the theme data for EbitenUI.
func NewTheme ¶
func NewTheme(font text.Face) *Theme
NewTheme creates a new theme with the given font. On Linux the theme is determined by the system theme, i.e. light or dark. On Linux, the theme is defaulted to dark if the system theme is undetermined.
func (*Theme) Container ¶
func (th *Theme) Container() []widget.ContainerOpt
Container returns the container options for the theme.
func (*Theme) Graphic ¶
func (th *Theme) Graphic(img *ebiten.Image) []widget.GraphicOpt
func (*Theme) ProgressBar ¶
func (th *Theme) ProgressBar() []widget.ProgressBarOpt
ProgressBar returns the progress bar options for the theme.
func (*Theme) TextInput ¶
func (th *Theme) TextInput() []widget.TextInputOpt
TextInput returns the text input options for the theme.
Click to show internal directories.
Click to hide internal directories.