shuraken007 345 Report post Posted November 22, 2016 I offer to write here some questions/problems, refering to addon crafting. 1 Share this post Link to post Share on other sites
shuraken007 345 Report post Posted November 22, 2016 (edited) So.. mine first question. How to solve problem with elements out of scrollframe (but they are in scrollchild) which catch mouse events? look at this picture: scrollchild contains 5 long buttons, which width is more, then width of scrollframe and button become highlighting when mouse is righter then end of the scrollframe (near with scrollbar = slider) http://prntscr.com/dai2ik and when I scroll frame - button start catch mouse events from the left side (out of the scrollframe too) http://prntscr.com/dai308 (I meaned horizontal scroll) Edited November 22, 2016 by shuraken007 0 Share this post Link to post Share on other sites
Renew 26 Report post Posted November 22, 2016 post your code (pastebin) - dont know how you expect help without :? 0 Share this post Link to post Share on other sites
shuraken007 345 Report post Posted November 22, 2016 (edited) I think that the simplest version will look like next func function BuildTestScrollFrame() -----child local child = CreateFrame("Frame","TestChild", UIParent) child:SetWidth(300) child:SetHeight(200) local t = child:CreateTexture(nil, "BACKGROUND") t:SetTexture("Interface\\RaidFrame\\UI-RaidFrame-GroupBg.blp") t:SetAllPoints(child) child.texture = t -----ScrollFrame local ScrFrame = CreateFrame("ScrollFrame","TestScrollFrame",UIParent) ScrFrame:SetWidth(200) ScrFrame:SetHeight(200) ScrFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) ----Add child to ScrollFrame child:SetAllPoints(parent) ScrFrame:SetScrollChild(child) ----Slider local slider = CreateFrame("Slider", "TestSlider", ScrFrame) slider:SetBackdrop( { bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", tile = true, tileSize = 8, edgeSize = 8, insets = { left = 3, right = 3, top = 6, bottom = 6 }}) slider:SetOrientation("HORIZONTAL") slider:SetMinMaxValues(0, 300) slider:SetValue(0) slider:SetValueStep(1) slider:SetWidth(200) slider:SetHeight(25) slider:SetPoint("TOP", ScrFrame, "BOTTOM") slider:SetScript("OnValueChanged", function() this:GetParent():SetHorizontalScroll(-1 * this:GetValue()) end ) slider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") ---Button local testbutton = CreateFrame("Button" ,"TestButton", child, "UIPanelButtonTemplate") testbutton:SetWidth(300) testbutton:SetHeight(30) testbutton:EnableMouse(true) testbutton:SetPoint("LEFT", child, "LEFT", 10, 0) end http://prntscr.com/daj650 move mouse to that place where button cut - it will fire, it will be clickable there http://prntscr.com/daj70q Edited November 22, 2016 by shuraken007 0 Share this post Link to post Share on other sites
Renew 26 Report post Posted November 22, 2016 try this: function BuildTestScrollFrame() -----ScrollFrame local ScrFrame = CreateFrame("ScrollFrame","TestScrollFrame",UIParent) ScrFrame:SetWidth(200) ScrFrame:SetHeight(200) ScrFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) ----Add child to ScrollFrame -----child local child = CreateFrame("Frame","TestChild", ScrFrame) child:SetWidth(300) child:SetHeight(200) child.texture = child:CreateTexture(nil, "BACKGROUND") child.texture:SetTexture("Interface\\RaidFrame\\UI-RaidFrame-GroupBg.blp") child.texture:SetAllPoints(child) --child:SetAllPoints(parent) ?? parent ?? ScrFrame:SetScrollChild(child) ----Slider local slider = CreateFrame("Slider", "TestSlider", ScrFrame) slider:SetBackdrop( { bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", tile = true, tileSize = 8, edgeSize = 8, insets = { left = 3, right = 3, top = 6, bottom = 6 }}) slider:SetOrientation("HORIZONTAL") slider:SetMinMaxValues(0, 300) slider:SetValue(0) slider:SetValueStep(1) slider:SetWidth(200) slider:SetHeight(25) slider:SetPoint("TOP", ScrFrame, "BOTTOM") slider:SetScript("OnValueChanged", function() this:GetParent():SetHorizontalScroll(-1 * this:GetValue()) end ) slider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") ---Button local testbutton = CreateFrame("Button" ,"TestButton", child, "UIPanelButtonTemplate") testbutton:SetWidth(300) testbutton:SetHeight(30) testbutton:EnableMouse(true) testbutton:SetPoint("LEFT", child, "LEFT", 10, 0) end what did i do? changed the parent of the child to the scrollframe instead to UIParent 0 Share this post Link to post Share on other sites
shuraken007 345 Report post Posted November 22, 2016 (edited) nothing happend, have you tested? child:SetAllPoints(ScrFrame) made mistake on collecting pieces of code, parent was param in func Edited November 22, 2016 by shuraken007 0 Share this post Link to post Share on other sites
Renew 26 Report post Posted November 22, 2016 nothing happend, have you tested? child:SetAllPoints(ScrFrame) made mistake on collecting pieces of code, parent was param in func yes, i tested it and it solves your problem... 0 Share this post Link to post Share on other sites
shuraken007 345 Report post Posted November 22, 2016 (edited) Thank you, it's work. (probably havn't resave file last time) Killed 3 hours I think. Try other versions with changing hitrecktangle of button. Also tried to set that button to Scrollframe(with const size=width of scrollframe) and all strings on button anchor to child. But labels were on dark fone because button was over it. Looked through FauxScrollFrame. So.. thank you one time more). Edited November 22, 2016 by shuraken007 0 Share this post Link to post Share on other sites
killerduki 54 Report post Posted November 23, 2016 I love you guys have knowledge about stuffs, if you don't mind i can give you few examples of addons which are forgotten or mainly unknown for many regarding Shadow Priest and Paladin. The existent addons work for TBC++ expansions but for Vanilla there is problem within their own sources. Is it possible for you guys to rework that addons and set them according to Vanilla ? /Kind regards Killerduki 0 Share this post Link to post Share on other sites
shuraken007 345 Report post Posted November 23, 2016 (edited) depends on aim of addon and amount of work on rewriting Edited November 23, 2016 by shuraken007 0 Share this post Link to post Share on other sites