diff --git a/src/addon_d/extendedui_frame.lua b/src/addon_d/extendedui_frame.lua index 6cb6b6c..31d70e8 100644 --- a/src/addon_d/extendedui_frame.lua +++ b/src/addon_d/extendedui_frame.lua @@ -444,6 +444,7 @@ function EXTENDEDUI_LOAD_POSITIONS() local nskin = extui.framepos[tostring(k)].skin or "@default"; local nscale = extui.framepos[tostring(k)].scale or 100; local hover = extui.framepos[tostring(k)].hover or 0; + local doUpdate = extui.framepos[tostring(k)].alwaysupdate or false; local xs = toc:GetX() or 0; local ys = toc:GetY() or 0; @@ -502,7 +503,9 @@ function EXTENDEDUI_LOAD_POSITIONS() table.insert(extui.skins, skin); end - toc:RunUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); + if doUpdate then + toc:RunUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); + end v.onUpdate(x,y,w,h); --if k=="targetinfo" then @@ -545,7 +548,7 @@ function EXTENDEDUI_LOAD_POSITIONS() extui.framepos[tostring(k)]["child"] = {}; end - toc:RunUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); + --toc:RunUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); v.onUpdate(x,y,w,h); end, diff --git a/src/addon_d/extendedui_set.lua b/src/addon_d/extendedui_set.lua index 410220b..3b2c21b 100644 --- a/src/addon_d/extendedui_set.lua +++ b/src/addon_d/extendedui_set.lua @@ -215,10 +215,10 @@ function extui.LoadSettings() ["val"] = extui.ldSettingsUI["gridSize"], ["callback"] = function(frame, ctrl) local oldGridSize = extui.GetSetting("gridSize"); - extui.SetSetting("gridSize",ctrl:GetLevel()); if ui.GetFrame("EXTENDEDUI_GRIDFRAME") ~= nil and oldGridSize ~= ctrl:GetLevel() then - --extui.DrawGrid(); + extui.SetSetting("gridSize", ctrl:GetLevel()); + extui.DrawGrid(); end end, ["oncall"] = ui.LBUTTONUP, diff --git a/src/addon_d/extendedui_ui.lua b/src/addon_d/extendedui_ui.lua index fdeff04..002c832 100644 --- a/src/addon_d/extendedui_ui.lua +++ b/src/addon_d/extendedui_ui.lua @@ -22,6 +22,22 @@ function EXTENDEDUI_ON_CHECK_HIDE(frame, ctrl, argStr) end end +function EXTENDEDUI_ON_CHECK_UPDATE(frame, ctrl, argStr) + local frm = ui.GetFrame(argStr); + local chk = ctrl:IsChecked(); + + local eframe = extui.GetFrame(argStr); + if eframe then + extui.framepos[argStr].alwaysupdate = chk == 1 and true or false; + + if chk == 1 then + frm:RunUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); + else + frm:StopUpdateScript("EXTENDEDUI_FULLFRAME_UPDATE"); + end + end +end + function EXTENDEDUI_ON_CHECK_HOVER(frame, ctrl, argStr) local frm = ui.GetFrame(argStr); @@ -92,7 +108,7 @@ end function EXTENDEDUI_MINI_ON_SELECT(index) local s, bl = pcall(EXTENDEDUI_MINI_ON_SELECTD, index); if not(s) then - extui.print("ERROR: "..bl); + extui.print("[EUI] MiniOnSelect(): "..bl); end end @@ -182,7 +198,7 @@ function EXTENDEDUI_MINI_CREATE_DROPLIST() local t,p = pcall(EXTENDEDUI_MINI_CREATE_DROPLIST_S); if not(t) then - extui.print("EUI Error: "..tostring(p)); + extui.print("[EUI] CreateDroplist(): "..tostring(p)); end end @@ -453,7 +469,7 @@ end function EXTENDEDUI_ON_MINI_SAVE() local t,p = pcall(EXTENDEDUI_ON_MINI_SAVES); if not(t) then - extui.print("[EUI] Error: "..tostring(p)); + extui.print("[EUI] OnMiniSave(): "..tostring(p)); end return 1; @@ -521,7 +537,7 @@ function extui.PopulateMiniFrame(frm) ctrls:SetClickSound("button_click_big"); ctrls:SetOverSound("button_over"); ctrls:SetEventScript(ui.LBUTTONUP, "EXTENDEDUI_ON_OPTIONS"); - ctrls:SetImage("chat_option2_btn") + ctrls:SetImage("chat_option2_btn"); ctrls = frm:CreateOrGetControl("button", "extuiminiclose", 175, 85, 125, 30); ctrls = tolua.cast(ctrls, "ui::CButton"); @@ -601,8 +617,8 @@ function extui.MiniCreateSliderForFrame(inx, iny, gbox, v) ctrls = gbox:CreateOrGetControl("slidebar", "extuislidex", inx+12, iny, 300, 30); ctrls = tolua.cast(ctrls, "ui::CSlideBar"); - ctrls:SetMaxSlideLevel(ui.GetClientInitialWidth()); - ctrls:SetMinSlideLevel(0); + ctrls:SetMaxSlideLevel(ui.GetClientInitialWidth()*2); + --ctrls:SetMinSlideLevel(0); ctrls:SetLevel(x); ctrls:SetTextTooltip("{@st42b}"..extui.TLang("posxDesc").."{/}"); @@ -618,8 +634,8 @@ function extui.MiniCreateSliderForFrame(inx, iny, gbox, v) ctrls = gbox:CreateOrGetControl("slidebar", "extuislidey", inx+12, iny, 300, 30); ctrls = tolua.cast(ctrls, "ui::CSlideBar"); - ctrls:SetMaxSlideLevel(ui.GetClientInitialHeight()); - ctrls:SetMinSlideLevel(0); + ctrls:SetMaxSlideLevel(ui.GetClientInitialHeight()*2); + --ctrls:SetMinSlideLevel(0); ctrls:SetLevel(y); ctrls:SetTextTooltip("{@st42b}"..extui.TLang("posyDesc").."{/}"); @@ -704,11 +720,23 @@ function extui.MiniCreateSliderForFrame(inx, iny, gbox, v) ctrls:SetEventScript(ui.LBUTTONUP, "EXTENDEDUI_ON_CHECK_HOVER"); ctrls:SetEventScriptArgString(ui.LBUTTONUP, frame:GetName()); ctrls:SetCheck(extui.framepos[frame:GetName()].hover ~= nil and extui.framepos[frame:GetName()].hover or 0); - + iny = iny+25; + -- if this returns false it's a child frame, and those aren't supported for reset if extui.FrameExists(frame:GetName()) then + ctrls = gbox:CreateOrGetControl("checkbox", "extuicheckupdate", inx+10, iny, 150, 30); + ctrls = tolua.cast(ctrls, "ui::CCheckBox"); + ctrls:SetText("{@st42b}Always Update (Use when position randomly resets){/}"); + ctrls:SetClickSound("button_click_big"); + ctrls:SetOverSound("button_over"); + ctrls:SetEventScript(ui.LBUTTONUP, "EXTENDEDUI_ON_CHECK_UPDATE"); + ctrls:SetEventScriptArgString(ui.LBUTTONUP, frame:GetName()); + ctrls:SetCheck(extui.framepos[frame:GetName()].alwaysupdate ~= nil and extui.framepos[frame:GetName()].alwaysupdate or 0); + + iny = iny+25; + ctrls = gbox:CreateOrGetControl("button", "extuiframereset", inx+90, iny, 150, 30); ctrls = tolua.cast(ctrls, "ui::CButton"); ctrls:SetText("{@st66b}"..extui.TLang("resetFrame").."{/}"); @@ -856,41 +884,43 @@ function extui.ShowFrameBorder(parentFrame, childFrame) if borderParent ~= nil then borderParent:StopUpdateScript("EXTENDEDUI_FRAMEBORDER_UPDATE"); borderParent:RemoveAllChild(); - - pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); - AUTO_CAST(pic); + --pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); + + --AUTO_CAST(pic); --pic:CreateInstTexture(); else borderParent = ui.CreateNewFrame("extendedui", "extui_borderParent"); - pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); + --pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); - AUTO_CAST(pic); + --AUTO_CAST(pic); --pic:CreateInstTexture(); end borderParent:ShowWindow(1); borderParent:Resize(w+1 , h+1); borderParent:MoveFrame(x-1, y-1); - borderParent:SetSkinName("pip_gridbox"); + borderParent:SetSkinName("chat_window"); borderParent:EnableHitTest(1); borderParent:SetUserValue("FRAME_NAME", parentFrame.frameName); borderParent:SetUserValue("CHILD_NAME", "None"); borderParent:RunUpdateScript("EXTENDEDUI_FRAMEBORDER_UPDATE"); - pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); + --pic = borderParent:CreateOrGetControl("picture", "pic", 0, 0, w, h); - AUTO_CAST(pic); - pic:EnableHitTest(1); + --AUTO_CAST(pic); + --pic:EnableHitTest(1); + + borderParent:SetColorTone("88000000"); --pic:FillClonePicture("88000000"); if childFrame ~= nil then - --extui.DrawBorder(pic, 0, 0, w, h, "88FF0000"); + extui.DrawBorder(borderParent, 0, 0, w, h, "88FF0000"); else - --extui.DrawBorder(pic, 0, 0, w, h, "8800FF00"); + extui.DrawBorder(borderParent, 0, 0, w, h, "8800FF00"); end if childFrame ~= nil then @@ -901,7 +931,7 @@ function extui.ShowFrameBorder(parentFrame, childFrame) local xc = masterChildFrame:GetX(); local yc = masterChildFrame:GetY(); - --extui.DrawBorder(pic, xc, yc, wc, hc, "8800FF00"); + extui.DrawBorder(borderParent, xc, yc, wc, hc, "8800FF00"); borderParent:SetUserValue("CHILD_NAME", childFrame.frameName); end @@ -930,7 +960,7 @@ function EXTENDEDUI_FRAMEBORDER_UPDATE_S(border) local h = borderFrame:GetHeight(); local x = borderFrame:GetX(); local y = borderFrame:GetY(); - + if w < 5 then w = 5; end @@ -947,20 +977,21 @@ function EXTENDEDUI_FRAMEBORDER_UPDATE_S(border) borderFrm:Resize(w+1 , h+1); borderFrm:MoveFrame(x-1, y-1); - local pic = borderFrm:GetChild("pic"); - if pic:GetWidth() ~= w or pic:GetHeight() ~= h then + --local pic = borderFrm:GetChild("pic"); + --if pic:GetWidth() ~= w or pic:GetHeight() ~= h then - borderFrm:RemoveChild("pic"); + -- borderFrm:RemoveChild("pic"); - pic = borderFrm:CreateOrGetControl("picture", "pic", 0, 0, w, h); + --pic = borderFrm:CreateOrGetControl("picture", "pic", 0, 0, w, h); - AUTO_CAST(pic); + --AUTO_CAST(pic); --pic:CreateInstTexture(); - end + --end - AUTO_CAST(pic); + --AUTO_CAST(pic); + --borderFrm:SetColorTone("88000000"); --pic:FillClonePicture("88000000"); @@ -974,12 +1005,12 @@ function EXTENDEDUI_FRAMEBORDER_UPDATE_S(border) local xc = masterChildFrame:GetX(); local yc = masterChildFrame:GetY(); - --extui.DrawBorder(pic, 0, 0, w, h, "88FF0000"); - --extui.DrawBorder(pic, xc, yc, wc, hc, "8800FF00"); + extui.DrawBorder(borderFrm, 0, 0, w, h, "88FF0000"); + extui.DrawBorder(borderFrm, xc, yc, wc, hc, "8800FF00"); end else - --extui.DrawBorder(pic, 0, 0, w, h, "8800FF00"); + extui.DrawBorder(borderFrm, 0, 0, w, h, "8800FF00"); end end @@ -1135,20 +1166,36 @@ function extui.DrawGrid() local pic = extui.GridFrame:GetChild("pic"); AUTO_CAST(pic); - pic:FillClonePicture("22000000"); + pic:RemoveAllChild(); + - local gridColCount = extui.GridFrame:GetWidth()/extui.GridSize; - local gridRowCount = extui.GridFrame:GetHeight()/extui.GridSize; + local gridWidth = extui.GridFrame:GetWidth(); + local gridHeight = extui.GridFrame:GetHeight(); + + local gridColCount = gridWidth/extui.GridSize; + local gridRowCount = gridHeight/extui.GridSize; for _gy=0, gridRowCount, 1 do - pic:DrawBrush(0, extui.GridSize*_gy , extui.GridFrame:GetWidth(), (extui.GridSize*_gy)+1, "spray_1", "88FFFFFF"); + local line = extui.GridFrame:CreateOrGetControl("picture", "aa"..tostring(_gy), 0, extui.GridSize*_gy, gridWidth, 1); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone("88FFFFFF"); + + --pic:DrawBrush(0, extui.GridSize*_gy , extui.GridFrame:GetWidth(), (extui.GridSize*_gy)+1, "spray_1", "88FFFFFF"); end for _gx=0, gridColCount, 1 do - pic:DrawBrush(extui.GridSize*_gx, 0, (extui.GridSize*_gx)+1, extui.GridFrame:GetHeight(), "spray_1", "88FFFFFF"); + local line = extui.GridFrame:CreateOrGetControl("picture", "ab"..tostring(_gx), extui.GridSize*_gx, 0, 1, gridHeight); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone("88FFFFFF"); + + --pic:DrawBrush(extui.GridSize*_gx, 0, (extui.GridSize*_gx)+1, extui.GridFrame:GetHeight(), "spray_1", "88FFFFFF"); end end @@ -1165,23 +1212,21 @@ function extui.InitGrid() extui.GridFrame = ui.CreateNewFrame("extendedui", "EXTENDEDUI_GRIDFRAME"); extui.GridFrame:Resize(option.GetClientWidth()*2, option.GetClientHeight()*2); extui.GridFrame:MoveFrame(-1, -1); - extui.GridFrame:SetSkinName("None"); + extui.GridFrame:SetSkinName("chat_window"); extui.GridFrame:SetLayerLevel(-10000); local pic = extui.GridFrame:CreateOrGetControl("picture", "pic", 0, 0, extui.GridFrame:GetWidth(), extui.GridFrame:GetHeight()); - --tolua.cast(pic, "ui::CPicture") AUTO_CAST(pic); pic:EnableHitTest(1); - --pic:CreateInstTexture(); end extui.GridFrame:ShowWindow(1); - --extui.DrawGrid(); + extui.DrawGrid(); end @@ -1204,10 +1249,16 @@ function extui.resizeFrame(frameName, scale) for i = 0, cnt - 1 do local ctrl = frame:GetChildByIndex(i); - local ctrlScaleW = ctrl:GetOriginalWidth() * (scale/100); - local ctrlScaleH = ctrl:GetOriginalHeight() * (scale/100); + local oWidth = ctrl:GetOriginalWidth(); + local oHeight = ctrl:GetOriginalHeight(); + + local ctrlScaleW = oWidth * (scale/100); + local ctrlScaleH = oHeight * (scale/100); - --ctrl:SetOffset(ctrl:GetX(), y); + local offsetX = oWidth - ctrlScaleW; + local offsetY = oHeight - ctrlScaleH; + + ctrl:SetOffset(ctrl:GetX()-offsetX, ctrl:GetY()-offsetY); ctrl:Resize(ctrlScaleW, ctrlScaleH); end @@ -1312,7 +1363,6 @@ function extui.CheckForHovers() toc:StopUpdateScript("EUI_PROCESS_MOVE_FRAME"); - end end @@ -1344,10 +1394,10 @@ function EUI_PROCESS_MOVE_FRAME(frame) if extui.selectedChild ~= true then frame:ShowWindow(frame:GetUserValue("EUI_OLD_VISIBLE"), true); end - - extui.IsDragging = false; - frame:SetUserValue("EUI_IS_DRAGGING", 0); - frame:StopUpdateScript("EUI_PROCESS_MOVE_FRAME"); + + extui.IsDragging = false; + frame:SetUserValue("EUI_IS_DRAGGING", 0); + frame:StopUpdateScript("EUI_PROCESS_MOVE_FRAME"); return 0; end @@ -1396,4 +1446,4 @@ function EUI_PROCESS_MOVE_FRAME(frame) return 1; -end +end \ No newline at end of file diff --git a/src/addon_d/extendedui_util.lua b/src/addon_d/extendedui_util.lua index 8c1e3a1..1749f18 100644 --- a/src/addon_d/extendedui_util.lua +++ b/src/addon_d/extendedui_util.lua @@ -73,7 +73,8 @@ function extui.SaveSettings() for k,v in pairs(extui.lSettingsUI) do extui.ldSettingsUI[k] = v.val; end - acutil.saveJSON("../addons/extendedui/settings.json", extui.ldSettingsUI); + --acutil.saveJSON("../addons/extendedui/settings.json", extui.ldSettingsUI); + acutil.saveJSONX('extendedui/settings.json', extui.ldSettingsUI); end function extui.SavePositions() @@ -89,157 +90,100 @@ function extui.SavePositions() frmTbl[k] = v; frmTbl[k].hidden = (frmTbl[k].hidden==1 or frmTbl[k].hidden == true) and true or false; frmTbl[k].scale = frmTbl[k].scale or 100; - frmTbl[k].skin = frmTbl[k].skin or "@default"; - - frmTbl[k].skin = dictionary.ReplaceDicIDInCompStr(frmTbl[k].skin); end end - acutil.saveJSON("../addons/extendedui/frames.json", frmTbl); + --acutil.saveJSON("../addons/extendedui/frames.json", frmTbl); + acutil.saveJSONX('extendedui/frames.json', frmTbl); end -function extui.UpdateCheck() - local acutil = require("acutil"); - - local file, _err = io.open("../addons/extendedui/settings.extui", "r"); - - if file == nil then - - local tload, error = acutil.loadJSON("../addons/extendedui/settings.json"); - if not error then - extui.ldSettingsUI = tload; - end +function extui.LoadExternalFrameList() + local file, _err = io.open("../addons/extendedui/framelist.txt", "r"); + if file ~= nil then + for line in file:lines() do + if line:sub(1, 2) ~= "//" then + local k,v = string.match(line,"(%w+),(%w+)"); - tload, error = acutil.loadJSON("../addons/extendedui/frames.json"); - if not error then - for _,v in pairs(tload) do - v.hidden = (v.hidden==true) and 1 or 0; + extui.externalFrameList[k] = v; end - extui.framepos = tload; - else - EXTENDEDUI_ON_SAVE(); end + io.close(file); else + extui.SaveDefaultExternalFrameList(); + end +end - if file ~= nil then - for line in file:lines() do - local k,v = string.match(line,"(%w+),(%w+)"); - extui.ldSettingsUI[k] = extui.FromString(v); - end +--This also means EUI now supports translated names for frames +--However, by default EUI will only come with english +function extui.SaveDefaultExternalFrameList() + local file, _err = io.open("../addons/extendedui/framelist.txt", "w+"); + if file ~= nil then + io.write("//frame name, readable name (No Child Frames)"); + io.write("buff,Buffs"); + io.write("targetbuff,Target Buffs"); + io.write("minimizedalarm,Mini Guild Mission"); + io.write("fevorcombo,Fever Combo"); + io.write("joystickrestquickslot,Joystick Rest Quickslot"); + io.write("joystickquickslot,Joystick Quickslot"); + io.write("restquickslot,Rest Quickslot"); + io.write("quickslotnexpbar,Mouse/Keyboard Quickslot"); + io.write("durnotify,Durability"); + io.write("chatframe,Chat Window"); + io.write("chat,Chat Input"); + io.write("notice,Notice"); + io.write("targetinfo,Target Info"); + io.write("questinfoset_2,Quest Log"); + io.write("keypress,Tapping Key"); + io.write("ctrltargetui,CTRL Target Lock"); + io.write("partyinfo,Party"); + io.write("channel,Channel"); + io.write("sysmenu,Menu"); + io.write("headsupdisplay,Character Status"); + io.write("charbaseinfo,EXP Bars"); + io.write("playtime,Playtime"); + io.write("fps,FPS"); + io.write("castingbar,Castbar"); + io.write("minimap,Minimap"); + io.write("mapareatext,Minimap Area Text"); + io.write("minimap_outsidebutton,Minimap Buttons"); + io.write("time,Time"); + io.write("minimizedeventbanner,Event Banner"); + io.write("minimized_tp_button,TP Shop Button"); + io.write("minimized_godprotection_button,God Protect Button"); + io.write("openingameshopbtn,TP Item Button"); + io.write("minimized_event_progress_check_button,Seasonal Event Button"); + io.write("minimized_pvpmine_shop_button,Mercenary Shop Button"); + io.write("minimized_housing_promote_board,Personal Housing"); + io.write("minimized_guild_housing,Guild Housing"); + io.write("summonsinfo,Summon Info"); + + io.close(file); + end +end - io.close(file); - os.remove("../addons/extendedui/settings.extui"); - end +function extui.UpdateCheck() + local acutil = require("acutil"); - local file, _err = io.open("../addons/extendedui/frames.extui", "r"); - if file ~= nil then - local _str = file:read("*all"); - - if string.len(_str) > 1 then - - local version = 0; - - local opFrames = StringSplit(_str, "\n"); - for k,v in pairs(opFrames) do - if string.sub(v, 1, 2) == "//" then - version = 1; - else - if version == 0 then - local iFrames = StringSplit(v, ","); - - local name = iFrames[1]; - local x = extui.FromString(iFrames[2]); - local y = extui.FromString(iFrames[3]); - local w = extui.FromString(iFrames[4]); - local h = extui.FromString(iFrames[5]); - local hidden = (extui.FromString(iFrames[6])==true) and 1 or 0; - local hasChild = extui.FromString(iFrames[7]); - local childs = {}; - if hasChild then - local onL = 8; - while true do - local cname = iFrames[onL]; - - if cname == "0" then - break; - end - - local cx,cy = extui.FromString(iFrames[onL+1]), extui.FromString(iFrames[onL+2]); - - childs[cname] = { - ["x"] = cx, - ["y"] = cy, - }; - - onL = onL+3; - end - - end - - extui.framepos[name] = { - ["x"] = x, - ["y"] = y, - ["w"] = w, - ["h"] = h, - ["hidden"] = hidden, - ["child"] = childs, - }; - else - local iFrames = StringSplit(v, ","); - - local name = iFrames[1]; - local x = extui.FromString(iFrames[2]); - local y = extui.FromString(iFrames[3]); - local w = extui.FromString(iFrames[4]); - local h = extui.FromString(iFrames[5]); - local hidden = (extui.FromString(iFrames[6])==true) and 1 or 0; - local scale = extui.FromString(iFrames[7]); - local skin = iFrames[8]; - local hasChild = extui.FromString(iFrames[9]); - local childs = {}; - if hasChild then - local onL = 10; - while true do - local cname = iFrames[onL]; - - if cname == "0" then - break; - end - - local cx,cy = extui.FromString(iFrames[onL+1]), extui.FromString(iFrames[onL+2]); - - childs[cname] = { - ["x"] = cx, - ["y"] = cy, - }; - - onL = onL+3; - end - - end - - extui.framepos[name] = { - ["x"] = x, - ["y"] = y, - ["w"] = w, - ["h"] = h, - ["hidden"] = hidden, - ["skin"] = skin, - ["scale"] = scale, - ["child"] = childs, - }; - end - end - end - end + --local tload, error = acutil.loadJSON("../addons/extendedui/settings.json"); + local tload, error = acutil.loadJSONX("extendedui/settings.json"); + if not error then + extui.ldSettingsUI = tload; + end - io.close(file); - os.remove("../addons/extendedui/frames.extui"); + --tload, error = acutil.loadJSON("../addons/extendedui/frames.json"); + tload, error = acutil.loadJSONX("extendedui/frames.json"); + if not error then + for _,v in pairs(tload) do + v.hidden = (v.hidden==true) and 1 or 0; end + extui.framepos = tload; + else + EXTENDEDUI_ON_SAVE(); end + extui.language.LoadFile(); end @@ -248,7 +192,7 @@ end function EXTENDEDUI_ON_SAVE() local s, bl = pcall(extui.SavePositions); if not(s) then - extui.print("ERROR: "..bl); + extui.print("[EUI] OnSave(): "..bl); end end @@ -262,11 +206,43 @@ function extui.DrawBorder(pic, xPos, yPos, width, height, color) if height < 1 then height = 1; end - pic:DrawBrush(xPos, yPos, xPos+width, yPos, "spray_1", color); - pic:DrawBrush(xPos, yPos+height, xPos+width, yPos+height, "spray_1", color); + --pic:SetColorTone("88000000"); + + -- Top + local line = pic:CreateOrGetControl("picture", "aa"..tostring(color), xPos, yPos, width, 1); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone(color); + + + -- Bottom + line = pic:CreateOrGetControl("picture", "ab"..tostring(color), xPos, yPos+height, width, 1); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone(color); + + -- Left + line = pic:CreateOrGetControl("picture", "ac"..tostring(color), xPos, yPos, 1, height); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone(color); + + -- Right + line = pic:CreateOrGetControl("picture", "ad"..tostring(color), xPos+width, yPos, 1, height); + AUTO_CAST(line); + line:SetImage("fullwhite"); + line:SetEnableStretch(1); + line:SetColorTone(color); + + --pic:DrawBrush(xPos, yPos, xPos+width, yPos, "spray_1", color); + + --pic:DrawBrush(xPos, yPos+height, xPos+width, yPos+height, "spray_1", color); - pic:DrawBrush(xPos+width, yPos+height, xPos+width, yPos, "spray_1", color); + --pic:DrawBrush(xPos+width, yPos+height, xPos+width, yPos, "spray_1", color); - pic:DrawBrush(xPos, yPos+height, xPos, yPos, "spray_1", color); + --pic:DrawBrush(xPos, yPos+height, xPos, yPos, "spray_1", color); end