Sha256: cbe5b91bb69959d6208d4e9a293900ca89563fd80d56293400c20850d2b111f7

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

# frozen_string_literal: true

Shoes.app width: 300, height: 150, margin: 10 do
  def answer(v)
    @answer.replace v.inspect
  end

  button "Alert" do
    alert 'Just a simple alert'
  end
  button "Ask" do
    answer ask("What is your name?")
  end
  button "Confirm" do
    answer confirm("Would you like to proceed?")
  end
  button "Open File..." do
    answer ask_open_file
  end
  button "Save File..." do
    answer ask_save_file
  end
  button "Open Folder..." do
    answer ask_open_folder
  end
  button "Save Folder..." do
    answer ask_save_folder
  end
  button "Color" do
    answer ask_color("Pick a Color")
  end

  @answer = para "Answers appear here"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.rc1 samples/simple_dialogs.rb