Class: Miyako::LayoutSpace

Inherits:
Object show all
Extended by:
Forwardable
Includes:
Animation, Layout, SpriteBase, SingleEnumerable
Defined in:
lib/Miyako/API/layout.rb

Overview

レイアウト空間クラス

画像を持たず、レイアウト空間のみを持つインスタンス 画像同士が離れているレイアウト構成を構築する際に用いる

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SingleEnumerable

#each, #length

Methods included from Layout

#add_snap_child, #bottom, #bottom!, #broad_rect, #center, #center!, #centering, #centering!, #copy_layout, #delete_snap_child, #get_snap_children, #get_snap_sprite, #h, #include_snap_child?, #init_layout, #layout_dispose, #left, #left!, #middle, #middle!, #move, #move!, #move_to, #move_to!, #on_move, #outside_bottom, #outside_bottom!, #outside_left, #outside_left!, #outside_right, #outside_right!, #outside_top, #outside_top!, #pos, #rect, #relative_move_to, #relative_move_to!, #reset_snap, #right, #right!, #segment, #set_layout_size, #set_snap_children, #set_snap_sprite, #size, #snap, #top, #top!, #update_layout, #update_layout_position, #w, #x, #y

Methods included from Animation

[], []=, anim_hash, #reset, reset, start, #start, #stop, stop, update, update_animation, #update_animation

Methods included from SpriteBase

#bitmap, #hide, #image_rect, #image_size, #oh, #oh=, #ow, #ow=, #ox, #ox=, #oy, #oy=, #part_rect, #rect, #render, #render_d, #render_to, #render_xy, #render_xy_to, #show, #to_sprite, #to_unit, #update

Constructor Details

#initialize(size) ⇒ LayoutSpace

インスタンスを生成する

size

インスタンスの大きさ[w,h]で指定する

返却値

生成されたインスタンスを返す



643
644
645
646
# File 'lib/Miyako/API/layout.rb', line 643

def initialize(size)
  init_layout
  set_layout_size(*(size.to_a))
end

Instance Attribute Details

#dpObject

Returns the value of attribute dp.



638
639
640
# File 'lib/Miyako/API/layout.rb', line 638

def dp
  @dp
end

#visibleObject

Returns the value of attribute visible.



638
639
640
# File 'lib/Miyako/API/layout.rb', line 638

def visible
  @visible
end

Instance Method Details

#disposeObject

インスタンスを解放させる



653
654
655
# File 'lib/Miyako/API/layout.rb', line 653

def dispose
  layout_dispose
end

#initialize_copy(obj) ⇒ Object

:nodoc:



648
649
650
# File 'lib/Miyako/API/layout.rb', line 648

def initialize_copy(obj) #:nodoc:
  copy_layout
end