Class: Cliptic::Interface::Logo
- Inherits:
-
Windows::Grid
- Object
- Curses::Window
- Windows::Window
- Windows::Grid
- Cliptic::Interface::Logo
- Defined in:
- lib/cliptic/interface.rb
Constant Summary
Constants included from Chars
Chars::Block, Chars::HL, Chars::LL, Chars::LS, Chars::LU, Chars::MS, Chars::Nums, Chars::RL, Chars::RS, Chars::RU, Chars::TD, Chars::TL, Chars::TR, Chars::TU, Chars::Tick, Chars::VL, Chars::XX
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Windows::Grid
Attributes inherited from Windows::Window
#centered_x, #centered_y, #col, #line, #x, #y
Instance Method Summary collapse
- #draw(cp_grid: $colors[:logo_grid], cp_text: $colors[:logo_text], bold: true) ⇒ Object
-
#initialize(line:, text: "CLIptic") ⇒ Logo
constructor
A new instance of Logo.
Methods inherited from Windows::Grid
Methods inherited from Windows::Window
#add_str, #bold, #clear, #color, #move, #refresh, #reset_attrs, #reset_pos, #setpos, #standend, #standout, #time_str, #wrap_str
Methods included from Chars
Constructor Details
#initialize(line:, text: "CLIptic") ⇒ Logo
Returns a new instance of Logo.
35 36 37 38 |
# File 'lib/cliptic/interface.rb', line 35 def initialize(line:, text:"CLIptic") super(y:1, x:text.length, line:line) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
34 35 36 |
# File 'lib/cliptic/interface.rb', line 34 def text @text end |
Instance Method Details
#draw(cp_grid: $colors[:logo_grid], cp_text: $colors[:logo_text], bold: true) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/cliptic/interface.rb', line 39 def draw(cp_grid:$colors[:logo_grid], cp_text:$colors[:logo_text], bold:true) super(cp:cp_grid) bold(bold).color(cp_text) add_str(str:text) reset_attrs refresh end |