Skip to content
Browse files

Merge branch 'master' of https://github.com/wilkie/hacketyhack

  • Loading branch information...
2 parents 3fd3e9c + d6dc85d commit 0fa7eb02325b7fea25fa1c35d46cc5be622cc8c9 @steveklabnik steveklabnik committed Dec 19, 2010
Showing with 10 additions and 6 deletions.
  1. +10 −6 app/ui/editor/editor.rb
View
16 app/ui/editor/editor.rb
@@ -187,7 +187,7 @@ def @t.hit_sloppy(x, y)
if self.cursor == :arrow
self.cursor = :text
end
- if self.mouse[0] == 1
+ if self.mouse[0] == 1 and @clicked
if @t.marker.nil?
@t.marker = c
else
@@ -198,9 +198,13 @@ def @t.hit_sloppy(x, y)
self.cursor = :arrow
end
end
+ release do
+ @clicked = false
+ end
click do |_, x, y|
c = @t.hit_sloppy(x, y)
if c
+ @clicked = true
@t.marker = nil
@t.cursor = c
end
@@ -226,12 +230,12 @@ def @t.hit_sloppy(x, y)
end
end
end
- @save_to_cloud_button =
+ @save_to_cloud_button =
glossb "Upload", :width => 70, :top => 2, :left => 0 do
- hacker = Hacker.new :username => HH::PREFS['username'], :password => HH::PREFS['password']
- hacker.save_program_to_the_cloud script[:name].to_slug, @str
- alert("Uploaded!")
- end
+ hacker = Hacker.new :username => HH::PREFS['username'], :password => HH::PREFS['password']
+ hacker.save_program_to_the_cloud script[:name].to_slug, @str
+ alert("Uploaded!")
+ end
glossb "Run", :width => 52, :top => 2, :left => 130 do
eval(@str, HH.anonymous_binding)
end

0 comments on commit 0fa7eb0

Please sign in to comment.
Something went wrong with that request. Please try again.