Last active
February 16, 2024 02:16
-
-
Save amirrajan/b8ae512f9363417229234c4e71db3b90 to your computer and use it in GitHub Desktop.
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
# ./dragonruby mygame --eval bootstrap.rb | |
class GTK::Console | |
def eval_the_set_command | |
cmd = current_input_str.strip | |
if cmd == "1" | |
puts "hi" | |
prompt.clear | |
return | |
elsif cmd == "2" | |
$gtk.request_quit | |
prompt.clear | |
return | |
else | |
super | |
end | |
end | |
end | |
def tick args | |
if args.state.tick_count == 0 | |
$gtk.console.show | |
puts "What would you like to do?" | |
puts "1. Say hi" | |
puts "2. exit" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment