mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/curses/curses.c: Update Curses::Window example for nicer output
Patch by Michal Suchanek [Bug #8121] [ruby-core:53520] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e781aeef96
commit
7e70b8ac52
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Apr 28 08:28:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* ext/curses/curses.c: Update Curses::Window example for nicer output
|
||||
Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]
|
||||
|
||||
Sun Apr 28 08:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]
|
||||
|
|
|
@ -2814,10 +2814,14 @@ Init_curses(void)
|
|||
* Curses.init_screen()
|
||||
*
|
||||
* my_str = "LOOK! PONIES!"
|
||||
* win = Curses::Window.new( 8, (my_str.length + 10),
|
||||
* (Curses.lines - 8) / 2,
|
||||
* bwin = Curses::Window.new( 10, (my_str.length + 10),
|
||||
* (Curses.lines - 10) / 2,
|
||||
* (Curses.cols - (my_str.length + 10)) / 2 )
|
||||
* win.box("|", "-")
|
||||
* bwin.box("\\", "/")
|
||||
* bwin.refresh
|
||||
* win = bwin.subwin( 6, my_str.length + 6,
|
||||
* (Curses.lines - 6) / 2,
|
||||
* (Curses.cols - (my_str.length + 6)) / 2 )
|
||||
* win.setpos(2,3)
|
||||
* win.addstr(my_str)
|
||||
* # or even
|
||||
|
|
Loading…
Add table
Reference in a new issue