hswidget

package
v0.0.0-...-667d129 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package hswidget contains a generic editor widget implementation, along with with concrete editor implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCheckboxFromByte

func MakeCheckboxFromByte(id string, value *byte) *giu.CheckboxWidget

MakeCheckboxFromByte creates a checkbox using a byte as input/output

func MakeImageButton

func MakeImageButton(id string, w, h int, t *giu.Texture, fn func()) giu.Widget

MakeImageButton is a hack for giu.ImageButton that creates image button as a giu.child

func MakeInputInt

func MakeInputInt(id string, width int32, output interface{}, optionalCB func()) *giu.InputIntWidget

MakeInputInt creates input intager using POINTER given additionally, for byte checks, if value smaller than 255

func OnDoubleClick

func OnDoubleClick(cb func()) giu.Widget

OnDoubleClick detects if item is double-clicked this can be used as an alternative to OnClick methos of some widgets e.g.:

giu.Layout{
	giu.Button("double click me"),
	OnDoubleClick(func() { fmt.Println("I was double-clicked") }),
}

func SetByteToInt

func SetByteToInt(input int32, output *byte)

SetByteToInt sets byte given to intager if intager > max possible byte size, sets to 255

Types

type PlayPauseButtonWidget

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

PlayPauseButtonWidget represents a play/pause button

func PlayPauseButton

func PlayPauseButton(id string, isPlaying *bool, tl hscommon.TextureLoader) *PlayPauseButtonWidget

PlayPauseButton creates a play/pause button

func (*PlayPauseButtonWidget) Build

func (p *PlayPauseButtonWidget) Build()

Build build a widget

func (*PlayPauseButtonWidget) OnChange

func (p *PlayPauseButtonWidget) OnChange(cb func()) *PlayPauseButtonWidget

OnChange sets onChange callback (called the user click on any button)

func (*PlayPauseButtonWidget) OnPauseClicked

func (p *PlayPauseButtonWidget) OnPauseClicked(cb func()) *PlayPauseButtonWidget

OnPauseClicked sets onPauseClicked callback (called when the user clicks on pause button)

func (*PlayPauseButtonWidget) OnPlayClicked

func (p *PlayPauseButtonWidget) OnPlayClicked(cb func()) *PlayPauseButtonWidget

OnPlayClicked sets onPlayClicked callback (called when the user clicks on play button)

func (*PlayPauseButtonWidget) Size

Size sets button's size

type PopUpConfirmDialog

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

PopUpConfirmDialog represents a pop up dialog

func NewPopUpConfirmDialog

func NewPopUpConfirmDialog(id, header, message string, yCB, nCB func()) *PopUpConfirmDialog

NewPopUpConfirmDialog creates a new pop up dialog (with yes-no options)

func (*PopUpConfirmDialog) Build

func (p *PopUpConfirmDialog) Build()

Build builds a pop up dialog

Directories

Path Synopsis
Package animdatawidget provides data necessary for viewing and editing d2animdata.AnimationData structure
Package animdatawidget provides data necessary for viewing and editing d2animdata.AnimationData structure
Package cofwidget provides a giu.Widget implementation for viewing and editing the COF data structure.
Package cofwidget provides a giu.Widget implementation for viewing and editing the COF data structure.
Package dc6widget provides a giu.Widget implementation for viewing and editing the DC6 data structure.
Package dc6widget provides a giu.Widget implementation for viewing and editing the DC6 data structure.
Package dccwidget contains stuff responsible for viewing and editing the DCC data structure
Package dccwidget contains stuff responsible for viewing and editing the DCC data structure
Package ds1widget provides a giu.Widget for viewing and editing the DS1 data structure.
Package ds1widget provides a giu.Widget for viewing and editing the DS1 data structure.
Package dt1widget contains a giu widget implementation for viewing and editing the dt1 data structure
Package dt1widget contains a giu widget implementation for viewing and editing the dt1 data structure
tiletypeimage
Package tiletypeimage provides tile type image builder used for building a small previews of tiles.
Package tiletypeimage provides tile type image builder used for building a small previews of tiles.
Package fonttablewidget contains a giu widget implementation for viewing and editing the font table (tbl) data structure.
Package fonttablewidget contains a giu widget implementation for viewing and editing the font table (tbl) data structure.
Package palettegrideditorwidget provides a giu widget implementation of a palette editor, for viewing and editing a palette.
Package palettegrideditorwidget provides a giu widget implementation of a palette editor, for viewing and editing a palette.
Package palettegridwidget provides data for viewing and editing 256-colors palettes
Package palettegridwidget provides data for viewing and editing 256-colors palettes
Package palettemapwidget provides a giu widget implementation of an editor for the PL2 palette transform data structure.
Package palettemapwidget provides a giu widget implementation of an editor for the PL2 palette transform data structure.
Package selectpalettewidget contains palette select widget used in dcc, dc6 and dt1 editors
Package selectpalettewidget contains palette select widget used in dcc, dc6 and dt1 editors
Package stringtablewidget provides methods for editing and viewing TextDictionary (map[string]string) used in string tables
Package stringtablewidget provides methods for editing and viewing TextDictionary (map[string]string) used in string tables

Jump to

Keyboard shortcuts

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