Documentation
¶
Index ¶
- Constants
- Variables
- func Disabled(c color.NRGBA) (d color.NRGBA)
- func MulAlpha(c color.NRGBA, alpha uint8) color.NRGBA
- func Pad(padding unit.Dp, widget layout.Widget) layout.Widget
- func PadSides(padding unit.Dp, widget layout.Widget) layout.Widget
- func Transparentize(c color.NRGBA, percent float32) color.NRGBA
- type BoardControls
- func (c *BoardControls) Layout(gtx layout.Context) layout.Dimensions
- func (c *BoardControls) ShouldFlip(gtx layout.Context) bool
- func (c *BoardControls) ShouldMoveBackward(gtx layout.Context) bool
- func (c *BoardControls) ShouldMoveForward(gtx layout.Context) bool
- func (c *BoardControls) ShouldReset(gtx layout.Context) bool
- type Icon
- type IconButton
- type OpeningName
- type OptionSelector
- type RangeSlider
- type TextField
- type TextFieldOption
- type Window
Constants ¶
View Source
const PageSize = 30 // puzzles on one page
Variables ¶
View Source
var ( BlackColor = color.NRGBA{R: 0x00, G: 0x00, B: 0x00, A: 0xFF} WhiteColor = color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF} GrayColor = color.NRGBA{R: 0x80, G: 0x80, B: 0x80, A: 0xFF} RedColor = color.NRGBA{R: 0xB8, G: 0x40, B: 0x40, A: 0xFF} YellowColor = color.NRGBA{R: 0xB8, G: 0xB8, B: 0x40, A: 0xFF} GreenColor = color.NRGBA{R: 0x40, G: 0xB8, B: 0x40, A: 0xFF} BlueColor = color.NRGBA{R: 0x40, G: 0x40, B: 0xB8, A: 0xFF} )
Functions ¶
func Disabled ¶
Disabled blends color towards the luminance and multiplies alpha. Blending towards luminance will desaturate the color. Multiplying alpha blends the color together more with the background.
Types ¶
type BoardControls ¶
type BoardControls struct {
// contains filtered or unexported fields
}
func NewBoardControls ¶
func NewBoardControls(th *material.Theme) *BoardControls
func (*BoardControls) Layout ¶
func (c *BoardControls) Layout(gtx layout.Context) layout.Dimensions
func (*BoardControls) ShouldFlip ¶
func (c *BoardControls) ShouldFlip(gtx layout.Context) bool
func (*BoardControls) ShouldMoveBackward ¶
func (c *BoardControls) ShouldMoveBackward(gtx layout.Context) bool
func (*BoardControls) ShouldMoveForward ¶
func (c *BoardControls) ShouldMoveForward(gtx layout.Context) bool
func (*BoardControls) ShouldReset ¶
func (c *BoardControls) ShouldReset(gtx layout.Context) bool
type Icon ¶
type Icon []byte
var ( ResetIcon Icon = icons.NavigationRefresh FlipIcon Icon = icons.NotificationSync BackwardIcon Icon = icons.NavigationArrowBack ForwardIcon Icon = icons.NavigationArrowForward SearchIcon Icon = icons.ActionSearch )
type IconButton ¶
type IconButton struct {
// contains filtered or unexported fields
}
func NewIconButton ¶
func (*IconButton) Layout ¶
func (b *IconButton) Layout(gtx layout.Context) layout.Dimensions
type OpeningName ¶
type OpeningName struct {
// contains filtered or unexported fields
}
func NewOpeningName ¶
func NewOpeningName(th *material.Theme) *OpeningName
func (*OpeningName) Layout ¶
func (w *OpeningName) Layout(gtx layout.Context) layout.Dimensions
func (*OpeningName) Set ¶
func (w *OpeningName) Set(name core.OpeningName)
type OptionSelector ¶
func NewOptionSelector ¶
func NewOptionSelector[Option fmt.Stringer](th *material.Theme, options []Option) *OptionSelector[Option]
func (*OptionSelector[Option]) Layout ¶
func (w *OptionSelector[Option]) Layout(gtx layout.Context) layout.Dimensions
func (*OptionSelector[Option]) Selected ¶
func (w *OptionSelector[Option]) Selected() (o Option)
type RangeSlider ¶
type RangeSlider struct {
// contains filtered or unexported fields
}
func NewRangeSlider ¶
func NewRangeSlider(th *material.Theme, hint string, min, max uint8) *RangeSlider
func (*RangeSlider) Layout ¶
func (s *RangeSlider) Layout(gtx layout.Context) layout.Dimensions
func (*RangeSlider) Selected ¶
func (s *RangeSlider) Selected() (res uint8)
func (*RangeSlider) Set ¶
func (s *RangeSlider) Set(value uint8)
type TextField ¶
type TextField struct {
// contains filtered or unexported fields
}
func NewTextField ¶
func NewTextField(th *material.Theme, hint string, options TextFieldOption) *TextField
type TextFieldOption ¶
type TextFieldOption int8
const ( ReadOnly TextFieldOption = 1 << iota SingleLine )
Click to show internal directories.
Click to hide internal directories.