motion/joybox/ui/menu.rb in joybox-1.0.0 vs motion/joybox/ui/menu.rb in joybox-1.1.0
- old
+ new
@@ -1,23 +1,21 @@
module Joybox
module UI
class Menu < CCMenu
+ extend Joybox::Common::Initialize
+
alias_method :align_items_vertically, :alignItemsVertically
alias_method :align_items_vertically_width_padding, :alignItemsVerticallyWithPadding
alias_method :align_items_horizontally, :alignItemsHorizontally
alias_method :align_items_horizontally_with_padding, :alignItemsHorizontallyWithPadding
- alias_method :align_items_in_columns, :alignItemsInColumns
- alias_method :align_items_in_rows, :alignItemsInRows
+ alias_method :align_items_in_columns, :alignItemsInColumnsWithArray
+ alias_method :align_items_in_rows, :alignItemsInRowsWithArray
- def self.new(options = {})
-
- menu = self.menuWithArray(options[:items])
-
- menu.position = options[:position] if options.has_key? (:position)
-
- menu
+ def initialize(options = {})
+ initWithArray(options[:items])
+ self.position = options[:position] if options.has_key? (:position)
end
end
end
\ No newline at end of file