|
楼主 |
发表于 2012-6-29 10:36
|
显示全部楼层
本帖最后由 fff71669 于 2012-6-29 10:47 编辑
终于搞定了嘿嘿
请把- function War_StatusMenu()
- WAR.ShowHead = 0
- Menu_Status()
- WAR.ShowHead = 1
- Cls()
- end
复制代码 改变成
- function War_StatusMenu() ---战斗中显示状态
- WAR.ShowHead = 0
- local function MapWatch()
- local x = WAR.Person[WAR.CurID]["坐标X"];
- local y = WAR.Person[WAR.CurID]["坐标Y"];
- local page = 1
- War_CalMoveStep(WAR.CurID,128,1);
- WarDrawMap(1,x,y);
- ShowScreen();
- x,y=War_SelectMove()
- if x == nil then
- return
- end
- local i
- local id = 0
- for i = 0,WAR.PersonNum do
- if WAR.Person[i]["坐标X"] == x and WAR.Person[i]["坐标Y"] == y and WAR.Person[i]["死亡"] == false then
- id = WAR.Person[i]["人物编号"]
- break;
- end
- end
- while true do
- Cls()
- ShowPersonStatus_sub(id,page)
- ShowScreen();
- local keypress = WaitKey()
- if keypress == VK_LEFT then
- page = page - 1;
- elseif keypress == VK_RIGHT then
- page = page + 1;
- elseif keypress == 27 then
- break
- end
- end
- end
- local function FriList()
- local menu = {};
- local list = {}
- local page = 1
- for i = 1,WAR.PersonNum do
- if WAR.Person[i - 1]["我方"] == true and WAR.Person[i - 1]["死亡"] == false then
- menu[#menu + 1] = {JY.Person[WAR.Person[i - 1]["人物编号"]]["姓名"],nil,1}
- list[#list + 1] = WAR.Person[i - 1]["人物编号"]
- end
- end
- Cls()
- local r = ShowMenu(menu,#menu, 0, CC.MainSubMenuX, CC.MainSubMenuY, 0, 0, 1, 1, CC.DefaultFont, C_ORANGE, C_WHITE)
- if r < 1 then
- return
- end
- while true do
- Cls()
- ShowPersonStatus_sub(list[r],page)
- ShowScreen();
- local keypress = WaitKey()
- if keypress == VK_LEFT then
- page = page - 1;
- elseif keypress == VK_RIGHT then
- page = page + 1;
- elseif keypress == VK_UP then
- r = r - 1
- elseif keypress == VK_DOWN then
- r = r + 1
- elseif keypress == 27 then
- break
- end
- if r < 1 then
- r = 1
- end
- if r > #list then
- r = #list
- end
- end
- end
- local function EnemyList()
- local menu = {};
- local list = {}
- local page = 1
- for i = 1,WAR.PersonNum do
- if WAR.Person[i - 1]["我方"] == false and WAR.Person[i - 1]["死亡"] == false then
- menu[#menu + 1] = {JY.Person[WAR.Person[i - 1]["人物编号"]]["姓名"],nil,1}
- list[#list + 1] = WAR.Person[i - 1]["人物编号"]
- end
- end
- Cls()
- local r = ShowMenu(menu,#menu, 0, CC.MainSubMenuX, CC.MainSubMenuY, 0, 0, 1, 1, CC.DefaultFont, C_ORANGE, C_WHITE)
- if r < 1 then
- return
- end
- local id = list[r]
- while true do
- Cls()
- ShowPersonStatus_sub(list[r],page)
- ShowScreen();
- local keypress = WaitKey()
- if keypress == VK_LEFT then
- page = page - 1;
- elseif keypress == VK_RIGHT then
- page = page + 1;
- elseif keypress == VK_UP then
- r = r - 1
- elseif keypress == VK_DOWN then
- r = r + 1
- elseif keypress == 27 then
- break
- end
- if r < 1 then
- r = 1
- end
- if r > #list then
- r = #list
- end
- end
- end
- local menu={
- {"地图选点查看",MapWatch,1},
- {"我方人员列表",FriList,1},
- {"敌方人员列表",EnemyList,1},
- };
- local nexty=CC.MainSubMenuY+CC.SingleLineHeight;
- ShowMenu(menu,3, 0, CC.MainSubMenuX, CC.MainSubMenuY, 0, 0, 1, 1, CC.DefaultFont, C_ORANGE, C_WHITE)
-
- WAR.ShowHead = 1
- Cls()
- end
复制代码 悲剧 刚没发完 嘿嘿 |
|