Documentation ¶
Index ¶
- Variables
- func CheckAndInstallDependencies(window fyne.Window)
- func CreateMainMenu(window fyne.Window)
- func CreateSceneEditor(window fyne.Window) fyne.CanvasObject
- func NewProjectDialog(window fyne.Window)
- func OpenFromInfo(info ProjectInfo, window fyne.Window) error
- func OpenProjectDialog(window fyne.Window)
- func OpenRecentDialog(window fyne.Window)
- func SanitizeProjectName(name string) (bool, error)
- type Project
- type ProjectInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed Templates/*/* Templates embed.FS ActiveProject Project ActiveLayouts []NFLayout.Layout ActiveWidgets []NFWidget.Widget ActiveSceneGroups map[string]NFScene.Scene ActiveFunctions []NFFunction.Function // Ungrouped functions ActiveFunctionGroups map[string][]NFFunction.Function )
View Source
var MainMenuSceneTemplate = NFScene.Scene{ Name: "MainMenu", Layout: NFLayout.Layout{ Type: "VBox", Children: []NFWidget.Widget{ { Type: "Label", Properties: map[string]interface{}{ "Text": "Main Menu", }, }, { Type: "Button", Properties: map[string]interface{}{ "Text": "New Game", "Action": "NewGame", }, }, { Type: "Button", Properties: map[string]interface{}{ "Text": "Load Game", "Action": "LoadGame", }, }, { Type: "Button", Properties: map[string]interface{}{ "Text": "Settings", "Action": "Settings", }, }, { Type: "Button", Properties: map[string]interface{}{ "Text": "Quit", "Action": "Quit", }, }, }, }, Properties: nil, }
View Source
var NewGameSceneTemplate = NFScene.Scene{ Name: "NewGame", Layout: NFLayout.Layout{ Type: "VBox", }, }
Functions ¶
func CheckAndInstallDependencies ¶ added in v0.0.4
func CheckAndInstallDependencies(window fyne.Window)
func CreateMainMenu ¶
func CreateMainMenu(window fyne.Window)
func CreateSceneEditor ¶ added in v0.0.4
func CreateSceneEditor(window fyne.Window) fyne.CanvasObject
func NewProjectDialog ¶
func NewProjectDialog(window fyne.Window)
func OpenFromInfo ¶ added in v0.0.4
func OpenFromInfo(info ProjectInfo, window fyne.Window) error
func OpenProjectDialog ¶
func OpenProjectDialog(window fyne.Window)
func OpenRecentDialog ¶
func OpenRecentDialog(window fyne.Window)
func SanitizeProjectName ¶ added in v0.0.4
SanitizeProjectName sanitizes the project name to ensure it's a valid Go identifier
Types ¶
type Project ¶ added in v0.0.4
type Project struct { GameName string `json:"Game Name"` Version string `json:"Version"` Author string `json:"Author"` Credits string `json:"Credits"` }
func Deserialize ¶ added in v0.0.4
func (Project) Load ¶ added in v0.0.4
func (p Project) Load(window fyne.Window, info ...ProjectInfo) error
Load takes a deserialized project and loads it into the editor loading the scenes and functions as well
func (Project) UpdateProjectInfo ¶ added in v0.0.4
func (p Project) UpdateProjectInfo(info ProjectInfo) error
type ProjectInfo ¶ added in v0.0.4
type ProjectInfo struct { Name string `json:"Name"` Path string `json:"Path"` OpenDate time.Time `json:"Last Opened"` }
func ReadProjectInfo ¶ added in v0.0.4
func ReadProjectInfo() ([]ProjectInfo, error)
ReadProjectInfo reads the project info from the project file
Source Files ¶
Click to show internal directories.
Click to hide internal directories.