OSDN Git Service

fix CMakeList.txt for windows
[moflib/moflib.git] / saisei-1.0 / rpg / debug / script / menu.lua
index 236c007..657ff04 100644 (file)
-require('script/moflib')\r
-require('script/common')\r
-require('script/bubble')\r
-\r
---{{{ question_attached\r
-function question_attached(item_tween)\r
-       local items = load_game_data('gamedata.item_profile')\r
-       local list = {}\r
-       for i = 1, #items, 1 do\r
-               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-               if tonumber(items[i].attached) == 1 then \r
-                       if tonumber(items[i].equipped) == 1 then\r
-                               table.insert(list, name .. '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91\95\94õ\92\86)</col></layout>')\r
-                       else\r
-                               table.insert(list, name)\r
-                       end\r
-               end\r
-       end\r
-       return question('\8f\8a\8e\9d\83A\83C\83e\83\80(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ question_stored\r
-function question_stored(item_tween)\r
-       local items = load_game_data('gamedata.item_profile')\r
-       local list = {}\r
-       for i = 1, #items, 1 do\r
-               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-               if tonumber(items[i].stored) == 1 then \r
-                       table.insert(list, name)\r
-               end\r
-       end\r
-       return question('\91q\8cÉ\83A\83C\83e\83\80', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ question_relic\r
-function question_relic(item_tween)\r
-       local relics = load_game_data('gamedata.relic_profile')\r
-       local list = {}\r
-       for i = 1, #relics, 1 do\r
-               if relics[i].num ~= 0 then\r
-                       local name = get_icon_image_tag(relics[i].icon_type) .. \r
-                               '<layout w="360" h="32" xalign="left" yalign="center">' .. relics[i].name .. '</layout>' ..\r
-                               '<layout w="100" h="32" xalign="right" yalign="center">' .. relics[i].num .. '\83\96</layout>'\r
-                       table.insert(list, name)\r
-               end\r
-       end\r
-       return question('\83\8c\83\8a\83b\83N', list, nil, nil, item_tween) -- relic\82Í\91S\95\94disable\r
-end\r
---}}}\r
---{{{ question_setup_weapon\r
-function question_setup_weapon(item_tween)\r
-       local items = load_game_data('gamedata.item_profile')\r
-       local list = {}\r
-       local disables = {}\r
-       local num_items = 0\r
-       for i = 1, #items, 1 do\r
-               local type = tonumber(items[i].type);\r
-               local state = ''\r
-               if items[i].equipped == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
-               elseif items[i].attached == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
-               elseif items[i].stored == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
-               end\r
-               if type == ITEM_TYPE_KNIGH or type == ITEM_TYPE_SWORD or type == ITEM_TYPE_BLADE then \r
-                       -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
-                       if items[i].equipped == '1' then\r
-                               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                                       '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                               table.insert(list, name .. state)\r
-                               table.insert(disables, num_items)\r
-                       else\r
-                               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                               table.insert(list, name .. state)\r
-                       end\r
-                       num_items = num_items + 1\r
-               end\r
-       end\r
-       return question('\91\95\94õ\82·\82é\95\90\8aí\82ð\91I\91ð', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_armer\r
-function question_setup_armer(item_tween)\r
-       local items = load_game_data('gamedata.item_profile')\r
-       local list = {}\r
-       local disables = {}\r
-       local num_items = 0\r
-       for i = 1, #items, 1 do\r
-               local type = tonumber(items[i].type);\r
-               local state = ''\r
-               if items[i].equipped == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
-               elseif items[i].attached == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
-               elseif items[i].stored == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
-               end\r
-               if type == ITEM_TYPE_ROBE or type == ITEM_TYPE_ARMER then \r
-                       -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
-                       if items[i].equipped == '1' then\r
-                               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                                       '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                               table.insert(list, name .. state)\r
-                               table.insert(disables, num_items)\r
-                       else\r
-                               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                               table.insert(list, name .. state)\r
-                       end\r
-                       num_items = num_items + 1\r
-\r
-               end\r
-       end\r
-       return question('\91\95\94õ\82·\82é\96h\8bï\82ð\91I\91ð', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_item\r
-function question_setup_item(item_tween)\r
-       local items = load_game_data('gamedata.item_profile')\r
-       local list = {}\r
-       local disables = {}\r
-       local num_items = 0\r
-       for i = 1, #items, 1 do\r
-               local state = ''\r
-               if items[i].equipped == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'\r
-               elseif items[i].attached == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'\r
-               elseif items[i].stored == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'\r
-               end\r
-\r
-               -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable\r
-               if items[i].equipped == '1' then\r
-                       local name = get_icon_image_tag(items[i].icon_type) .. \r
-                               '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                       table.insert(list, name .. state)\r
-                       table.insert(disables, num_items)\r
-               else\r
-                       local name = get_icon_image_tag(items[i].icon_type) .. \r
-                               '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-                       table.insert(list, name .. state)\r
-               end\r
-               num_items = num_items + 1\r
-       end\r
-       return question('\8f\8a\8e\9d\82·\82é\83A\83C\83e\83\80\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, disables, item_tween)\r
-end\r
---}}}\r
---{{{ question_setup_ideal\r
-function question_setup_ideal(item_tween)\r
-       local items = load_game_data('gamedata.ideal_profile')\r
-       local list = {}\r
-       for i = 1, #items, 1 do\r
-               local state = ''\r
-               if items[i].attend == '1' then\r
-                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8eQ\89Á)</col></layout>'\r
-               end\r
-               local name = get_icon_image_tag(items[i].icon_type) .. \r
-                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'\r
-               table.insert(list, name .. state)\r
-       end\r
-       return question('\8fo\8c\82\90_\97ì\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)\r
-end\r
---}}}\r
---{{{ item_menu\r
-function item_menu()\r
-       local base_width = 500\r
-       local base_height = 400\r
-\r
-       local items = \r
-               {\r
-                       '<layout w="170" h="24" xalign="center">\8f\8a\8e\9d\83A\83C\83e\83\80</layout>',\r
-                       '<layout w="170" h="24" xalign="center">\91q\8cÉ\83A\83C\83e\83\80</layout>',\r
-                       '<layout w="170" h="24" xalign="center">\83\8c\83\8a\83b\83N</layout>',\r
-               }\r
-       local tab_menu = Question:new('\83A\83C\83e\83\80\8aÇ\97\9d\83\81\83j\83\85\81[', items, 'direction=horizontal')\r
-       local prop = tab_menu:get_properties()\r
-       local old_width, old_height = split(prop['preferred_size'], ',')\r
-       local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)\r
-       local width = base_width\r
-       local height = 70\r
-       -- tab_menu\82Ìtween\82ð\90Ý\92è\r
-       tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)\r
-       tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
-       tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)\r
-       tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
-       tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)\r
-\r
-       local frame = tab_menu:show()\r
-       wait_frame(frame)\r
-       while true do\r
-               local key = get_key()\r
-               if key == KEY_UP then tab_menu:move_cursor_up()\r
-               elseif key == KEY_DOWN then tab_menu:move_cursor_down()\r
-               elseif key == KEY_LEFT then tab_menu:move_cursor_left()\r
-               elseif key == KEY_RIGHT then tab_menu:move_cursor_right()\r
-               elseif key == KEY_X then \r
-                       sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹\r
-                       frame = tab_menu:hide()\r
-                       wait_frame(frame)\r
-                       tab_menu:dispose()\r
-                       return \r
-               elseif key == KEY_Z then \r
-                       local index = tab_menu:get_current()\r
-                       sound("sound/decide.wav")-- \8c\88\92è\89¹\r
-                       -- tab_menu\82Ì\88Ê\92u\8cv\8eZ\r
-                       local prop = tab_menu:get_properties()\r
-\r
-                       -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬\r
-                       local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é\r
-                       if index == 0 then\r
-                               question_attached(item_tween)\r
-                       elseif index == 1 then\r
-                               question_stored(item_tween)\r
-                       elseif index == 2 then\r
-                               question_relic(item_tween)\r
-                               --question('\83\8c\83\8a\83b\83N', {'\8dz\90ÎX15', '\96\82\8f»\90ÎX10', '\90Â\8f»\90ÎX2', '\8cÃ\95\8f\91X4', '\93ä\82Ì\89t\91ÌX3'}, nil, nil, item_tween)\r
-                       end\r
-               end     \r
-       end\r
-end\r
---}}}\r
---{{{ setup_menu\r
-function setup_menu()\r
-       local base_width = 500\r
-       local base_height = 400\r
-\r
-       local items = \r
-               {\r
-                       '<layout w="120" h="24" xalign="center">\95\90\8aí</layout>',\r
-                       '<layout w="120" h="24" xalign="center">\96h\8bï</layout>',\r
-                       '<layout w="120" h="24" xalign="center">\90_\97ì</layout>',\r
-                       '<layout w="120" h="24" xalign="center">\83A\83C\83e\83\80</layout>',\r
-               }\r
-       local tab_menu = Question:new('\83Z\83b\83g\83A\83b\83v\83\81\83j\83\85\81[', items, 'direction=horizontal')\r
-       local prop = tab_menu:get_properties()\r
-       local old_width, old_height = split(prop['preferred_size'], ',')\r
-       local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)\r
-       local width = base_width\r
-       local height = 70\r
-       -- tab_menu\82Ìtween\82ð\90Ý\92è\r
-       tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)\r
-       tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
-       tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)\r
-       tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)\r
-       tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)\r
-\r
-       local frame = tab_menu:show()\r
-       wait_frame(frame)\r
-       while true do\r
-               local key = get_key()\r
-               if key == KEY_UP then tab_menu:move_cursor_up()\r
-               elseif key == KEY_DOWN then tab_menu:move_cursor_down()\r
-               elseif key == KEY_LEFT then tab_menu:move_cursor_left()\r
-               elseif key == KEY_RIGHT then tab_menu:move_cursor_right()\r
-               elseif key == KEY_X then \r
-                       sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹\r
-                       frame = tab_menu:hide()\r
-                       wait_frame(frame)\r
-                       tab_menu:dispose()\r
-                       return \r
-               elseif key == KEY_Z then \r
-                       local index = tab_menu:get_current()\r
-                       sound("sound/decide.wav")-- \8c\88\92è\89¹\r
-                       -- tab_menu\82Ì\88Ê\92u\8cv\8eZ\r
-                       local prop = tab_menu:get_properties()\r
-\r
-                       -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬\r
-                       local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é\r
-                       if index == 0 then\r
-                               question_setup_weapon(item_tween)\r
-                       elseif index == 1 then\r
-                               question_setup_armer(item_tween)\r
-                       elseif index == 2 then\r
-                               question_setup_ideal(item_tween) \r
-                       elseif index == 3 then\r
-                               question_setup_item(item_tween)\r
-                       end\r
-               end     \r
-       end\r
-end\r
---}}}\r
-\r
-function main()\r
-       --pic = Picture:new('image/yukkuri.png')\r
-       --pic:set_tween('color', {[0] = {1, 1, 1}, [10] = {1, 0, 0}, [100] = {1, 0, 1, 1}})\r
-       --pic:set_tween('position2', {[0] = {200, 100}, [100] = {400, 200}})\r
-       --pic:set_tween('size2', {[0] = {100, 100}, [30] = {200, 200}, [60] = {100, 100}})\r
-       \r
-       local answer\r
-       while true do\r
-               local items = {'\83X\83e\81[\83^\83X', '\83A\83C\83e\83\80\8aÇ\97\9d', '\83Z\83b\83g\83A\83b\83v', '\83V\83X\83e\83\80', '<col name="gray">\83_\83\93\83W\83\87\83\93\92E\8fo</col>'}\r
-               answer = question('\83\81\83C\83\93\83\81\83j\83\85\81[', items, nil, {4}, RightSlideTween:new(0.2, 0.8, 0.3, 0.7, 20))\r
-               if answer == 0 then\r
-                       break\r
-               elseif answer == 1 then\r
-                       --{{{ \83X\83e\81[\83^\83X\r
-                       local texts = {\r
-                                       'HP   200/400         \83Q\83C\83\93    80%<nl/>\8dU\8c\82\97Í    200        \8aÑ\92Ê\97Í      20<nl/>\95¨\97\9d\96h\8cä 100        \96\82\96@\96h\8cä   50',\r
-                                       '\8f\8a\8e\9d\83A\83C\83e\83\80\90\94   5<nl />\8eg\96ð\90_\97ì\90\94       5          \90í\93¬\8eQ\89Á\90_\97ì\90\94      2',\r
-                                       '\8f\8a\8e\9d\8bà           3JEM',\r
-                               }\r
-                       message('\83\8a\81[\83X', texts, '', ExtensionTween:new())\r
-                       --}}}\r
-               elseif answer == 2 then\r
-                       item_menu()\r
-               elseif answer == 3 then\r
-                       setup_menu()\r
-               elseif answer == 4 then\r
-                       --{{{ \83V\83X\83e\83\80\r
-                       answer = question('\83V\83X\83e\83\80\83\81\83j\83\85\81[', {'\83Z\81[\83u', '\83\8d\81[\83h', '\8aÂ\8b«\90Ý\92è', '\82à\82Ç\82é'})\r
-                       --}}}\r
-               end \r
-       end -- \83\81\83C\83\93\83\81\83j\83\85\81[\r
-\r
-end\r
-\r
+require('script/moflib')
+require('script/common')
+require('script/bubble')
+
+--{{{ question_attached
+function question_attached(item_tween)
+       local items = load_game_data('gamedata.item_profile')
+       local list = {}
+       for i = 1, #items, 1 do
+               local name = get_icon_image_tag(items[i].icon_type) .. 
+                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+               if tonumber(items[i].attached) == 1 then 
+                       if tonumber(items[i].equipped) == 1 then
+                               table.insert(list, name .. '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91\95\94õ\92\86)</col></layout>')
+                       else
+                               table.insert(list, name)
+                       end
+               end
+       end
+       return question('\8f\8a\8e\9d\83A\83C\83e\83\80(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ question_stored
+function question_stored(item_tween)
+       local items = load_game_data('gamedata.item_profile')
+       local list = {}
+       for i = 1, #items, 1 do
+               local name = get_icon_image_tag(items[i].icon_type) .. 
+                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+               if tonumber(items[i].stored) == 1 then 
+                       table.insert(list, name)
+               end
+       end
+       return question('\91q\8cÉ\83A\83C\83e\83\80', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ question_relic
+function question_relic(item_tween)
+       local relics = load_game_data('gamedata.relic_profile')
+       local list = {}
+       for i = 1, #relics, 1 do
+               if relics[i].num ~= 0 then
+                       local name = get_icon_image_tag(relics[i].icon_type) .. 
+                               '<layout w="360" h="32" xalign="left" yalign="center">' .. relics[i].name .. '</layout>' ..
+                               '<layout w="100" h="32" xalign="right" yalign="center">' .. relics[i].num .. '\83\96</layout>'
+                       table.insert(list, name)
+               end
+       end
+       return question('\83\8c\83\8a\83b\83N', list, nil, nil, item_tween) -- relic\82Í\91S\95\94disable
+end
+--}}}
+--{{{ question_setup_weapon
+function question_setup_weapon(item_tween)
+       local items = load_game_data('gamedata.item_profile')
+       local list = {}
+       local disables = {}
+       local num_items = 0
+       for i = 1, #items, 1 do
+               local type = tonumber(items[i].type);
+               local state = ''
+               if items[i].equipped == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+               elseif items[i].attached == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+               elseif items[i].stored == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+               end
+               if type == ITEM_TYPE_KNIGH or type == ITEM_TYPE_SWORD or type == ITEM_TYPE_BLADE then 
+                       -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+                       if items[i].equipped == '1' then
+                               local name = get_icon_image_tag(items[i].icon_type) .. 
+                                       '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                               table.insert(list, name .. state)
+                               table.insert(disables, num_items)
+                       else
+                               local name = get_icon_image_tag(items[i].icon_type) .. 
+                                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                               table.insert(list, name .. state)
+                       end
+                       num_items = num_items + 1
+               end
+       end
+       return question('\91\95\94õ\82·\82é\95\90\8aí\82ð\91I\91ð', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_armer
+function question_setup_armer(item_tween)
+       local items = load_game_data('gamedata.item_profile')
+       local list = {}
+       local disables = {}
+       local num_items = 0
+       for i = 1, #items, 1 do
+               local type = tonumber(items[i].type);
+               local state = ''
+               if items[i].equipped == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+               elseif items[i].attached == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+               elseif items[i].stored == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+               end
+               if type == ITEM_TYPE_ROBE or type == ITEM_TYPE_ARMER then 
+                       -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+                       if items[i].equipped == '1' then
+                               local name = get_icon_image_tag(items[i].icon_type) .. 
+                                       '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                               table.insert(list, name .. state)
+                               table.insert(disables, num_items)
+                       else
+                               local name = get_icon_image_tag(items[i].icon_type) .. 
+                                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                               table.insert(list, name .. state)
+                       end
+                       num_items = num_items + 1
+
+               end
+       end
+       return question('\91\95\94õ\82·\82é\96h\8bï\82ð\91I\91ð', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_item
+function question_setup_item(item_tween)
+       local items = load_game_data('gamedata.item_profile')
+       local list = {}
+       local disables = {}
+       local num_items = 0
+       for i = 1, #items, 1 do
+               local state = ''
+               if items[i].equipped == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center">(\91\95\94õ\92\86)</layout></col>'
+               elseif items[i].attached == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8f\8a\8e\9d)</col></layout>'
+               elseif items[i].stored == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\91q\8cÉ)</col></layout>'
+               end
+
+               -- \91\95\94õ\92\86\82¾\82Á\82½\82çdisable
+               if items[i].equipped == '1' then
+                       local name = get_icon_image_tag(items[i].icon_type) .. 
+                               '<col name="gray"><layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                       table.insert(list, name .. state)
+                       table.insert(disables, num_items)
+               else
+                       local name = get_icon_image_tag(items[i].icon_type) .. 
+                               '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+                       table.insert(list, name .. state)
+               end
+               num_items = num_items + 1
+       end
+       return question('\8f\8a\8e\9d\82·\82é\83A\83C\83e\83\80\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, disables, item_tween)
+end
+--}}}
+--{{{ question_setup_ideal
+function question_setup_ideal(item_tween)
+       local items = load_game_data('gamedata.ideal_profile')
+       local list = {}
+       for i = 1, #items, 1 do
+               local state = ''
+               if items[i].attend == '1' then
+                       state = '<layout w="100" h="32" xalign="right" yalign="center"><col name="blue">(\8eQ\89Á)</col></layout>'
+               end
+               local name = get_icon_image_tag(items[i].icon_type) .. 
+                       '<layout w="360" h="32" xalign="left" yalign="center">' .. items[i].name .. '</layout>'
+               table.insert(list, name .. state)
+       end
+       return question('\8fo\8c\82\90_\97ì\82ð\91I\91ð(\8ec\82è0\83X\83\8d\83b\83g)', list, nil, nil, item_tween)
+end
+--}}}
+--{{{ item_menu
+function item_menu()
+       local base_width = 500
+       local base_height = 400
+
+       local items = 
+               {
+                       '<layout w="170" h="24" xalign="center">\8f\8a\8e\9d\83A\83C\83e\83\80</layout>',
+                       '<layout w="170" h="24" xalign="center">\91q\8cÉ\83A\83C\83e\83\80</layout>',
+                       '<layout w="170" h="24" xalign="center">\83\8c\83\8a\83b\83N</layout>',
+               }
+       local tab_menu = Question:new('\83A\83C\83e\83\80\8aÇ\97\9d\83\81\83j\83\85\81[', items, 'direction=horizontal')
+       local prop = tab_menu:get_properties()
+       local old_width, old_height = split(prop['preferred_size'], ',')
+       local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)
+       local width = base_width
+       local height = 70
+       -- tab_menu\82Ìtween\82ð\90Ý\92è
+       tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)
+       tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)
+       tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)
+       tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)
+       tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)
+
+       local frame = tab_menu:show()
+       wait_frame(frame)
+       while true do
+               local key = get_key()
+               if key == KEY_UP then tab_menu:move_cursor_up()
+               elseif key == KEY_DOWN then tab_menu:move_cursor_down()
+               elseif key == KEY_LEFT then tab_menu:move_cursor_left()
+               elseif key == KEY_RIGHT then tab_menu:move_cursor_right()
+               elseif key == KEY_X then 
+                       sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹
+                       frame = tab_menu:hide()
+                       wait_frame(frame)
+                       tab_menu:dispose()
+                       return 
+               elseif key == KEY_Z then 
+                       local index = tab_menu:get_current()
+                       sound("sound/decide.wav")-- \8c\88\92è\89¹
+                       -- tab_menu\82Ì\88Ê\92u\8cv\8eZ
+                       local prop = tab_menu:get_properties()
+
+                       -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬
+                       local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é
+                       if index == 0 then
+                               question_attached(item_tween)
+                       elseif index == 1 then
+                               question_stored(item_tween)
+                       elseif index == 2 then
+                               question_relic(item_tween)
+                               --question('\83\8c\83\8a\83b\83N', {'\8dz\90ÎX15', '\96\82\8f»\90ÎX10', '\90Â\8f»\90ÎX2', '\8cÃ\95\8f\91X4', '\93ä\82Ì\89t\91ÌX3'}, nil, nil, item_tween)
+                       end
+               end     
+       end
+end
+--}}}
+--{{{ setup_menu
+function setup_menu()
+       local base_width = 500
+       local base_height = 400
+
+       local items = 
+               {
+                       '<layout w="120" h="24" xalign="center">\95\90\8aí</layout>',
+                       '<layout w="120" h="24" xalign="center">\96h\8bï</layout>',
+                       '<layout w="120" h="24" xalign="center">\90_\97ì</layout>',
+                       '<layout w="120" h="24" xalign="center">\83A\83C\83e\83\80</layout>',
+               }
+       local tab_menu = Question:new('\83Z\83b\83g\83A\83b\83v\83\81\83j\83\85\81[', items, 'direction=horizontal')
+       local prop = tab_menu:get_properties()
+       local old_width, old_height = split(prop['preferred_size'], ',')
+       local x, y = layout(0.5, base_width, 0.5, 0.5, base_height, 0.5)
+       local width = base_width
+       local height = 70
+       -- tab_menu\82Ìtween\82ð\90Ý\92è
+       tab_menu:set_tween('open.position2', {[0] = {x, -height}, [20] = {x, y}}, 20)
+       tab_menu:set_tween('open.size2', {[0] = {width - old_width, height - old_height}}, 0)
+       tab_menu:set_tween('close.position2', {[0] = {x, y}, [20] = {x, -height}}, 20)
+       tab_menu:set_tween('close.size2', {[0] = {width - old_width, height - old_height}}, 0)
+       tab_menu:set_tween('close.color', {[5] = {1, 1, 1, 1}, [20] = {0, 1, 1, 1}}, 20)
+
+       local frame = tab_menu:show()
+       wait_frame(frame)
+       while true do
+               local key = get_key()
+               if key == KEY_UP then tab_menu:move_cursor_up()
+               elseif key == KEY_DOWN then tab_menu:move_cursor_down()
+               elseif key == KEY_LEFT then tab_menu:move_cursor_left()
+               elseif key == KEY_RIGHT then tab_menu:move_cursor_right()
+               elseif key == KEY_X then 
+                       sound("sound/cancel.wav")-- \83L\83\83\83\93\83Z\83\8b\89¹
+                       frame = tab_menu:hide()
+                       wait_frame(frame)
+                       tab_menu:dispose()
+                       return 
+               elseif key == KEY_Z then 
+                       local index = tab_menu:get_current()
+                       sound("sound/decide.wav")-- \8c\88\92è\89¹
+                       -- tab_menu\82Ì\88Ê\92u\8cv\8eZ
+                       local prop = tab_menu:get_properties()
+
+                       -- item_menu\82Ì\82½\82ß\82Ìtween\8dì\90¬
+                       local item_tween = DefaultTween:new(x, y + height + 10, width, base_height - height) -- \88ê\8fu\82Å\8c»\82ê\82é
+                       if index == 0 then
+                               question_setup_weapon(item_tween)
+                       elseif index == 1 then
+                               question_setup_armer(item_tween)
+                       elseif index == 2 then
+                               question_setup_ideal(item_tween) 
+                       elseif index == 3 then
+                               question_setup_item(item_tween)
+                       end
+               end     
+       end
+end
+--}}}
+
+function main()
+       --pic = Picture:new('image/yukkuri.png')
+       --pic:set_tween('color', {[0] = {1, 1, 1}, [10] = {1, 0, 0}, [100] = {1, 0, 1, 1}})
+       --pic:set_tween('position2', {[0] = {200, 100}, [100] = {400, 200}})
+       --pic:set_tween('size2', {[0] = {100, 100}, [30] = {200, 200}, [60] = {100, 100}})
+       
+       local answer
+       while true do
+               local items = {'\83X\83e\81[\83^\83X', '\83A\83C\83e\83\80\8aÇ\97\9d', '\83Z\83b\83g\83A\83b\83v', '\83V\83X\83e\83\80', '<col name="gray">\83_\83\93\83W\83\87\83\93\92E\8fo</col>'}
+               answer = question('\83\81\83C\83\93\83\81\83j\83\85\81[', items, nil, {4}, RightSlideTween:new(0.2, 0.8, 0.3, 0.7, 20))
+               if answer == 0 then
+                       break
+               elseif answer == 1 then
+                       --{{{ \83X\83e\81[\83^\83X
+                       local texts = {
+                                       'HP   200/400         \83Q\83C\83\93    80%<nl/>\8dU\8c\82\97Í    200        \8aÑ\92Ê\97Í      20<nl/>\95¨\97\9d\96h\8cä 100        \96\82\96@\96h\8cä   50',
+                                       '\8f\8a\8e\9d\83A\83C\83e\83\80\90\94   5<nl />\8eg\96ð\90_\97ì\90\94       5          \90í\93¬\8eQ\89Á\90_\97ì\90\94      2',
+                                       '\8f\8a\8e\9d\8bà           3JEM',
+                               }
+                       message('\83\8a\81[\83X', texts, '', ExtensionTween:new())
+                       --}}}
+               elseif answer == 2 then
+                       item_menu()
+               elseif answer == 3 then
+                       setup_menu()
+               elseif answer == 4 then
+                       --{{{ \83V\83X\83e\83\80
+                       answer = question('\83V\83X\83e\83\80\83\81\83j\83\85\81[', {'\83Z\81[\83u', '\83\8d\81[\83h', '\8aÂ\8b«\90Ý\92è', '\82à\82Ç\82é'})
+                       --}}}
+               end 
+       end -- \83\81\83C\83\93\83\81\83j\83\85\81[
+
+end
+