Documentation ¶
Index ¶
- Variables
- type Style
- type StyleState
- type Theme
- func (th *Theme) Button(text string) []widget.ButtonOpt
- func (th *Theme) Caret() []widget.CaretOpt
- func (th *Theme) Checkbox() []widget.CheckboxOpt
- 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) List() []widget.ListOpt
- func (th *Theme) ProgressBar() []widget.ProgressBarOpt
- func (th *Theme) SelectComboButton() widget.SelectComboButtonOpt
- func (th *Theme) SelectComboButtonWithButtonTheme() widget.SelectComboButtonOpt
- func (th *Theme) Text(text string) []widget.TextOpt
- func (th *Theme) TextInput() []widget.TextInputOpt
Constants ¶
This section is empty.
Variables ¶
View Source
var DarkStyleState = StyleState{ Idle: Style{ BackgroundColor: color.RGBA{0x0f, 0x0f, 0x0f, 0xff}, ForegroundColor: color.RGBA{0x00, 0x00, 0x00, 0xff}, }, Disabled: &Style{ BackgroundColor: color.RGBA{0x88, 0x88, 0x88, 0xff}, ForegroundColor: color.RGBA{0x00, 0x00, 0x00, 0xff}, }, Hover: &Style{ BackgroundColor: color.RGBA{0x3f, 0x3f, 0x3f, 0xff}, ForegroundColor: color.RGBA{0x3f, 0x3f, 0x3f, 0xff}, }, Pressed: &Style{ BackgroundColor: color.RGBA{0x64, 0x64, 0x64, 0xff}, ForegroundColor: color.RGBA{0xff, 0xff, 0xff, 0xff}, }, }
View Source
var LightStyleState = StyleState{ Idle: Style{ BackgroundColor: color.RGBA{0xaa, 0xaa, 0xaa, 0xaa}, ForegroundColor: color.RGBA{0xff, 0xff, 0xff, 0xff}, }, Disabled: &Style{ BackgroundColor: color.RGBA{0x88, 0x88, 0x88, 0xff}, ForegroundColor: color.RGBA{0xff, 0xff, 0xff, 0xff}, }, Hover: &Style{ BackgroundColor: color.RGBA{0x3f, 0x3f, 0x3f, 0xff}, ForegroundColor: color.RGBA{0xff, 0xff, 0xff, 0xff}, }, Pressed: &Style{ BackgroundColor: color.RGBA{0x64, 0x64, 0x64, 0xff}, ForegroundColor: color.RGBA{0xff, 0xff, 0xff, 0xff}, }, }
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"` ScrollContainerStyle StyleState `yaml:"scrollcontainer"` CaretStyle StyleState `yaml:"caret"` GraphicStyle StyleState `yaml:"graphic"` ListStyle StyleState `yaml:"list"` CheckboxStyle StyleState `yaml:"checkbox"` SelectComboButtonStyle StyleState `yaml:"selectcombobutton"` 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) Checkbox ¶
func (th *Theme) Checkbox() []widget.CheckboxOpt
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) SelectComboButton ¶
func (th *Theme) SelectComboButton() widget.SelectComboButtonOpt
func (*Theme) SelectComboButtonWithButtonTheme ¶
func (th *Theme) SelectComboButtonWithButtonTheme() widget.SelectComboButtonOpt
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.