component

package
v0.0.0-...-c4d1fa4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigGroup

type ConfigGroup struct {
	Name    string       `json:"name"`
	Display string       `json:"display"`
	Items   []ConfigItem `json:"items"`
}

type ConfigItem

type ConfigItem struct {
	Key          string   `json:"key"`
	Display      string   `json:"display"`
	DefaultIndex int      `json:"index"`
	Index        *int     `json:"-"`
	Options      []string `json:"options"`
	OptsDisplay  []string `json:"opts-display"`
}

type Confirm

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

func (Confirm) GetAns

func (c Confirm) GetAns() bool

func (Confirm) Init

func (c Confirm) Init() tea.Cmd

func (Confirm) Update

func (c Confirm) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Confirm) View

func (c Confirm) View() string

type IniEditor

type IniEditor struct {
	IniGroups []IniGroup
	// contains filtered or unexported fields
}

func NewIniEditor

func NewIniEditor(filePath, title string) (*IniEditor, error)

func (*IniEditor) Init

func (ie *IniEditor) Init() tea.Cmd

func (*IniEditor) Update

func (ie *IniEditor) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*IniEditor) View

func (ie *IniEditor) View() string

type IniGroup

type IniGroup struct {
	Name  string    `json:"name"`
	Items []IniItem `json:"items"`
}

type IniItem

type IniItem struct {
	Key        string   `json:"key"`
	Value      string   `json:"value"`
	Type       string   `json:"input-type"`
	Validation string   `json:"validation"`
	Options    []string `json:"options"`
	// contains filtered or unexported fields
}

type WorldEditor

type WorldEditor struct {
	ConfigGroups []ConfigGroup
	// contains filtered or unexported fields
}

func NewWorldEditor

func NewWorldEditor(filePath string, isForest, isGen bool) (*WorldEditor, error)

func (*WorldEditor) Init

func (we *WorldEditor) Init() tea.Cmd

func (*WorldEditor) Update

func (we *WorldEditor) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*WorldEditor) View

func (we *WorldEditor) View() string

Jump to

Keyboard shortcuts

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