diff options
| author | Jeff Carr <[email protected]> | 2021-10-31 23:48:34 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-31 23:48:34 -0500 |
| commit | f5440782630ef7dd2b19a8b04df260a9a87cbba8 (patch) | |
| tree | 5f9aad72a8ad729f2e0d7d714dff7459470aa3fc /structs.go | |
| parent | 2a6c54b785ccb7e18b586f38c73ca57197b4c733 (diff) | |
CLEAN: remove GuiButton struct
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -38,7 +38,7 @@ type GuiConfig struct { type GuiData struct { // a fallback default function to handle mouse events // if nothing else is defined to handle them - MouseClick func(*GuiButton) + MouseClick func(*Node) // A map of all the entry boxes AllEntries []*GuiEntry @@ -55,16 +55,19 @@ type GuiData struct { // // This has to work this way because of how // andlabs/ui & andlabs/libui work - AllButtons []*GuiButton - buttonMap map[*ui.Button]*GuiButton + // AllButtons []*GuiButton + // buttonMap map[*ui.Button]*GuiButton } +/* type GuiTab struct { Name string // field for human readable name Number int // the andlabs/ui tab index // Window *GuiWindow // the parent Window } +*/ +/* // Note: every mouse click is handled // as a 'Button' regardless of where // the user clicks it. You could probably @@ -82,6 +85,7 @@ type GuiButton struct { FB *ui.FontButton CB *ui.ColorButton } +*/ // text entry fields type GuiEntry struct { @@ -90,7 +94,8 @@ type GuiEntry struct { Last string // the last value Normalize func(string) string // function to 'normalize' the data - B *GuiButton + // B *GuiButton + N *Node // andlabs/ui abstraction mapping UiEntry *ui.Entry @@ -102,7 +107,8 @@ type GuiEntry struct { // AREA STRUCTURES START // type GuiArea struct { - Button *GuiButton // what button handles mouse events + // Button *GuiButton // what button handles mouse events + N *Node // what button handles mouse events UiAttrstr *ui.AttributedString UiArea *ui.Area @@ -167,7 +173,8 @@ type HumanCellData struct { TextID int Color color.RGBA ColorID int - Button *GuiButton + // Button *GuiButton + N *Node } type HumanMap struct { |
