Module: Shoes::BuiltinMethods

Includes:
Color::DSLHelpers
Included in:
Shoes, App
Defined in:
shoes-core/lib/shoes/builtin_methods.rb

Instance Method Summary collapse

Methods included from Color::DSLHelpers

#color, #gradient, #gray, #pattern, #rgb

Methods included from Common::ImageHandling

#absolute_file_path, #default_search_paths, #search_for

Instance Method Details

#alert(message = '') ⇒ Object



14
15
16
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 14

def alert(message = '')
  Shoes::Dialog.new.alert message
end

#ask(msg, args = {}) ⇒ Object



46
47
48
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 46

def ask(msg, args = {})
  Shoes::Dialog.new.ask msg, args
end

#ask_color(title = 'Pick a color...') ⇒ Object



50
51
52
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 50

def ask_color(title = 'Pick a color...')
  Shoes::Dialog.new.ask_color title
end

#ask_open_fileObject



30
31
32
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 30

def ask_open_file
  Shoes::Dialog.new.dialog_chooser 'Open File...'
end

#ask_open_folderObject



38
39
40
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 38

def ask_open_folder
  Shoes::Dialog.new.dialog_chooser 'Open Folder...', :folder
end

#ask_save_fileObject



34
35
36
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 34

def ask_save_file
  Shoes::Dialog.new.dialog_chooser 'Save File...', false, :save
end

#ask_save_folderObject



42
43
44
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 42

def ask_save_folder
  Shoes::Dialog.new.dialog_chooser 'Save Folder...', :folder, :save
end

#confirm(message = '') ⇒ Object Also known as: confirm?



18
19
20
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 18

def confirm(message = '')
  Shoes::Dialog.new.confirm(message)
end

#font(path = DEFAULT_TEXTBLOCK_FONT) ⇒ Object



54
55
56
# File 'shoes-core/lib/shoes/builtin_methods.rb', line 54

def font(path = DEFAULT_TEXTBLOCK_FONT)
  Shoes::Font.add_font(path)
end