Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Starting color of the progress bar ProgressStart = lipgloss.Color("#1B6B93") // Ending color of the progress bar ProgressEnd = lipgloss.Color("#A2FF86") )
View Source
const ( Recipes = iota ChangeSettings ChangeRecipe Amount Crafter )
Indices for Models slice
View Source
const MaxNameLength = 25
Max length of the recipe name
View Source
const StatusMsgLifetime = 10 * time.Second
Variables ¶
Functions ¶
func ConvertItemsToRecipes ¶
ConvertItemsToRecipes takes a slice of Item structs and returns a slice of utils.Recipe structs
func NewItemDelegate ¶
func NewItemDelegate() list.ItemDelegate
Types ¶
type Input ¶
type Item ¶
type Item struct { // Name of recipe Name string // Food hotkey Food string // Duration of food FoodDuration int // Potion hotkey Potion string // Macro 1 hotkey Macro1 string // Duration of macro 1 Macro1Duration int // Macro 2 hotkey Macro2 string // Duration of macro 2 Macro2Duration int // Macro 3 hotkey Macro3 string // Duration of macro 3 Macro3Duration int }
func ConvertListItemToItem ¶
ConvertListItemToItem takes in a list.Item slice and converts it into an Item slice
func (Item) Description ¶
func (Item) FilterValue ¶
func (Item) PrintItemDetails ¶
PrintItemDetails returns a stylized string with details of the Item struct
type List ¶
type Progress ¶
type UpdateRecipe ¶
type UpdateRecipe struct { NameModel textinput.Model FoodModel textinput.Model FoodDurationModel textinput.Model PotionModel textinput.Model Macro1Model textinput.Model Macro1DurationModel textinput.Model Macro2Model textinput.Model Macro2DurationModel textinput.Model Macro3Model textinput.Model Macro3DurationModel textinput.Model // Help model Help help.Model // Status message Msg string // contains filtered or unexported fields }
func NewUpdateRecipe ¶
func NewUpdateRecipe() *UpdateRecipe
NewUpdateRecipe returns a pointer to an UpdateRecipe struct
func (*UpdateRecipe) AddPlaceholders ¶
func (m *UpdateRecipe) AddPlaceholders(item Item)
AddPlaceholders updates the textinput.Model Placeholder fields to show the value from Item
func (UpdateRecipe) Init ¶
func (m UpdateRecipe) Init() tea.Cmd
func (UpdateRecipe) View ¶
func (m UpdateRecipe) View() string
type UpdateSettings ¶
type UpdateSettings struct { StartPauseModel textinput.Model StopModel textinput.Model ConfirmModel textinput.Model CancelModel textinput.Model // Help model Help help.Model // Status message Msg string // contains filtered or unexported fields }
func NewUpdateSettings ¶
func NewUpdateSettings() *UpdateSettings
NewUpdateSettings returns a pointer to an UpdateSettings struct
func (*UpdateSettings) AddPlaceholders ¶
func (m *UpdateSettings) AddPlaceholders(settings Settings)
AddPlaceholders updates the textinput.Model Placeholder fields to show the value from Item
func (UpdateSettings) Init ¶
func (m UpdateSettings) Init() tea.Cmd
func (UpdateSettings) View ¶
func (m UpdateSettings) View() string
Click to show internal directories.
Click to hide internal directories.