Class: Core::GUI::Element

Inherits:
Object show all
Defined in:
lib/gui/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y, w, h) ⇒ Element

x and y are relative to the windows topleft corner plus title bar



142
143
144
145
146
# File 'lib/gui/base.rb', line 142

def initialize(x, y, w, h)
  @remove = false
  @xoff = @yoff = @zoff = 0
  @x, @y, @w, @h = x, y, w, h
end

Instance Attribute Details

#hObject

Returns the value of attribute h.



140
141
142
# File 'lib/gui/base.rb', line 140

def h
  @h
end

#wObject

Returns the value of attribute w.



140
141
142
# File 'lib/gui/base.rb', line 140

def w
  @w
end

#xObject

Returns the value of attribute x.



140
141
142
# File 'lib/gui/base.rb', line 140

def x
  @x
end

#xoffObject

Returns the value of attribute xoff.



140
141
142
# File 'lib/gui/base.rb', line 140

def xoff
  @xoff
end

#yObject

Returns the value of attribute y.



140
141
142
# File 'lib/gui/base.rb', line 140

def y
  @y
end

#yoffObject

Returns the value of attribute yoff.



140
141
142
# File 'lib/gui/base.rb', line 140

def yoff
  @yoff
end

#zoffObject

Returns the value of attribute zoff.



140
141
142
# File 'lib/gui/base.rb', line 140

def zoff
  @zoff
end

Instance Method Details

#drawObject



149
150
# File 'lib/gui/base.rb', line 149

def draw
end

#remove?Boolean

Returns:

  • (Boolean)


151
152
153
# File 'lib/gui/base.rb', line 151

def remove?
  return @remove
end

#updateObject



147
148
# File 'lib/gui/base.rb', line 147

def update
end