Changeset 424

Show
Ignore:
Timestamp:
02/13/2008 10:30:15 (7 months ago)
Author:
why
Message:
  • lib/shoes.rb: very basic .shy making. (use: shoes --shy directory)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/shoes.rb

    r417 r424  
    3838  ShyMake = proc do |s| 
    3939    proc do 
    40       stack :margin => 10 do 
     40      stack do 
    4141        background rgb(240, 240, 150) 
    42         title "ShyMaker" 
    43         smalltitle "for Shoes #{Shoes::VERSION}" 
     42        stack :margin => 10 do 
     43          subtitle "ShyMaker", :margin => 0 
     44          tagline "for Shoes #{Shoes::VERSION}" 
     45        end 
    4446      end 
    4547      stack do 
    46         progress = 
    47           stack :margin => 20 do 
     48        @done = 
     49          stack :margin => 20, :hidden => true do 
     50            para "Your .shy is fully baked." 
     51          end 
     52        @make = 
     53          stack :margin => 20, :hidden => true do 
    4854            para "Making the Shy" 
    49             progress 
     55            @prog = progress 
    5056          end 
    51         progress.hide 
    5257        info = 
    5358          stack :margin => 10 do 
    5459            stack :margin => 10 do 
    5560              para "Application name" 
    56               edit_line 
     61              @shy_name = edit_line 
    5762            end 
    5863            stack :margin => 10 do 
    5964              para "Creator" 
    60               edit_line 
     65              @shy_creator = edit_line 
    6166            end 
    6267            stack :margin => 10 do 
    6368              para "Version" 
    64               edit_line 
     69              @shy_version = edit_line 
    6570            end 
    6671            stack :margin => 10 do 
    6772              para "Launch" 
    68               list_box :items => Shy.launchable(s) 
     73              @shy_launch = list_box :items => Shy.launchable(s) 
    6974            end 
    7075            stack :margin => 10 do 
    7176              button "Ready" do 
     77                shy_save = ask_save_file 
     78 
    7279                info.hide 
    73                 progress.show 
     80                @make.show 
     81 
     82                shy = Shy.new 
     83                shy.name = @shy_name.text 
     84                shy.creator = @shy_creator.text 
     85                shy.version = @shy_version.text 
     86                shy.launch =  @shy_launch.text 
     87 
     88                Thread.start do 
     89                  Shy.c(shy_save, shy, s) 
     90                  @make.hide 
     91                  @done.show 
     92                end 
    7493              end 
    7594            end