OSDN Git Service

fix editor
[pettanr/pettanr.git] / lib / editor / panel_dock / bay / element.rb
1 module Editor
2   module EditorModule
3     module DockModule
4       class ElementBay < BoardBay
5         def initialize parent, index, name
6           super
7           
8           self.elements.each_with_index do |element, i| 
9             tab = ElementBoard.new(self, i, element.item_name, element)
10             add_tab tab, ElementBoardLabel.new(tab, element.item_name), 
11               ElementBoardBody.new(tab)
12           end
13         end
14         
15         def elements
16           self.root_item.scenario_elements
17         end
18         
19       end
20       
21       module TabModule
22         class ElementBayLabel < BayLabel
23         end
24         
25         class ElementBayBody < BayBody
26           def template_file_name
27             'element'
28           end
29           
30         end
31         
32       end
33     end
34   end
35 end