Documentation ¶
Index ¶
- func BeginTableWithEnd(label string, columns int, body func())
- func DragFloat2(label string, label1 string, v1 *float64, label2 string, v2 *float64) (ret bool)
- func DragFloat3(label string, label1 string, v1 *float64, label2 string, v2 *float64, ...) (ret bool)
- func DragFloat64(label string, v *float64) bool
- func DrawList[T ListNode](id string, list []T, handler ListNodeActionHandler)
- func DrawListWithFilter[T ListNode](id string, list []T, passFilter func(item T) bool, ...)
- func DrawTree(root TreeNode, handler TreeNodeActionHandler)
- func InputText(label string, text *string) bool
- func Text(format string, args ...any)
- func TreeNodeIsDescendantOf(parent TreeNode, target TreeNode) bool
- func TreeNodeWithPop(label string, flags imgui.TreeNodeFlags, body func())
- func WalkTree(root TreeNode, context any, callback func(node TreeNode, context any))
- func WithDisabled(applyDisable bool, body func())
- func WithID(value reflect.Value, body func())
- func WithIDPtr[T any](ptr *T, body func())
- func WithItemWidth(width float32, body func())
- type AutoComplete
- type FilteredList
- type ListNode
- type ListNodeActionHandler
- type ListNodeSelected
- type Menu
- type MenuItem
- type SelectAssetModal
- func (s *SelectAssetModal) Clicked(node ListNode, index int)
- func (s *SelectAssetModal) DoubleClicked(node ListNode, index int)
- func (s *SelectAssetModal) Draw() bool
- func (s *SelectAssetModal) DrawWithExtraHeaderUI(headerHook func()) bool
- func (s *SelectAssetModal) Open()
- func (s *SelectAssetModal) SelectedPath() string
- type SelectParentModal
- type TreeDragContext
- type TreeDropFlag
- type TreeNode
- type TreeNodeActionHandler
- type TreeNodeDragDropHandler
- type TreeNodeSelected
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginTableWithEnd ¶
func DragFloat2 ¶
func DragFloat3 ¶
func DragFloat64 ¶
func DrawList ¶
func DrawList[T ListNode](id string, list []T, handler ListNodeActionHandler)
func DrawListWithFilter ¶
func DrawListWithFilter[T ListNode](id string, list []T, passFilter func(item T) bool, handler ListNodeActionHandler)
func DrawTree ¶
func DrawTree(root TreeNode, handler TreeNodeActionHandler)
func TreeNodeIsDescendantOf ¶
func TreeNodeWithPop ¶
func TreeNodeWithPop(label string, flags imgui.TreeNodeFlags, body func())
func WithDisabled ¶
func WithDisabled(applyDisable bool, body func())
func WithID ¶
WithID is used to prevent two inputs from being treated as the same input within imgui. Essentially, you should use this whenever you need to edit a reflect.Value
func WithItemWidth ¶
func WithItemWidth(width float32, body func())
Types ¶
type AutoComplete ¶
type AutoComplete struct {
// contains filtered or unexported fields
}
func (*AutoComplete) InputText ¶
func (a *AutoComplete) InputText(label string, s *string, onActivated func() []string) bool
func (*AutoComplete) SetItems ¶
func (a *AutoComplete) SetItems(items []string)
type FilteredList ¶
type FilteredList[T ListNode] struct { List []T // contains filtered or unexported fields }
func (*FilteredList[T]) Draw ¶
func (f *FilteredList[T]) Draw(label string, handler ListNodeActionHandler)
type ListNodeActionHandler ¶
type ListNodeSelected ¶
type ListNodeSelected interface {
Selected() bool
}
type SelectAssetModal ¶
type SelectAssetModal struct { Title string Type reflect.Type // contains filtered or unexported fields }
func (*SelectAssetModal) Clicked ¶
func (s *SelectAssetModal) Clicked(node ListNode, index int)
func (*SelectAssetModal) DoubleClicked ¶
func (s *SelectAssetModal) DoubleClicked(node ListNode, index int)
func (*SelectAssetModal) Draw ¶
func (s *SelectAssetModal) Draw() bool
func (*SelectAssetModal) DrawWithExtraHeaderUI ¶
func (s *SelectAssetModal) DrawWithExtraHeaderUI(headerHook func()) bool
func (*SelectAssetModal) Open ¶
func (s *SelectAssetModal) Open()
func (*SelectAssetModal) SelectedPath ¶
func (s *SelectAssetModal) SelectedPath() string
type SelectParentModal ¶
type SelectParentModal struct {
// contains filtered or unexported fields
}
func NewSelectParentModel ¶
func NewSelectParentModel(targetPath asset.Path, target asset.Asset) *SelectParentModal
func (*SelectParentModal) Draw ¶
func (s *SelectParentModal) Draw() bool
func (*SelectParentModal) Open ¶
func (s *SelectParentModal) Open()
type TreeDragContext ¶
type TreeDragContext struct {
// contains filtered or unexported fields
}
type TreeDropFlag ¶
type TreeDropFlag int
const ( NotDropped TreeDropFlag = iota DroppedOnNode DroppedBeforeNode DroppedAfterNode )
type TreeNodeActionHandler ¶
type TreeNodeActionHandler interface {
Clicked(node TreeNode)
}
type TreeNodeDragDropHandler ¶
type TreeNodeDragDropHandler interface { // Context must be stored by the client Context() *TreeDragContext DragSource(node TreeNode) DragTarget(node TreeNode, dropFlag TreeDropFlag) }
TreeNodeDragDropHandler is an extended interface that can be used by clients that wish to respond to drag/drop events
type TreeNodeSelected ¶
type TreeNodeSelected interface {
Selected() bool
}
TreeNodeSelected is an extended interface from the basic TreeNode interface Nodes must implement this interface if they wish to be selectable
Click to show internal directories.
Click to hide internal directories.