Support OpenDialog

This commit is contained in:
Lea Anthony
2020-09-26 16:08:55 +10:00
parent bed5619d4e
commit 9b0f58ddf5
6 changed files with 15 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ import (
type Dialog interface {
SaveFile(params ...string) string
SelectFile(params ...string) string
SelectDirectory(params ...string) []string
OpenDialog(params ...string) []string
}
// dialog exposes the Dialog interface
@@ -107,8 +107,8 @@ func (r *dialog) SaveFile(params ...string) string {
return result.Data().(string)
}
// SelectDirectory prompts the user to select a file
func (r *dialog) SelectDirectory(params ...string) []string {
// OpenDialog prompts the user to select a file
func (r *dialog) OpenDialog(params ...string) []string {
// Extract title + filter
title, filter := r.processTitleAndFilter(params...)