Class: GGLib::Themes::ShadeCheckGenCTheme

Inherits:
DrawnTheme show all
Defined in:
lib/ext/themes.rb

Instance Attribute Summary

Attributes inherited from DrawnTheme

#font

Attributes inherited from GGLib::Theme

#name

Instance Method Summary collapse

Methods inherited from DrawnTheme

#height, #newInstance, #width

Methods inherited from GGLib::Theme

#height, #request, #setDefaultState, #setDownState, #setOverState, #width

Constructor Details

#initializeShadeCheckGenCTheme

Returns a new instance of ShadeCheckGenCTheme.



273
274
275
276
277
278
279
280
281
282
# File 'lib/ext/themes.rb', line 273

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),
              0xffe6e6e6,
              0xff848484
            )
  super("Shade.Checkable.Checked", font)
end

Instance Method Details

#draw(x1, y1, x2, y2, state) ⇒ Object



283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/ext/themes.rb', line 283

def draw(x1,y1, x2, y2, state)
  if state == 1
    $window.draw_quad(x1, y1, 0xff2e2e2e, x2, y1, 0xff2e2e2e, x1, y2, 0xff2e2e2e, x2, y2, 0xff2e2e2e, ZOrder::Widget) 
    $window.draw_quad(x1+2, y1+2, 0xffbdbdbd, x2-2, y1+2, 0xffbdbdbd, x1+2, y2-2, 0xffbdbdbd, x2-2, y2-2, 0xffbdbdbd, ZOrder::Widget) 
    $window.draw_quad(x1+3, y1+3, 0xff2e2e2e, x2-3, y1+3, 0xff2e2e2e, x1+3, y2-3, 0xff2e2e2e, x2-3, y2-3, 0xff2e2e2e, ZOrder::Widget) 
    $window.draw_quad(x1+4, y1+4, 0xfffeeeee, x2-4, y1+4, 0xffeeeeee, x1+4, y2-4, 0xffeeeeee, x2-4, y2-4, 0xffeeeeee, ZOrder::Widget)
  else
    $window.draw_quad(x1, y1, 0xff2e2e2e, x2, y1, 0xff2e2e2e, x1, y2, 0xff2e2e2e, x2, y2, 0xff2e2e2e, ZOrder::Widget) 
    $window.draw_quad(x1+2, y1+2, 0xffffffff, x2-2, y1+2, 0xffffffff, x1+2, y2-2, 0xffffffff, x2-2, y2-2, 0xffffffff, ZOrder::Widget) 
    $window.draw_quad(x1+3, y1+3, 0xff2e2e2e, x2-3, y1+3, 0xff2e2e2e, x1+3, y2-3, 0xff2e2e2e, x2-3, y2-3, 0xff2e2e2e, ZOrder::Widget) 
    $window.draw_quad(x1+4, y1+4, 0xffffffff, x2-4, y1+4, 0xffffffff, x1+4, y2-4, 0xffffffff, x2-4, y2-4, 0xffffffff, ZOrder::Widget)
  end
end