Class: GGLib::Themes::RubygooTextTheme
- Inherits:
-
DrawnTheme
- Object
- GGLib::Theme
- DrawnTheme
- GGLib::Themes::RubygooTextTheme
- Defined in:
- lib/ext/themes.rb
Constant Summary collapse
- @@textbox =
nil
Instance Attribute Summary
Attributes inherited from DrawnTheme
Attributes inherited from GGLib::Theme
Instance Method Summary collapse
- #draw(x1, y1, x2, y2, state) ⇒ Object
-
#initialize ⇒ RubygooTextTheme
constructor
A new instance of RubygooTextTheme.
Methods inherited from DrawnTheme
Methods inherited from GGLib::Theme
#height, #request, #setDefaultState, #setDownState, #setOverState, #width
Constructor Details
#initialize ⇒ RubygooTextTheme
Returns a new instance of RubygooTextTheme.
62 63 64 65 |
# File 'lib/ext/themes.rb', line 62 def initialize font = ThemeFontGroup.new( Gosu::Font.new($window, Gosu::default_font_name, 17), Gosu::Font.new($window, Gosu::default_font_name, 25), Gosu::Font.new($window, Gosu::default_font_name, 20), 0xff000000, 0xffb22222) super("Rubygoo.TextBox", font) end |
Instance Method Details
#draw(x1, y1, x2, y2, state) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/ext/themes.rb', line 66 def draw(x1,y1, x2, y2, state) if state == 1 $window.draw_quad(x1, y1, 0xff6e6e6e, x2, y1, 0xff6e6e6e, x1, y2, 0xff6e6e6e, x2, y2, 0xff6e6e6e, ZOrder::Widget) $window.draw_quad(x1+2, y1+2, 0xff000000, x2-2, y1+2, 0xff000000, x1+2, y2-2, 0xff000000, x2-2, y2-2, 0xff000000, ZOrder::Widget) $window.draw_quad(x1+3, y1+3, 0xff6e6e6e, x2-3, y1+3, 0xff6e6e6e, x1+3, y2-3, 0xff6e6e6e, x2-3, y2-3, 0xff6e6e6e, ZOrder::Widget) else $window.draw_quad(x1, y1, 0xff808080, x2, y1, 0xff808080, x1, y2, 0xff808080, x2, y2, 0xff808080, ZOrder::Widget) $window.draw_quad(x1+2, y1+2, 0xff000000, x2-2, y1+2, 0xff000000, x1+2, y2-2, 0xff000000, x2-2, y2-2, 0xff000000, ZOrder::Widget) $window.draw_quad(x1+3, y1+3, 0xff808080, x2-3, y1+3, 0xff808080, x1+3, y2-3, 0xff808080, x2-3, y2-3, 0xff808080, ZOrder::Widget) end end |