Class: GGLib::ImageTheme

Inherits:
Theme
  • Object
show all
Defined in:
lib/theme.rb

Direct Known Subclasses

Themes::BlueSteelTheme, Themes::WindowsTheme

Instance Attribute Summary collapse

Attributes inherited from Theme

#name

Instance Method Summary collapse

Methods inherited from Theme

#request, #setDefaultState, #setDownState, #setOverState

Constructor Details

#initialize(name, font, image) ⇒ ImageTheme

Returns a new instance of ImageTheme.



24
25
26
27
28
29
30
# File 'lib/theme.rb', line 24

def initialize(name, font, image)
  @name = name
  @image = image
  @width = Gosu::Image.new($window, @image.default).width
  @height = Gosu::Image.new($window, @image.default).height
  @font = font
end

Instance Attribute Details

#fontObject (readonly)

Returns the value of attribute font.



23
24
25
# File 'lib/theme.rb', line 23

def font
  @font
end

#heightObject (readonly)

Returns the value of attribute height.



23
24
25
# File 'lib/theme.rb', line 23

def height
  @height
end

#imageObject (readonly)

Returns the value of attribute image.



23
24
25
# File 'lib/theme.rb', line 23

def image
  @image
end

#widthObject (readonly)

Returns the value of attribute width.



23
24
25
# File 'lib/theme.rb', line 23

def width
  @width
end

Instance Method Details

#newInstance(obj) ⇒ Object



31
32
33
# File 'lib/theme.rb', line 31

def newInstance(obj)
  return ImageThemeInstance.new(self, obj)
end