Documentation
¶
Index ¶
- func Color(colorMode guigui.ColorMode, typ ColorType, lightnessInLightMode float64) color.Color
- func Color2(colorMode guigui.ColorMode, typ ColorType, ...) color.Color
- func DefaultActiveListItemTextColor(context *guigui.Context) color.Color
- func DefaultDisabledListItemTextColor(context *guigui.Context) color.Color
- func DefaultTextColor(context *guigui.Context) color.Color
- func DrawBlurredImage(dst *ebiten.Image, src *ebiten.Image, rate float64)
- func DrawRoundedRect(context *guigui.Context, dst *ebiten.Image, rect image.Rectangle, ...)
- func DrawRoundedRectBorder(context *guigui.Context, dst *ebiten.Image, rect image.Rectangle, ...)
- func FillBackground(dst *ebiten.Image, context *guigui.Context)
- func FontSize(context *guigui.Context) float64
- func LineHeight(context *guigui.Context) float64
- func RegisterFaceSource(faceSource *text.GoTextFaceSource, priority func(hint FaceSourceHint) float64)
- func RoundedCornerRadius(context *guigui.Context) int
- func UnitSize(context *guigui.Context) int
- type Button
- func (b *Button) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
- func (b *Button) Draw(context *guigui.Context, dst *ebiten.Image)
- func (b *Button) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (b *Button) SetOnDown(f func())
- func (b *Button) SetOnUp(f func())
- func (b *Button) SetSize(context *guigui.Context, width, height int)
- func (b *Button) Size(context *guigui.Context) (int, int)
- type ColorType
- type ContainerChildWidgetAppender
- type DragDropOverlay
- type DropdownList
- func (d *DropdownList) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (d *DropdownList) SelectedItemIndex() int
- func (d *DropdownList) SetItemsByStrings(items []string)
- func (d *DropdownList) SetOnValueChanged(f func(index int))
- func (d *DropdownList) SetSelectedItemIndex(index int)
- func (d *DropdownList) Size(context *guigui.Context) (int, int)
- type FaceSourceHint
- type FaceSourceQueryResult
- type Form
- func (f *Form) Draw(context *guigui.Context, dst *ebiten.Image)
- func (f *Form) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (f *Form) SetItems(items []*FormItem)
- func (f *Form) SetWidth(context *guigui.Context, width int)
- func (f *Form) Size(context *guigui.Context) (int, int)
- type FormItem
- type HorizontalAlign
- type Image
- type List
- func (l *List) AddItem(item ListItem, index int)
- func (l *List) Draw(context *guigui.Context, dst *ebiten.Image)
- func (l *List) HandleInput(context *guigui.Context) guigui.HandleInputResult
- func (l *List) HoveredItemIndex() int
- func (l *List) ItemAt(index int) (ListItem, bool)
- func (l *List) JumpToItemIndex(index int)
- func (l *List) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (l *List) MoveItem(from int, to int)
- func (l *List) RemoveItem(index int)
- func (l *List) ResetHeight()
- func (l *List) ResetWidth()
- func (l *List) SelectedItem() (ListItem, bool)
- func (l *List) SelectedItemIndex() int
- func (l *List) SetHeight(height int)
- func (l *List) SetItem(item ListItem, index int)
- func (l *List) SetItems(items []ListItem)
- func (l *List) SetOnItemSelected(f func(index int))
- func (l *List) SetSelectedItemIndex(index int)
- func (l *List) SetSize(width, height int)
- func (l *List) SetStyle(style ListStyle)
- func (l *List) SetWidth(width int)
- func (l *List) ShowItemBorders(show bool)
- func (l *List) Size(context *guigui.Context) (int, int)
- func (l *List) Style() ListStyle
- func (l *List) Update(context *guigui.Context) error
- type ListItem
- type ListStyle
- type Popup
- func (p *Popup) Close()
- func (p *Popup) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
- func (p *Popup) HandleInput(context *guigui.Context) guigui.HandleInputResult
- func (p *Popup) IsPopup() bool
- func (p *Popup) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (p *Popup) Open()
- func (p *Popup) SetBackgroundBlurred(blurBackground bool)
- func (p *Popup) SetCloseByClickingOutside(closeByClickingOutside bool)
- func (p *Popup) SetContent(f func(context *guigui.Context, childAppender *ContainerChildWidgetAppender))
- func (p *Popup) SetContentBounds(bounds image.Rectangle)
- func (p *Popup) Size(context *guigui.Context) (int, int)
- func (p *Popup) Update(context *guigui.Context) error
- type PopupMenu
- func (p *PopupMenu) Close()
- func (p *PopupMenu) IsPopup() bool
- func (p *PopupMenu) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (p *PopupMenu) Open(context *guigui.Context)
- func (p *PopupMenu) SelectedItem() (TextListItem, bool)
- func (p *PopupMenu) SelectedItemIndex() int
- func (p *PopupMenu) SetItemsByStrings(items []string)
- func (p *PopupMenu) SetOnClosed(f func(index int))
- func (p *PopupMenu) SetSelectedItemIndex(index int)
- type RoundedRectBorderType
- type ScrollOverlay
- func (s *ScrollOverlay) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
- func (s *ScrollOverlay) Draw(context *guigui.Context, dst *ebiten.Image)
- func (s *ScrollOverlay) HandleInput(context *guigui.Context) guigui.HandleInputResult
- func (s *ScrollOverlay) Offset() (float64, float64)
- func (s *ScrollOverlay) Reset()
- func (s *ScrollOverlay) SetContentSize(contentWidth, contentHeight int)
- func (s *ScrollOverlay) SetOffset(x, y float64)
- func (s *ScrollOverlay) SetOffsetByDelta(dx, dy float64)
- func (s *ScrollOverlay) SetOnScroll(f func(offsetX, offsetY float64))
- func (s *ScrollOverlay) Update(context *guigui.Context) error
- type ScrollablePanel
- func (s *ScrollablePanel) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (s *ScrollablePanel) SetContent(...)
- func (s *ScrollablePanel) SetPadding(paddingX, paddingY int)
- func (s *ScrollablePanel) SetSize(context *guigui.Context, width, height int)
- func (s *ScrollablePanel) Size(context *guigui.Context) (int, int)
- func (s *ScrollablePanel) Update(context *guigui.Context) error
- type Sidebar
- func (s *Sidebar) Draw(context *guigui.Context, dst *ebiten.Image)
- func (s *Sidebar) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (s *Sidebar) SetContent(context *guigui.Context, ...)
- func (s *Sidebar) SetSize(context *guigui.Context, width, height int)
- func (s *Sidebar) Size(context *guigui.Context) (int, int)
- type Text
- func (t *Text) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
- func (t *Text) Draw(context *guigui.Context, dst *ebiten.Image)
- func (t *Text) HandleInput(context *guigui.Context) guigui.HandleInputResult
- func (t *Text) IsMultiline() bool
- func (t *Text) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (t *Text) ResetSize()
- func (t *Text) SetBold(bold bool)
- func (t *Text) SetColor(color color.Color)
- func (t *Text) SetEditable(editable bool)
- func (t *Text) SetFilter(filter TextFilter)
- func (t *Text) SetHeight(height int)
- func (t *Text) SetHorizontalAlign(align HorizontalAlign)
- func (t *Text) SetLocales(locales []language.Tag)
- func (t *Text) SetMultiline(multiline bool)
- func (t *Text) SetOnEnterPressed(f func(text string))
- func (t *Text) SetOpacity(opacity float64)
- func (t *Text) SetScale(scale float64)
- func (t *Text) SetScrollable(context *guigui.Context, scrollable bool)
- func (t *Text) SetSelectable(selectable bool)
- func (t *Text) SetSize(width, height int)
- func (t *Text) SetText(text string)
- func (t *Text) SetVerticalAlign(align VerticalAlign)
- func (t *Text) SetWidth(width int)
- func (t *Text) Size(context *guigui.Context) (int, int)
- func (t *Text) Text() string
- func (t *Text) TextSize(context *guigui.Context) (int, int)
- func (t *Text) Update(context *guigui.Context) error
- type TextButton
- func (t *TextButton) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (t *TextButton) ResetWidth()
- func (t *TextButton) SetImage(image *ebiten.Image)
- func (t *TextButton) SetOnDown(f func())
- func (t *TextButton) SetOnUp(f func())
- func (t *TextButton) SetText(text string)
- func (t *TextButton) SetTextColor(clr color.Color)
- func (t *TextButton) SetWidth(width int)
- func (t *TextButton) Size(context *guigui.Context) (int, int)
- func (t *TextButton) Update(context *guigui.Context) error
- type TextField
- func (t *TextField) Draw(context *guigui.Context, dst *ebiten.Image)
- func (t *TextField) HandleInput(context *guigui.Context) guigui.HandleInputResult
- func (t *TextField) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (t *TextField) SelectAll()
- func (t *TextField) SetEditable(editable bool)
- func (t *TextField) SetHorizontalAlign(halign HorizontalAlign)
- func (t *TextField) SetMultiline(multiline bool)
- func (t *TextField) SetOnEnterPressed(f func(text string))
- func (t *TextField) SetSize(context *guigui.Context, width, height int)
- func (t *TextField) SetText(text string)
- func (t *TextField) SetVerticalAlign(valign VerticalAlign)
- func (t *TextField) Size(context *guigui.Context) (int, int)
- func (t *TextField) Text() string
- func (t *TextField) Update(context *guigui.Context) error
- type TextFilter
- type TextList
- func (t *TextList) AddItem(item TextListItem, index int)
- func (t *TextList) AppendItem(item TextListItem)
- func (t *TextList) ItemAt(index int) (TextListItem, bool)
- func (t *TextList) ItemsCount() int
- func (t *TextList) JumpToItemIndex(index int)
- func (t *TextList) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (t *TextList) MoveItem(from, to int)
- func (t *TextList) RemoveItem(index int)
- func (t *TextList) ResetHeight()
- func (t *TextList) ResetWidth()
- func (t *TextList) SelectedItem() (TextListItem, bool)
- func (t *TextList) SelectedItemIndex() int
- func (t *TextList) SetHeight(height int)
- func (t *TextList) SetItemString(str string, index int)
- func (t *TextList) SetItems(items []TextListItem)
- func (t *TextList) SetItemsByStrings(strs []string)
- func (t *TextList) SetSelectedItemIndex(index int)
- func (t *TextList) SetSize(width, height int)
- func (t *TextList) SetStyle(style ListStyle)
- func (t *TextList) SetWidth(width int)
- func (t *TextList) Size(context *guigui.Context) (int, int)
- func (t *TextList) Tag(index int) any
- func (t *TextList) Update(context *guigui.Context) error
- type TextListItem
- type ToggleButton
- func (t *ToggleButton) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
- func (t *ToggleButton) Draw(context *guigui.Context, dst *ebiten.Image)
- func (t *ToggleButton) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
- func (t *ToggleButton) SetOnValueChanged(f func(value bool))
- func (t *ToggleButton) SetValue(value bool)
- func (t *ToggleButton) Size(context *guigui.Context) (int, int)
- func (t *ToggleButton) Update(context *guigui.Context) error
- func (t *ToggleButton) Value() bool
- type VerticalAlign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawRoundedRect ¶
func DrawRoundedRectBorder ¶
func LineHeight ¶
func RegisterFaceSource ¶
func RegisterFaceSource(faceSource *text.GoTextFaceSource, priority func(hint FaceSourceHint) float64)
func RoundedCornerRadius ¶
Types ¶
type Button ¶
type Button struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*Button) CursorShape ¶
type ContainerChildWidgetAppender ¶
type ContainerChildWidgetAppender struct {
// contains filtered or unexported fields
}
func (*ContainerChildWidgetAppender) AppendChildWidget ¶
func (c *ContainerChildWidgetAppender) AppendChildWidget(widget guigui.Widget)
type DragDropOverlay ¶
type DragDropOverlay struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*DragDropOverlay) HandleInput ¶
func (d *DragDropOverlay) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*DragDropOverlay) IsDragging ¶
func (d *DragDropOverlay) IsDragging() bool
func (*DragDropOverlay) SetOnDropped ¶
func (d *DragDropOverlay) SetOnDropped(f func(object any))
func (*DragDropOverlay) Start ¶
func (d *DragDropOverlay) Start(object any)
type DropdownList ¶
type DropdownList struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*DropdownList) Layout ¶
func (d *DropdownList) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*DropdownList) SelectedItemIndex ¶
func (d *DropdownList) SelectedItemIndex() int
func (*DropdownList) SetItemsByStrings ¶
func (d *DropdownList) SetItemsByStrings(items []string)
func (*DropdownList) SetOnValueChanged ¶
func (d *DropdownList) SetOnValueChanged(f func(index int))
func (*DropdownList) SetSelectedItemIndex ¶
func (d *DropdownList) SetSelectedItemIndex(index int)
type FaceSourceHint ¶
type FaceSourceQueryResult ¶
type FaceSourceQueryResult struct {
FaceSource *text.GoTextFaceSource
Priority float64
}
type Form ¶
type Form struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
type HorizontalAlign ¶
type HorizontalAlign int
const ( HorizontalAlignStart HorizontalAlign = iota HorizontalAlignCenter HorizontalAlignEnd )
type Image ¶
type Image struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
type List ¶
type List struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*List) HandleInput ¶
func (l *List) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*List) HoveredItemIndex ¶
func (*List) JumpToItemIndex ¶
func (*List) Layout ¶
func (l *List) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*List) RemoveItem ¶
func (*List) ResetHeight ¶
func (l *List) ResetHeight()
func (*List) ResetWidth ¶
func (l *List) ResetWidth()
func (*List) SelectedItem ¶
func (*List) SelectedItemIndex ¶
func (*List) SetOnItemSelected ¶
func (*List) SetSelectedItemIndex ¶
func (*List) ShowItemBorders ¶
type Popup ¶
type Popup struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*Popup) CursorShape ¶
func (*Popup) HandleInput ¶
func (p *Popup) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*Popup) Layout ¶
func (p *Popup) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*Popup) SetBackgroundBlurred ¶
func (*Popup) SetCloseByClickingOutside ¶
func (*Popup) SetContent ¶
func (p *Popup) SetContent(f func(context *guigui.Context, childAppender *ContainerChildWidgetAppender))
func (*Popup) SetContentBounds ¶
type PopupMenu ¶
type PopupMenu struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*PopupMenu) Layout ¶
func (p *PopupMenu) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*PopupMenu) SelectedItem ¶
func (p *PopupMenu) SelectedItem() (TextListItem, bool)
func (*PopupMenu) SelectedItemIndex ¶
func (*PopupMenu) SetItemsByStrings ¶
func (*PopupMenu) SetOnClosed ¶
func (*PopupMenu) SetSelectedItemIndex ¶
type RoundedRectBorderType ¶
type RoundedRectBorderType int
const ( RoundedRectBorderTypeRegular RoundedRectBorderType = iota RoundedRectBorderTypeInset RoundedRectBorderTypeOutset )
type ScrollOverlay ¶
type ScrollOverlay struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*ScrollOverlay) CursorShape ¶
func (s *ScrollOverlay) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
func (*ScrollOverlay) Draw ¶
func (s *ScrollOverlay) Draw(context *guigui.Context, dst *ebiten.Image)
func (*ScrollOverlay) HandleInput ¶
func (s *ScrollOverlay) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*ScrollOverlay) Offset ¶
func (s *ScrollOverlay) Offset() (float64, float64)
func (*ScrollOverlay) Reset ¶
func (s *ScrollOverlay) Reset()
func (*ScrollOverlay) SetContentSize ¶
func (s *ScrollOverlay) SetContentSize(contentWidth, contentHeight int)
func (*ScrollOverlay) SetOffset ¶
func (s *ScrollOverlay) SetOffset(x, y float64)
func (*ScrollOverlay) SetOffsetByDelta ¶
func (s *ScrollOverlay) SetOffsetByDelta(dx, dy float64)
func (*ScrollOverlay) SetOnScroll ¶
func (s *ScrollOverlay) SetOnScroll(f func(offsetX, offsetY float64))
type ScrollablePanel ¶
type ScrollablePanel struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*ScrollablePanel) Layout ¶
func (s *ScrollablePanel) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*ScrollablePanel) SetContent ¶
func (s *ScrollablePanel) SetContent(f func(context *guigui.Context, childAppender *ContainerChildWidgetAppender, offsetX, offsetY float64))
func (*ScrollablePanel) SetPadding ¶
func (s *ScrollablePanel) SetPadding(paddingX, paddingY int)
type Sidebar ¶
type Sidebar struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*Sidebar) Layout ¶
func (s *Sidebar) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*Sidebar) SetContent ¶
type Text ¶
type Text struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*Text) CursorShape ¶
func (*Text) HandleInput ¶
func (t *Text) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*Text) IsMultiline ¶
func (*Text) Layout ¶
func (t *Text) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*Text) SetEditable ¶
func (*Text) SetFilter ¶
func (t *Text) SetFilter(filter TextFilter)
func (*Text) SetHorizontalAlign ¶
func (t *Text) SetHorizontalAlign(align HorizontalAlign)
func (*Text) SetLocales ¶
func (*Text) SetMultiline ¶
func (*Text) SetOnEnterPressed ¶
func (*Text) SetOpacity ¶
func (*Text) SetSelectable ¶
func (*Text) SetVerticalAlign ¶
func (t *Text) SetVerticalAlign(align VerticalAlign)
type TextButton ¶
type TextButton struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*TextButton) Layout ¶
func (t *TextButton) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*TextButton) ResetWidth ¶
func (t *TextButton) ResetWidth()
func (*TextButton) SetImage ¶
func (t *TextButton) SetImage(image *ebiten.Image)
func (*TextButton) SetOnDown ¶
func (t *TextButton) SetOnDown(f func())
func (*TextButton) SetOnUp ¶
func (t *TextButton) SetOnUp(f func())
func (*TextButton) SetText ¶
func (t *TextButton) SetText(text string)
func (*TextButton) SetTextColor ¶
func (t *TextButton) SetTextColor(clr color.Color)
func (*TextButton) SetWidth ¶
func (t *TextButton) SetWidth(width int)
type TextField ¶
type TextField struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*TextField) HandleInput ¶
func (t *TextField) HandleInput(context *guigui.Context) guigui.HandleInputResult
func (*TextField) Layout ¶
func (t *TextField) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*TextField) SetEditable ¶
func (*TextField) SetHorizontalAlign ¶
func (t *TextField) SetHorizontalAlign(halign HorizontalAlign)
func (*TextField) SetMultiline ¶
func (*TextField) SetOnEnterPressed ¶
func (*TextField) SetVerticalAlign ¶
func (t *TextField) SetVerticalAlign(valign VerticalAlign)
type TextList ¶
type TextList struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*TextList) AddItem ¶
func (t *TextList) AddItem(item TextListItem, index int)
func (*TextList) AppendItem ¶
func (t *TextList) AppendItem(item TextListItem)
func (*TextList) ItemsCount ¶
func (*TextList) JumpToItemIndex ¶
func (*TextList) Layout ¶
func (t *TextList) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*TextList) RemoveItem ¶
func (*TextList) ResetHeight ¶
func (t *TextList) ResetHeight()
func (*TextList) ResetWidth ¶
func (t *TextList) ResetWidth()
func (*TextList) SelectedItem ¶
func (t *TextList) SelectedItem() (TextListItem, bool)
func (*TextList) SelectedItemIndex ¶
func (*TextList) SetItemString ¶
func (*TextList) SetItems ¶
func (t *TextList) SetItems(items []TextListItem)
func (*TextList) SetItemsByStrings ¶
func (*TextList) SetSelectedItemIndex ¶
type TextListItem ¶
type ToggleButton ¶
type ToggleButton struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*ToggleButton) CursorShape ¶
func (t *ToggleButton) CursorShape(context *guigui.Context) (ebiten.CursorShapeType, bool)
func (*ToggleButton) Layout ¶
func (t *ToggleButton) Layout(context *guigui.Context, appender *guigui.ChildWidgetAppender)
func (*ToggleButton) SetOnValueChanged ¶
func (t *ToggleButton) SetOnValueChanged(f func(value bool))
func (*ToggleButton) SetValue ¶
func (t *ToggleButton) SetValue(value bool)
func (*ToggleButton) Value ¶
func (t *ToggleButton) Value() bool
type VerticalAlign ¶
type VerticalAlign int
const ( VerticalAlignTop VerticalAlign = iota VerticalAlignMiddle VerticalAlignBottom )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.