1. #1

    KgPanels Mouseoveractionbars

    Hello i need a lil hlp with KgPanels scripts.

    I use Dominos actionbars have and sideactionbar that apears just Mouseover. Now i want to bind my Kgpanels to that bar, so that on mouseover the bar apears with the Kgpanels border.
    What i managed to do till yet:1) Anchor the panel to actionbarbutton ( via framestack i cant get the name of the bar i get just the DominosActionButton 1)- now i had the texture/panel apearing on mouseover but not bound to actionbar and not moveable over it like other cases) 2) found a script for show kgpanel on mouseover-> does apear but just when im clicking near actionbar; i dosent apear simultaniously with actionbar.

    Ofc ideal setup for me would be a little button on side made via kgpanels on wich i click and actionbar apears similar to TukUi but thats to complicated i supose

    So pls help Dee make his Ui more sexxy and complete

  2. #2
    Deleted
    Try getting the bar's parent name:
    Code:
    /run print(FrameName:GetParent():GetName())
    (where FrameName is whatever name you get from the /framestack).

    Then, create a separate kgPanels button to show/hide your bar.
    OnLoad:
    Code:
    DominosParentName:Hide()
    kgPanels:FetchFrame("yourbackgroundpanelname"):Hide()
    self.isShown = false
    OnClick:
    Code:
    if not released then return end
    if self.isShown then
        kgPanels:FetchFrame("yourbackgroundpanelname"):Hide()
        DominosParentName:Hide()
        self.isShown = false
    else
        kgPanels:FetchFrame("yourbackgroundpanelname"):Show()
        DominosParentName:Show()
        self.isShown = true
    end
    Replace DominosParentName and yourbackgroundpanelname.

  3. #3
    Scarab Lord
    15+ Year Old Account
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    4,040
    I've never had luck parenting to the "bars" for Dominos or Bartender - but parent to a BUTTON on the bar instead.

    Also, the LUI and TukUI style sliding open/close panel has generic instructions here.

  4. #4
    /run print(MultiBarRightButton1:GetParent():GetName())

    that's what i type into chat and rezult iz : "nil" so there is smthink wrg but no idea what

    ---------- Post added 2011-09-02 at 06:32 PM ----------

    wow the guide is defo niiice il check it out

  5. #5
    Scarab Lord
    15+ Year Old Account
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    4,040
    Also, in kgPanels, in that panel's config, just set the parent of the panel to MultiBarRightButton1 - that should do what you want.

  6. #6
    yes the guide is imba and seems to work only problem is i still didnt get the name of dominos actionbars... ( Im mean it works for BT4Bar10 from bartender but i cnat get same code for dominos dono why ( just that silly DominosActionButton1 help dee pls

  7. #7
    Deleted
    Does anyone read my post?

    Code:
    /run print(DominosActionButton1:GetParent():GetName())

  8. #8
    yes ofc i read it but maby im to nab to understand or dono. Now i used the code:

    /run print(DominosActionButton1:GetParent():GetName()) ; what you linked

    i run, type it in chat but the answer is still "nil" and cant get it why it dosent work? sry if it sounds dumb but i do type it in chat ? not in other places

    srry for beeing annoying but im not so familiar with scripting stuff

  9. #9
    Deleted
    Meh, that means that the parent actually doesn't have a name and most likely isn't globally accessible. Sigh.

    You can always go for BT4 instead of Dominos, which has nicely accessible bar parents.

  10. #10
    Grunt Gillyann's Avatar
    10+ Year Old Account
    Join Date
    Feb 2012
    Location
    Planet Earth... I think.
    Posts
    14
    Hi!

    I know this thread is kind of old and I'm not sure if there are any others out there for this, I found this one via googling. But, I've just attempted to create a open/close panel via the instructions that Taryble gave/linked. I'm actually using them for Recount rather than Bartender (I figured that the scripting would not change much unless I chose to use different names...). When I put everything in, including the scripting I got this error:

    Code:
    Message: Interface\FrameXML\UIParent.lua:2908: attempt to index local 'region' (a nil value)
    Time: 06/07/12 00:14:21
    Count: 2902
    Stack: [C]: ?
    Interface\FrameXML\UIParent.lua:2908: in function `MouseIsOver'
    [string "openbutton_OnUpdate"]:2: in function <[string "openbutton_OnUpdate"]:1>
    
    Locals:
    Does anyone have an idea on how to fix that? (I am a absolute newb with scripting and .lua)
    Last edited by Gillyann; 2012-06-07 at 04:47 PM.

  11. #11
    Deleted
    Paste your script, please (use [code] tags).

  12. #12
    I tried using Dominoes with KgPanel's but a lot of the time Dominoes would not work like I wanted it to when it came to scripting so I switched to Bartender which works so I would recommend doing the same.

  13. #13
    Grunt Gillyann's Avatar
    10+ Year Old Account
    Join Date
    Feb 2012
    Location
    Planet Earth... I think.
    Posts
    14
    Quote Originally Posted by InfernoXV8 View Post
    I tried using Dominoes with KgPanel's but a lot of the time Dominoes would not work like I wanted it to when it came to scripting so I switched to Bartender which works so I would recommend doing the same.
    I'm not using Dominoes for this, it's Recount. I've already figured out how to parent a frame to Bartender 4.

    Quote Originally Posted by Treeston View Post
    Paste your script, please (use [code] tags).
    My apologies, I used the Quick Reply option and couldn't find the code tags. Please, keep in mind that I'm using the link that Taryble posted back on 9/2/11 for how to set it all up. I've used
    Code:
    /fstack
    to get the name of the window I want to Parent and so I can change the scripting's name as needed.

    In the <Onload> scripting area of the panel for "openbutton", I put:

    Code:
    UI_OpenButtonTextAlpha = 1
    Recount_MainWindow:Hide()
    Then under that same panel's scripting area for <OnUpdate>, I put this:

    Code:
    local frame = kgPanels:FetchFrame("OpenButton")
    	if MouseIsOver( frame ) then
    	    self.text:SetTextColor(1,1,1)
    	    UI_OpenButtonTextAlpha = 1
    	    else
    	    if UI_OpenButtonTextAlpha > 0 then
    	   	 self.text:SetTextColor(1,1,1,UI_OpenButtonTextAlpha)
    	    if UI_OpenButtonTextAlpha < 0 then
    	   	 UI_OpenButtonTextAlpha = 0 else
    	   	 UI_OpenButtonTextAlpha= UI_OpenButtonTextAlpha - 0.1
    	    end
    	end
    end
    That is where I get the error message I originally posted.

  14. #14
    Deleted
    Are you sure your panel is called "OpenButton"? The FetchFrame return seems to be nil.

    Code:
    local frame = kgPanels:FetchFrame("OpenButton")
    if MouseIsOver( frame ) then
        self.text:SetTextColor(1,1,1)
        UI_OpenButtonTextAlpha = 1
    else
        if UI_OpenButtonTextAlpha > 0 then
       	self.text:SetTextColor(1,1,1,UI_OpenButtonTextAlpha)
            if UI_OpenButtonTextAlpha < 0 then
                UI_OpenButtonTextAlpha = 0
            else
    	    UI_OpenButtonTextAlpha= UI_OpenButtonTextAlpha - 0.1
    	end
        end
    end
    The underlined part will never fire (UI_OpenButtonTextAlpha cannot be below and above zero at the same time).



    Also, you use some unnecessary globals and doing a perpetous OnUpdate is not efficient. This is a more efficient version I made up for you:

    OnLoad:
    Code:
    Recount_MainWindow:Hide()
    self.updateFrame = CreateFrame("Frame",nil,self)
    self.updateFrame:Hide()
    self.updateFrame.parent = self
    self.updateFrame:SetScript("OnUpdate",function(s)
        if s.textAlpha > 0 then
            s.parent.text:SetTextColor(1,1,1,s.textAlpha)
            s.textAlpha = s.textAlpha-0.1
        else
            s:Hide()
        end
    end)
    OnEnter:
    Code:
    self.updateFrame.textAlpha = 1
    self.text:SetTextColor(1,1,1)
    OnLeave:
    Code:
    self.updateFrame:Show()
    Should do essentially the same with less resources used.

  15. #15
    Grunt Gillyann's Avatar
    10+ Year Old Account
    Join Date
    Feb 2012
    Location
    Planet Earth... I think.
    Posts
    14
    Thank you so much Treeston. That did indeed get rid of the error messages. Unfortunately now nothing happens.

    i690.photobucket.com/albums/vv262/CeciliaMarie16/PrivateAlbumisPrivate/Bunny-HitHeadAgainstWall.gif

    I'm at a loss as to how to make this all work and I played with your scripting to see if that would work on my other two panels. And, no. I'm debating if this will help:

    i690.photobucket.com/albums/vv262/CeciliaMarie16/PrivateAlbumisPrivate/Bunny-beatupWall.gif

    argh, darn the no link until more posting is done rule, lol.

  16. #16
    Deleted
    Add a debug line to the OnUpdate definition:
    Code:
    self.updateFrame:SetScript("OnUpdate",function(s)
        print(s.textAlpha)
        if s.textAlpha > 0 then
    PS: If that doesn't do anything, add one to the OnEnter and OnLeave scripts, too.
    Last edited by mmocba105e19de; 2012-06-08 at 08:18 AM.

  17. #17
    Grunt Gillyann's Avatar
    10+ Year Old Account
    Join Date
    Feb 2012
    Location
    Planet Earth... I think.
    Posts
    14
    Thank you so much Treeston! It works great! *does happy dance*
    /hugs Treeston

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •