From 0258f0788069e4fb305d1a613946a410ecac2312 Mon Sep 17 00:00:00 2001 From: Nuno Date: Wed, 2 Feb 2022 21:05:13 +0100 Subject: [PATCH] Apply WG changes, remove core4 changes (need be reapplied later) --- .../data/gamedev/interfaces_v3/actions.xml | 2 + .../client/data/gamedev/interfaces_v3/ark.lua | 111 +++- .../gamedev/interfaces_v3/bg_downloader.lua | 8 +- .../gamedev/interfaces_v3/bot_chat_v4.xml | 100 ++- .../data/gamedev/interfaces_v3/commands.xml | 2 +- .../data/gamedev/interfaces_v3/compass.xml | 24 +- .../data/gamedev/interfaces_v3/config.xml | 159 ++--- .../gamedev/interfaces_v3/encyclopedia.xml | 30 +- .../gamedev/interfaces_v3/game_config.xml | 16 +- .../interfaces_v3/game_context_menu.xml | 3 +- .../gamedev/interfaces_v3/game_r2_loading.lua | 12 +- .../data/gamedev/interfaces_v3/guild.lua | 8 +- .../data/gamedev/interfaces_v3/guild.xml | 132 ++-- .../data/gamedev/interfaces_v3/help.xml | 31 +- .../gamedev/interfaces_v3/info_player.lua | 625 +++++++++++++++--- .../gamedev/interfaces_v3/info_player.xml | 57 +- .../gamedev/interfaces_v3/interaction.lua | 56 +- .../gamedev/interfaces_v3/interaction.xml | 158 ++--- .../data/gamedev/interfaces_v3/inventory.xml | 37 +- .../data/gamedev/interfaces_v3/keys.xml | 41 +- .../gamedev/interfaces_v3/keys_bi.wasd.xml | 41 +- .../interfaces_v3/keys_bi.wow_alike.xml | 1 + .../gamedev/interfaces_v3/keys_bi.zqsd.xml | 41 +- .../gamedev/interfaces_v3/local_database.xml | 39 +- .../gamedev/interfaces_v3/login_config.xml | 8 +- .../data/gamedev/interfaces_v3/login_main.xml | 36 +- .../gamedev/interfaces_v3/login_widgets.xml | 8 +- .../client/data/gamedev/interfaces_v3/map.lua | 26 + .../client/data/gamedev/interfaces_v3/map.xml | 4 +- .../gamedev/interfaces_v3/out_v2_appear.lua | 4 +- .../gamedev/interfaces_v3/out_v2_appear.xml | 21 +- .../gamedev/interfaces_v3/out_v2_config.xml | 2 + .../gamedev/interfaces_v3/out_v2_location.xml | 3 +- .../gamedev/interfaces_v3/out_v2_select.xml | 54 +- .../gamedev/interfaces_v3/outgame_config.xml | 2 + .../gamedev/interfaces_v3/outgame_select.xml | 16 +- .../gamedev/interfaces_v3/outgame_summary.xml | 4 +- .../gamedev/interfaces_v3/outgame_widgets.xml | 4 +- .../data/gamedev/interfaces_v3/outpost.lua | 30 +- .../data/gamedev/interfaces_v3/outpost.xml | 44 +- .../data/gamedev/interfaces_v3/phrase.xml | 29 +- .../data/gamedev/interfaces_v3/player.lua | 58 +- .../data/gamedev/interfaces_v3/player.xml | 16 +- .../gamedev/interfaces_v3/player_trade.lua | 32 + .../gamedev/interfaces_v3/player_trade.xml | 101 +-- .../data/gamedev/interfaces_v3/r2ed.xml | 8 +- .../gamedev/interfaces_v3/r2ed_scenario.xml | 10 +- .../data/gamedev/interfaces_v3/reset.xml | 2 +- .../interfaces_v3/ring_access_point.lua | 81 ++- .../ring_access_point_filter.lua | 34 +- .../gamedev/interfaces_v3/ring_window.xml | 4 +- .../data/gamedev/interfaces_v3/taskbar.lua | 14 +- .../data/gamedev/interfaces_v3/taskbar.xml | 28 +- .../data/gamedev/interfaces_v3/webig.lua | 2 - .../gamedev/interfaces_v3/webig_widgets.xml | 8 + .../data/gamedev/interfaces_v3/widgets.xml | 50 +- .../src/ai_service/doc/doxycfg/doxygen.css | 124 ++-- 57 files changed, 1604 insertions(+), 997 deletions(-) create mode 100644 ryzom/client/data/gamedev/interfaces_v3/player_trade.lua diff --git a/ryzom/client/data/gamedev/interfaces_v3/actions.xml b/ryzom/client/data/gamedev/interfaces_v3/actions.xml index 35b03a199..bfd245806 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/actions.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/actions.xml @@ -43,6 +43,7 @@ + @@ -461,6 +462,7 @@ + diff --git a/ryzom/client/data/gamedev/interfaces_v3/ark.lua b/ryzom/client/data/gamedev/interfaces_v3/ark.lua index 8666be557..fa08c5e00 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/ark.lua +++ b/ryzom/client/data/gamedev/interfaces_v3/ark.lua @@ -22,31 +22,55 @@ if ArkMissionCatalog == nil then } end -function ArkMissionCatalog:OpenWindow(urlA, urlB) - local winframe = WebBrowser:addWindow("ark_mission_catalog", "Mission Catalog", getUI(ArkMissionCatalog.window_id)) +function ArkMissionCatalog:OpenWindow(urlA, urlB, dont_active) + ArkMissionCatalog.window_id = "ui:interface:encyclopedia" + local winframe = getUI(ArkMissionCatalog.window_id) winframe.opened=true - winframe.active=true - winframe.w = 950 + if dont_active ~= true then + winframe.active=true + end ArkMissionCatalog.window = winframe - getUI(ArkMissionCatalog.window_id..":content:htmlA"):browse(urlA) + getUI("ui:interface:encyclopedia:content:htmlA"):browse(urlA) - local htmlb = getUI(ArkMissionCatalog.window_id..":content:htmlB") - if htmlb.home == "" then - htmlb.home = urlB - end + local htmlb = getUI("ui:interface:encyclopedia:content:htmlB") + htmlb.home = urlB htmlb:browse("home") - end - -function ArkMissionCatalog:OpenCat(url) +function ArkMissionCatalog:OpenCat(cat, url) + local ency = getUI("ui:interface:encyclopedia") + setOnDraw(ency, "") + ArkMissionCatalog.cat = cat local htmlb = getUI(ArkMissionCatalog.window_id..":content:htmlB") - htmlb.home = url+"&continent="+getContinentSheet() + local htmlc = getUI(ArkMissionCatalog.window_id..":content:htmlC") + if cat == "title" then + ArkMissionCatalog.posxB = 180 + ArkMissionCatalog.widthB = 240 + ArkMissionCatalog.widthC = 530 + ArkMissionCatalog.posxC = 405 + + local htmlB = getUI(ArkMissionCatalog.window_id..":content:htmlB") + local htmlC = getUI(ArkMissionCatalog.window_id..":content:htmlC") + htmlB.x = ArkMissionCatalog.posxB + htmlB.w = ArkMissionCatalog.widthB + htmlC.w = ArkMissionCatalog.widthC + htmlC.x = ArkMissionCatalog.posxC + htmlC.active = true + else + ArkMissionCatalog.widthB = 740 + htmlb.w = ArkMissionCatalog.widthB + if htmlc then + htmlc.active = false + end + end + htmlb.home = url.."&continent="..getContinentSheet() htmlb:browse("home") + setOnDraw(ency, "ArkMissionCatalog:autoResize()") end +-- TODO: check removing fromUTF8 function ArkMissionCatalog:UpdateMissionTexts(win, id, text1, text2) local w = win:find("ark_mission_"..id) local text = ucstring() @@ -72,36 +96,59 @@ function ArkMissionCatalog:autoResize() local ui = getUI(ArkMissionCatalog.window_id) local htmlA = getUI(ArkMissionCatalog.window_id..":content:htmlA") local htmlB = getUI(ArkMissionCatalog.window_id..":content:htmlB") + local htmlC = getUI(ArkMissionCatalog.window_id..":content:htmlC") - if ArkMissionCatalog.cat == "storyline" then - if ui.w < 784 then - if ArkMissionCatalog.cat == "storyline" then + if htmlC.active == false then + if ArkMissionCatalog.cat == "storyline" then + if ui.w < 784 then local td30 = htmlB:find("storyline_content") if td30 ~= nil then td30.x = math.max(0, 200-784+ui.w) ArkMissionCatalog.need_restore_td30 = true end - end - else - if ArkMissionCatalog.need_restore_td30 then - local td30 = htmlB:find("storyline_content") - if td30 ~= nil then - td30.x = 200 - ArkMissionCatalog.need_restore_td30 = false + else + if ArkMissionCatalog.need_restore_td30 then + local td30 = htmlB:find("storyline_content") + if td30 ~= nil then + td30.x = 200 + ArkMissionCatalog.need_restore_td30 = false + end end end end - end - if ui.w < 950 then - htmlA.w = math.max(60, 220-950+ui.w) - htmlB.x = math.max(35, 190-950+ui.w) - ArkMissionCatalog.need_restore = true + if ui.w < 950 then + htmlA.w = math.max(60, 220-950+ui.w) + htmlB.x = math.max(35, 190-950+ui.w) + ArkMissionCatalog.need_restore = true + else + if ArkMissionCatalog.need_restore then + htmlA.w = 220 + htmlB.x = 190 + ArkMissionCatalog.need_restore = false + end + end else - if ArkMissionCatalog.need_restore then - htmlA.w = 220 - htmlB.x = 190 - ArkMissionCatalog.need_restore = false + if ui.w < 950 then + htmlA.w = math.max(68, 220-950+ui.w) + htmlB.x = math.max(35, ArkMissionCatalog.posxB-950+ui.w) + if htmlB:find("scroll_bar").h > 0 then + htmlC.x = math.max(80, ui.w-htmlC.w) + htmlB.w = math.max(62, ui.w-htmlA.w-htmlC.x+16) + else + htmlC.x = math.max(75, ui.w-htmlC.w-16) + htmlB.w = math.max(55, htmlC.x-htmlB.x+16) + end + ArkMissionCatalog.need_restore = true + else + if ArkMissionCatalog.need_restore then + htmlA.w = 220 + htmlB.w = ArkMissionCatalog.widthB + htmlB.x = ArkMissionCatalog.posxB + htmlC.w = ArkMissionCatalog.widthC + htmlC.x = ArkMissionCatalog.posxC + ArkMissionCatalog.need_restore = false + end end end end diff --git a/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua b/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua index f133eae27..161012d9e 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua +++ b/ryzom/client/data/gamedev/interfaces_v3/bg_downloader.lua @@ -48,7 +48,7 @@ function bgdownloader:setProgressText(ucstr, color, progress, ellipsis) local text = self:getProgressGroup():find("text") local ellipsisTxt = self:getProgressGroup():find("ellipsis") text.color = color - text.text = ucstr + text.uc_hardtext = ucstr if ellipsis then ellipsisTxt.hardtext = ellipsis else @@ -60,7 +60,7 @@ function bgdownloader:setProgressText(ucstr, color, progress, ellipsis) -- any current download to finish, otherwise connection may be lost) self:setIcon("bgd_pause.tga") ellipsisTxt.hardtext = "" - text.text = pausedText + text.uc_hardtext = pausedText else self:setIcon("") local progressCtrl = self:getProgressBar() @@ -88,7 +88,7 @@ function bgdownloader:setPatchProgress(progress) local progressDate = nltime.getLocalTime() / 500 local colValue = math.floor(230 + 24 * math.sin(progressDate)) local color = string.format("%d %d %d %d", colValue, colValue, colValue, 255) - self:setProgressText(concatString(i18n.get("uiBGD_Progress"), progressPercentText), color, progress, progressSymbol[progressPostfix + 1]) + self:setProgressText(concatUCString(i18n.get("uiBGD_Progress"), ucstring(progressPercentText)), color, progress, progressSymbol[progressPostfix + 1]) end ------------------------------------------------------------------------------------------------------------ @@ -110,7 +110,7 @@ function bgdownloader:setPatchError() self:getProgressGroup().active = true end local errMsg = getPatchLastErrorMessage() - if errMsg == "" then + if errMsg == ucstring() then self:setProgressText(i18n.get("uiBGD_PatchError"), "255 0 0 255", 0) else self:setProgressText(errMsg, "255 0 0 255", 0) diff --git a/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml b/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml index d76df41cb..e1d76646b 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml @@ -22,31 +22,6 @@ - - -