Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Shoes app to make x.y coord for each seat
- Loading branch information
Alexandre Girard
committed
Jan 6, 2009
1 parent
b59f413
commit be8cd14
Showing
4 changed files
with
612 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
seat_file = "/Users/alx/dev/politimap/seat_map/seatmap.txt" | ||
|
||
Shoes.app :title => "Seat Map" , :width => 459 do | ||
|
||
current = 642 | ||
last_log="" | ||
|
||
image("seat_map.jpg") | ||
|
||
@p = para | ||
animate do | ||
button, left, top = self.mouse | ||
@p.replace "mouse: #{button}, #{left}, #{top}\ncurrent seat: #{current}\nlast log: #{last_log}" | ||
end | ||
|
||
click do |button, x, y| | ||
# Do not log if superior at seats height | ||
if y < 260 | ||
last_log = "#{current}, #{x}, #{y}" | ||
File.open(seat_file, 'a') do |f| | ||
f.puts "#{last_log}\n" | ||
end | ||
end | ||
|
||
# Update in all case, allow to pass missing numbers by clicking in grey area | ||
current += 1 | ||
end | ||
|
||
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.