]> git.immae.eu Git - perso/Immae/Projets/Ruby/Monitor.git/blobdiff - windows.rb
Customization of window size
[perso/Immae/Projets/Ruby/Monitor.git] / windows.rb
index 96a45b94d6c81a3adaf8d6944ce36a45e7b669dc..5d195dd3edaa49be7d62d6ef5f7b6939a899ca3a 100644 (file)
@@ -52,9 +52,9 @@ end
 
 
 class List_Win
-  def initialize(sections)
+  def initialize(sections, size)
     @params = sections
-    @win = Ncurses::WINDOW.new(0, Ncurses.COLS()/4, 0, 0)
+    @win = Ncurses::WINDOW.new(0, size*Ncurses.COLS()/100, 0, 0)
     @win.border(*([0]*8))
     @win.keypad(true)
     @win.timeout(1000)