lib/ppcurses/actions/BaseAction.rb in ppcurses-0.0.21 vs lib/ppcurses/actions/BaseAction.rb in ppcurses-0.0.22
- old
+ new
@@ -7,35 +7,35 @@
def set_window(win)
@win = win
end
def x_padding
- self.win_padding()
+ self.win_padding
end
def win_padding
2
end
def win_width
- Curses.cols - win_padding()
+ Curses.cols - win_padding
end
def win_height
- Curses.lines - win_padding()
+ Curses.lines - win_padding
end
def create_window
- @win = Window.new( win_height(), win_width(),
- win_padding()/2, win_padding()/2)
+ @win = Window.new( self.win_height, self.win_width,
+ self.win_padding/2, self.win_padding/2)
@win.clear
@win.box('|', '-')
- @win.setpos(@win.cury()+1, x_padding() )
+ @win.setpos(@win.cury+1, self.x_padding )
end
def show
if @win.nil?
- self.create_window()
+ self.create_window
end
@win.refresh
end