Class: GGLib::ImageTheme
Direct Known Subclasses
Instance Attribute Summary collapse
-
#font ⇒ Object
readonly
Returns the value of attribute font.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Attributes inherited from Theme
Instance Method Summary collapse
-
#initialize(name, font, image) ⇒ ImageTheme
constructor
A new instance of ImageTheme.
- #newInstance(obj) ⇒ Object
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
#font ⇒ Object (readonly)
Returns the value of attribute font.
23 24 25 |
# File 'lib/theme.rb', line 23 def font @font end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
23 24 25 |
# File 'lib/theme.rb', line 23 def height @height end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
23 24 25 |
# File 'lib/theme.rb', line 23 def image @image end |
#width ⇒ Object (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 |