I think you would need to do something like registering the chat message events, then any time an event is sent, start a 60 second timer, when that runs out, hide the panel - obviously on the event you would also need to make it show the panel.
There's quite a few things you'd need to do, but I think that should be it really, though I could be missing something about how kgPanels works, as I've not been using it long.
Not sure if this issue is due to 4.1 but no matter what I am doing after loading a tga background it comes out green. I have not seen the issue anywhere.
I am using the same technique as here to create my tga files and load them in and still all I get is green.
kgPanels is awesome and I actually use almost 90% of your other modded addons lol
yea I think I got it even though my size was a multiple of 2 it just wasn't liking the size I changed it and it it works just fine now *weird* lol... Now I just need to figure out where to get scripts for opening guild panel ... guild achievement window and maybe even locate an addon to view guild level (trying to for a whole unique UI approach... If I knew the first thing about coding I'd be great but I am just a graphic designer so I make pretty not working lol
here is the issue, since 4.1 if the .tga in question isnt in a directory containing a loaded addon, the game api wont always load it. part of thier new memory management. I had the same issue with an icon till i dropped it into an addon which would load (I used my own texture pack, to add it to libsharedmedia directly
here is the issue, since 4.1 if the .tga in question isnt in a directory containing a loaded addon, the game api wont always load it. part of thier new memory management. I had the same issue with an icon till i dropped it into an addon which would load (I used my own texture pack, to add it to libsharedmedia directly
If we were to add a folder to your addon folder would it work or would that delete the files if we updated to a new version?
I assume you'll need to create a mini-addon for your textures folder. If you do not know how to create a TOC file...
1. Open Notepad, Wordpad, whatever.
2. Copy in the following:
##Interface: 40100
##Title: My Textures
##Notes: Textures for kgPanels
3. In the "Save" window, save the file to the texture folder with the exact same name as the folder. Give it the file extension of .toc - so if your folder is named MyTextureFolder, your TOC file will be named MyTextureFolder.toc ***Note: depending on the editor you use, you may need to set it to "All Files (*.*)" in its extension drop down first.
4. Log into the game - you should see your "addon" listed in the AddOns menu at the character select screen. (If you don't see it, make sure that you were fully exited out of the game when creating it, and that the TOC file name matches the folder name - yes, it's case-sensitive.)
As long as your "addon" is enabled, the game should load your textures. /edit: this is all assumption - I use SharedMedia and MyMedia for my textures.
I assume you'll need to create a mini-addon for your textures folder. If you do not know how to create a TOC file...
1. Open Notepad, Wordpad, whatever.
2. Copy in the following:
3. In the "Save" window, save the file to the texture folder with the exact same name as the folder. Give it the file extension of .toc - so if your folder is named MyTextureFolder, your TOC file will be named MyTextureFolder.toc ***Note: depending on the editor you use, you may need to set it to "All Files (*.*)" in its extension drop down first.
4. Log into the game - you should see your "addon" listed in the AddOns menu at the character select screen. (If you don't see it, make sure that you were fully exited out of the game when creating it, and that the TOC file name matches the folder name - yes, it's case-sensitive.)
As long as your "addon" is enabled, the game should load your textures. /edit: this is all assumption - I use SharedMedia and MyMedia for my textures.
If that doesn't work, someone else pointed out that they noticed this problem when having two copies of the same image (ex, one as a .png and one as a .tga)
Someone at WoWUIGallery had asked about the micro menu in the RealUI. Although the author uses his own addon to create the texted based micro menu, this can be done in kgpanels pretty easily.
(I'll use the character frame as an example)
Simply create a panel. Use whatever border and background you want. For the sake of this information, create a panel 32 X 32.
Goto the text options and put in "C" w/o the ". Depending on what font you are using adjust the size if need be. Adjust the color if need be.
Go back to the main panel settings. Click on Intercept Mouse clicks. If not checked the script will not work.
Goto the scripts options. Go down to OnClick. Type in
if pressed then
ToggleCharacter("PaperDollFrame")
end
Click Accept.
You should now have a small square with a C in the middle. If you click it, it should open the Character Frame. Click it again to close.
That's all there is too it. Below I've listed the toggles for various frames:
If anyone has any questions, cares, concerns please let me know.
Thanks for this code it made my day.
I am working on a ui for my friend, they want me to take thier current ui and add textures and skins to it. While doing this I noticed they have thier micro menu button active and it looks bad as the buttons do not skin with any addons ive tried.
So based on your code I did something similar to lui v3 and realui, where I created my own buttons (basically just a set of flat icons)
and used the code to bring em to life and they are working great aside from a little issue with the raid/game menu/spellbook buttons.
My biggest question:
I need to make 2 buttons total one that controls the toggle of the character frame and one that not only controls the toggle of the character frame but also acts as a highlight (or mouseover/hover)
The character button I have created is a:
40x40 panel, class colored with a custom image. I titled the panel mm (C) button, the current script:
OnClick:
if pressed then
ToggleCharacter("PaperDollFrame")
end
The character button hover:
40x40 panel darker class colored with the same custom image. I titled the panel mm (C) hover, It meeds a script to allow the button to only show on mouseover/hover (pretty much just need this to be a highlight that will still toggle the character frame in game.)
Issue with the raid button:
This one isnt really a big deal but if it can be fixed why not.
The raid button I made works 1/2 way. When I just log in or do a /reload and then click the raid button it takes me to the friends frame. After reaching the friends frame from click my kg button, I then click the raid tab, after this when I click the raid button again it will now correctly toggle the raid frame, as soon as I log out or do a /reload the raid button will begin toggling the friends frame. here is the /fstack
Raid button:
40x40 panel, class colored with a custom image. I titled the panel mm (R) button, the current script:
OnClick:
if pressed then
ToggleFriendsFrame(RaidTab)
end
I did try a couple different scripts after I got this bug:
Doesnt toggle:
if pressed then
ToggleRaidFrame(RaidTab)
end
Toggles the same way as the 1/2 way code:
if pressed then
ToggleFriendsFrame(RaidTab4)
end
Issue with the menu button:
This one isnt really a big deal but if it can be fixed why not. For some reason all the panels make a sound when you open them but this one doesnt, not sure why.
The menu button:
40x40 panel, class colored with a custom image. I titled the panel mm (M) button, the current script:
OnClick:
if pressed then
ToggleFrame(GameMenuFrame)
end
Issue with the spellbook button:
For some reason when I just log on or after a reload if I open my spellbook via keybind(p) and click any spell it works fine, however if I open my spellbook via the micro menu it gives me the disable/ignore addon box when I try and cast a spell from the book not even a reload fixes this, it happens 100% of the time.
Spellbook button:
40x40 panel, class colored with a custom image. I titled the panel mm (S) button, the current script:
OnClick:
if pressed then
ToggleSpellBook("spell")
end
I would appreciate any help and thanks in advance. =D
=My biggest question:
I need to make 2 buttons total one that controls the toggle of the character frame and one that not only controls the toggle of the character frame but also acts as a highlight (or mouseover/hover)
I figured this out with a ton of searching and help from Akryn. This button script is used to toggle a micro menu button such as the help button and to create a highlight for the button to indicate mouse over.
I made a button with some customs image I created and borrowed. The result/settings:
I made the icon of the person using photoshop. I borrowed the button look from button facade renaitre.
To get the character button to toggle(this goes on your main button:
OnClick:
if pressed then
ToggleCharacter("PaperDollFrame")
end
To get the highlight to toggle (this goes on your highlight panel):
OnLoad:
1. I was wondering if there was a way to display info on the panels for example, I know there is a way to display gold with kgpanels, but can you take that a little farther. Essentially I used to use sldata text but is has not been updated for some time now. What I am looking to do is create about 6 panels.
2. Is there a way to have a button or panel reference a tool tip. For example, I recently made the 12 micro menu buttons through kgpanels and they work for the most part see the 2 previous comments (I am still having trouble with the spellbook/raid/gamemenu buttons). Any how my goal when mousing over the micro menu buttons and my gold/time/info buttons is to have a tooltip show up.
Thanks for responding. I am not so good with coding/scripting, I just started. What I should have asked, is how do I code the following? Here is where my mind went. I dont know if im close to the answer or far from it.
2. time/date (shows server time always unless mouse over then it shows local time:
local mail=GetMail()
(if "NewMail" then
self.text:SetText("NEW MAIL") else
if "OldMail" then
self.text:SetText("NO MAIL") end)
OnUpdate:
local mail=GetMail()
(if "NewMail" then
self.text:SetText("NEW MAIL") else
if "OldMail" then
self.text:SetText("NO MAIL") end)
The tooltip is for my micro menu buttons, I think you need some sort of onload, onenter, onleave script. Not sure how to code this one though.
The way I have it set is for the highlight panel to show on mouse over and onclick to toggle the micro button, I also need it to show the tooltip of the matching microbutton on mouseover. I am lost on this one can you point me in the right direction.
if event == "PLAYER_REGEN_ENABLED" then
self:SetFrameStrata = Tooltip
elseif event == "PLAYER_REGEN_DISABLED" then
self:SetFrameStrata = Background
end
There's quite a few things you'd need to do, but I think that should be it really, though I could be missing something about how kgPanels works, as I've not been using it long.
I am using the same technique as here to create my tga files and load them in and still all I get is green.
kgPanels is awesome and I actually use almost 90% of your other modded addons lol
Thanks in advanced for the help ;D
D'oh lol I've always been bad at math lol
If we were to add a folder to your addon folder would it work or would that delete the files if we updated to a new version?
1. Open Notepad, Wordpad, whatever.
2. Copy in the following:
3. In the "Save" window, save the file to the texture folder with the exact same name as the folder. Give it the file extension of .toc - so if your folder is named MyTextureFolder, your TOC file will be named MyTextureFolder.toc ***Note: depending on the editor you use, you may need to set it to "All Files (*.*)" in its extension drop down first.
4. Log into the game - you should see your "addon" listed in the AddOns menu at the character select screen. (If you don't see it, make sure that you were fully exited out of the game when creating it, and that the TOC file name matches the folder name - yes, it's case-sensitive.)
As long as your "addon" is enabled, the game should load your textures. /edit: this is all assumption - I use SharedMedia and MyMedia for my textures.
Cool thanks
Thanks for this code it made my day.
I am working on a ui for my friend, they want me to take thier current ui and add textures and skins to it. While doing this I noticed they have thier micro menu button active and it looks bad as the buttons do not skin with any addons ive tried.
So based on your code I did something similar to lui v3 and realui, where I created my own buttons (basically just a set of flat icons)
and used the code to bring em to life and they are working great aside from a little issue with the raid/game menu/spellbook buttons.
My biggest question:
I need to make 2 buttons total one that controls the toggle of the character frame and one that not only controls the toggle of the character frame but also acts as a highlight (or mouseover/hover)
The character button I have created is a:
40x40 panel, class colored with a custom image. I titled the panel mm (C) button, the current script:
OnClick:
The character button hover:
40x40 panel darker class colored with the same custom image. I titled the panel mm (C) hover, It meeds a script to allow the button to only show on mouseover/hover (pretty much just need this to be a highlight that will still toggle the character frame in game.)
Issue with the raid button:
This one isnt really a big deal but if it can be fixed why not.
The raid button I made works 1/2 way. When I just log in or do a /reload and then click the raid button it takes me to the friends frame. After reaching the friends frame from click my kg button, I then click the raid tab, after this when I click the raid button again it will now correctly toggle the raid frame, as soon as I log out or do a /reload the raid button will begin toggling the friends frame. here is the /fstack
Raid button:
40x40 panel, class colored with a custom image. I titled the panel mm (R) button, the current script:
OnClick:
I did try a couple different scripts after I got this bug:
Doesnt toggle:
Toggles the same way as the 1/2 way code:
Issue with the menu button:
This one isnt really a big deal but if it can be fixed why not. For some reason all the panels make a sound when you open them but this one doesnt, not sure why.
The menu button:
40x40 panel, class colored with a custom image. I titled the panel mm (M) button, the current script:
OnClick:
Issue with the spellbook button:
For some reason when I just log on or after a reload if I open my spellbook via keybind(p) and click any spell it works fine, however if I open my spellbook via the micro menu it gives me the disable/ignore addon box when I try and cast a spell from the book not even a reload fixes this, it happens 100% of the time.
Spellbook button:
40x40 panel, class colored with a custom image. I titled the panel mm (S) button, the current script:
OnClick:
I would appreciate any help and thanks in advance. =D
I figured this out with a ton of searching and help from Akryn. This button script is used to toggle a micro menu button such as the help button and to create a highlight for the button to indicate mouse over.
I made a button with some customs image I created and borrowed. The result/settings:
I made the icon of the person using photoshop. I borrowed the button look from button facade renaitre.
To get the character button to toggle(this goes on your main button:
OnClick:
To get the highlight to toggle (this goes on your highlight panel):
OnLoad:
OnEnter:
OnLeave:
1. I was wondering if there was a way to display info on the panels for example, I know there is a way to display gold with kgpanels, but can you take that a little farther. Essentially I used to use sldata text but is has not been updated for some time now. What I am looking to do is create about 6 panels.
1. gold
2. time/date
3. location
4. durability
5. mail
6. currency (justice/valor/honor etc) pts.
2. Is there a way to have a button or panel reference a tool tip. For example, I recently made the 12 micro menu buttons through kgpanels and they work for the most part see the 2 previous comments (I am still having trouble with the spellbook/raid/gamemenu buttons). Any how my goal when mousing over the micro menu buttons and my gold/time/info buttons is to have a tooltip show up.
2. time/date (shows server time always unless mouse over then it shows local time:
OnLoad:
OnEvent
OnEnter:
OnEnter:
3. location
OnLoad:
OnEvent:
OnUpdate:
4. durability
OnEvent:
OnUpdate:
5. mail
OnLoad:
OnEvent:
OnUpdate:
The tooltip is for my micro menu buttons, I think you need some sort of onload, onenter, onleave script. Not sure how to code this one though.
The way I have it set is for the highlight panel to show on mouse over and onclick to toggle the micro button, I also need it to show the tooltip of the matching microbutton on mouseover. I am lost on this one can you point me in the right direction.
I'm trying to get my panel to set the frame strata when i enter combat
OnLoad
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
OnEvent
if event == "PLAYER_REGEN_ENABLED" then
self:SetFrameStrata = Tooltip
elseif event == "PLAYER_REGEN_DISABLED" then
self:SetFrameStrata = Background
end
plz help thx in advance
etc.