Skip to content

Commit

Permalink
Notice to point people at the tour
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Dec 19, 2010
1 parent 8dd9fd6 commit adc4300
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions app/ui/mainwindow.rb
Expand Up @@ -7,10 +7,10 @@ module HH::App
# returns only once the lesson gets closed
include HH::Markup
def start_lessons name, blk
@main_content.style(:width => -400)
@lesson_stack.show
l = HH::LessonSet.new(name, blk).execute_in @lesson_stack
l.on_event :close do hide_lesson end
@main_content.style(:width => -400)
@lesson_stack.show
l = HH::LessonSet.new(name, blk).execute_in @lesson_stack
l.on_event :close do hide_lesson end
end

def hide_lesson
Expand Down Expand Up @@ -97,11 +97,34 @@ def finalization
end
addtab :Prefs, :hover => "Preferences", :icon => "tab-properties.png",
:position => :bottom

opentab :Home

@tour_notice =
stack :top => 46, :left => 22, :width => 250, :height => 54, :hidden => true do
fill black(0.6)
nostroke
shape 0, 20 do
line_to 23.6, 0
line_to 23.6, 10
line_to 0, 0
end
background black(0.6), :curve => 6, :left => 24, :width => 215
para "Check out the Hackety Hack Tour to get started!",
:stroke => "#FFF", :margin => 6, :size => 11, :margin_left => 22,
:align => "center"
end


# splash screen
stack :top => 0, :left => 0, :width => 1.0, :height => 1.0 do
splash
if HH::PREFS['first_run'].nil?
@tour_notice.toggle
@tour_notice.click { @tour_notice.hide }
HH::PREFS['first_run'] = true
HH::save_prefs
end
end


end

0 comments on commit adc4300

Please sign in to comment.