From e157a7453e6d83bb5af4f0ffcb28be3349890518 Mon Sep 17 00:00:00 2001 From: Nuno Gon?alves Date: Mon, 7 Nov 2016 13:53:41 +0100 Subject: [PATCH] Changed: Fix the way to load ryzhome lua/xml files --- code/ryzom/client/client_default.cfg | 3 ++- .../gamedev/interfaces_v3/ryzhome_toolbar.lua | 23 ++++++------------- .../gamedev/interfaces_v3/ryzhome_toolbar.xml | 6 +++-- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index d3107a199..f6c87b625 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -472,7 +472,8 @@ XMLInterfaceFiles = { "commands2.xml", "ring_access_point_filter.xml", "ring_window.xml", - "bg_downloader.xml" + "bg_downloader.xml", + "ryzhome_toolbar.xml" }; XMLR2EDInterfaceFiles = diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.lua b/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.lua index cf36aa3f6..21b035f48 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.lua @@ -1,17 +1,8 @@ - -if getUI("ui:interface:webig_ryzhome_toolbar") == nil then - local f = io.open("user/ryzhome_toolbar.xml", "r") - local xml = f:read("*a") - parseInterfaceFromString(xml) -end - -if RyzhomeBar == nil then - RyzhomeBar = { - id = "ui:interface:webig_ryzhome_toolbar", - saveuri = "http://app.ryzom.com/app_ryzhome/index.php?action=toolbar_save", - selectedPage = 1 - } -end +RyzhomeBar = { + id = "ui:interface:webig_ryzhome_toolbar", + saveuri = "http://app.ryzom.com/app_ryzhome/index.php?action=toolbar_save", + selectedPage = 1 +} function RyzhomeBar:close() getUI("ui:interface:webig_ryzhome_toolbar").active=false @@ -112,7 +103,7 @@ function RyzhomeBar:listItems() RyzhomeBar.recently_removed_item = false local framewin = getUI("ui:interface:webig_ryzhome_list_item") - framewin.opened=true + --framewin.opened=true framewin.active=true if framewin.x == 0 and framewin.y == 0 then local ui = getUI("ui:interface") @@ -248,4 +239,4 @@ function debug(text) local uc = ucstring() uc:fromUtf8(tostring(text)) displaySystemInfo(ucstring(uc), "sys") -end \ No newline at end of file +end diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.xml b/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.xml index b6a8dc09c..ef470005c 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/ryzhome_toolbar.xml @@ -1,5 +1,7 @@ -webig_ryzhome_list_item + + +