Skip to content

Instantly share code, notes, and snippets.

Created August 26, 2016 18:23
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/a610aebf99f36234b88592c3a0a0ea4c to your computer and use it in GitHub Desktop.
Save anonymous/a610aebf99f36234b88592c3a0a0ea4c to your computer and use it in GitHub Desktop.
require 'newt'
Newt::Screen.new
Newt::Screen.open_window(1,1,80,40,"Heizung")
b_test = Newt::CompactButton.new(1,1,"Reload")
l_kessel = Newt::Label.new(1,6,"Kessel:")
l_kessel_wert = Newt::Label.new(20,6,"")
b_volllast_aus = Newt::CompactButton.new(20,1,"Exit")
f = Newt::Form.new
f.add(b_test,l_kessel,l_kessel_wert,b_volllast_aus)
begin
answer = f.run
if answer == b_test
l_kessel_wert.set_text("#{Time.now}")
Newt::Screen.refresh
answer = nil
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