curses-extension 2.1 → 2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a272233095a365552a978ea26953df75a91f985ca30a9765f7191338ffc5468
4
- data.tar.gz: 6b807771cb90a3bc5bdbec098f01ec31414f55bfdb982cdf88cf3b0b62f33ca2
3
+ metadata.gz: '04280f3b09961bca34f139e055228c7206b28dcae370c22ae0417dca8fbb5fc2'
4
+ data.tar.gz: 063e86ad7733dd4c5ee83664a59a3a3dbf59e45bdfda09a8efc1bc4e09cfd392
5
5
  SHA512:
6
- metadata.gz: 5fa593f92f9cdbb0774350fb4fa2c956f9be7435021c52559770fe2c3c35bb7753d25f35b69e7b192818f3ae795be7705374c3c02e1714f14573d75c1b079ae9
7
- data.tar.gz: 445fcf7a916887d489d16835044513c8ad76664bfa9ed7163663a9edb12ca307806b671b7e76f4d847da53613f27e1563fdda69ff62e25d772ea2cde5436463f
6
+ metadata.gz: 65c963c468c4b9101e59f9208815b58bb4d9f7bb07c34298aa1628a3f783de61cf9de186bed60f6b0246bd1f20be7eb9d4bfbb7cede62e7952e33fa17aa6f1bf
7
+ data.tar.gz: c80f69f856b9a4faacdabf5a3bc8b8f69293b463f1b6f9b308319b98146d7ba6a0516387bb2e65cec4a121bfc96d2b06682851b1fb2b84ef293994e49e170198
@@ -75,6 +75,11 @@ class Curses::Window # CLASS EXTENSION
75
75
  self.attron(color_pair(cp) | attr) { self << text }
76
76
  self.refresh
77
77
  end
78
+ def nl(bg = self.bg)
79
+ bg = 232 if bg == nil
80
+ f = " " * (self.maxx - self.curx)
81
+ self.p(self.fg, bg, self.attr, f)
82
+ end
78
83
  def pclr(fg = self.fg, bg = self.bg, attr = self.attr, text) # Puts text to window with full set of attributes and clears rest of window
79
84
  self.p(fg, bg, attr, text)
80
85
  self.clr_from_cur_line
@@ -103,10 +103,15 @@ class Curses::Window # CLASS EXTENSION
103
103
  fg = 255 if fg == nil
104
104
  bg = 0 if bg == nil
105
105
  attr = 0 if attr == nil
106
- cp = Curses::Window.pair(fg, bg)
106
+ cp = Curses::Window.pair(fg, bg)
107
107
  self.attron(color_pair(cp) | attr) { self << text }
108
108
  self.refresh
109
109
  end
110
+ def nl(bg = self.bg)
111
+ bg = 232 if bg == nil
112
+ f = " " * (self.maxx - self.curx)
113
+ self.p(self.fg, bg, self.attr, f)
114
+ end
110
115
  def pclr(fg = self.fg, bg = self.bg, attr = self.attr, text) # Puts text to window with full set of attributes and clears rest of window
111
116
  self.p(fg, bg, attr, text)
112
117
  self.clr_from_cur_line
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curses-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: '2.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-07 00:00:00.000000000 Z
11
+ date: 2023-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -35,7 +35,8 @@ description: 'The Ruby curses library is sorely lacking some important features.
35
35
  terminal curses applications in Ruby. See the Github page for information on what
36
36
  properties and functions are included: https://github.com/isene/Ruby-Curses-Class-Extension.
37
37
  The curses_template.rb is also installed in the lib directory and serves as the
38
- basis for my own curses applications. New in 2.1: Simplified'
38
+ basis for my own curses applications. New in 2.2: "Added the method `nl`, an effective
39
+ newline"'
39
40
  email: g@isene.com
40
41
  executables: []
41
42
  extensions: []