Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 26, 2016 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3054f88e1afe96529a925dcb3f3dec73 to your computer and use it in GitHub Desktop.
Save anonymous/3054f88e1afe96529a925dcb3f3dec73 to your computer and use it in GitHub Desktop.
require 'newt'
Newt::Screen.new
Newt::Screen.open_window(1,1,80,40,"Heater")
l_kessel = Newt::Label.new(1,6,"Temperature:")
b_exit = Newt::CompactButton.new(20,1,"Exit")
f = Newt::Form.new
f.add(l_kessel,b_exit)
begin
answer = f.run
if answer == b_exit
#exit
end
end while answer == nil
Newt::Screen.pop_window()
Newt::Screen.finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment