Class: Glimmer::View::Cube

Inherits:
Object
  • Object
show all
Includes:
UI::CustomShape
Defined in:
lib/glimmer/view/cube.rb

Constant Summary collapse

DEFAULT_SIZE =
28

Instance Method Summary collapse

Instance Method Details

#pitObject



82
83
84
85
86
# File 'lib/glimmer/view/cube.rb', line 82

def pit
  oval(rectangle_width / 4.0, rectangle_height / 4.0, rectangle_width / 2.0, rectangle_height / 2.0) {
    background :black
  }
end

#pitted=(value) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/glimmer/view/cube.rb', line 32

def pitted=(value)
  options[:pitted] = value
  if value
    body_root.content {
      @pit ||= pit
    }
  else
    @pit&.dispose
    @pit = nil
  end
end