Image viewer demo
From Rubygame
(Copied from samples/image_viewer.rb) |
(Small changes to sync with the final version of the demo in 2.6) |
||
Line 37: | Line 37: | ||
# Decide which image file to load. | # Decide which image file to load. | ||
this_dir = File.dirname( __FILE__ ) | this_dir = File.dirname( __FILE__ ) | ||
- | file = File.expand_path( " | + | file = File.expand_path( "rubygame.png", this_dir ) # default file |
if ARGV[0] | if ARGV[0] | ||
file = File.expand_path( ARGV[0], this_dir ) | file = File.expand_path( ARGV[0], this_dir ) | ||
else | else | ||
- | puts "You can pass an image to this | + | puts "You can pass an image to this script to load it." |
end | end | ||