Helps with Kgpanels!
Hi all!.
I am trying to remove databroker addons and use kgpanels with scrpts for my interface. I want put a part of the text in class colored, and the other in white. At this point I have that cripts. On load: Quote:
Quote:
¿Can be posible text color like the example?: Thx to all!! |
In OnUpdate:
local fps = "|c00FFFFFF".. string.format("%0.i", GetFramerate()) .. " |rfps" self.text:SetText(fps) Edit: A description of escape sequences: http://www.wowpedia.org/UI_escape_sequences |
Quote:
|
Instead of:
Code:
local fps = "|c00FFFFFF".. string.format("%0.i", GetFramerate()) .. " |rfps" Code:
self.text:SetFormattedText("|cffffffff%0.i|r fps", GetFramerate()) Also, string.format can handle plain text, so you should just put all your text in the format string, instead of performing multiple concatenation operations and creating more strings. Finally, in your original code, FPS_UPDATE and FPS_RATE are defined global variables. You should avoid putting anything into the global namespace unless it's absolutely necessary, and when you do, make sure the names are unique (so, not FPS_RATE which is very generic and likely to collide with other addons leaking globals) and clearly identify them as belonging to your addon. In this case, it's not necessary, so you should not make them globals: Code:
local font, size, flags = self.text:GetFont() Code:
self.update = self.update + elapsed |
Thx!, its very frustrating... I want do a lot of modificatons in my interface.... but I dont have no Idea of lua... I have a lot of questions... If maybe Someone can help me via skype voice client program or chat or something... I would be very grateful
Thanks for the help. |
Posting questions here should get you all the help you need and it will be available to help others as well as Phanxs correction of my interpretaion of your problem has helped me find a more efficient way of doing things.
|
Okok, I understand.
can someone help me with that question?¿ http://www.wowinterface.com/forums/s...92&postcount=4 I have a lot of questions more: 1. How can I do for One click (on kgpanels) open the bags, and one click more close the bags.? 2. how can I do for 1 click (on kgpanels) open the calendar, and one click close the calendar.? 3. how can I do for a panel that show me the gold in that format?: 111g 111s 111c? 4. how can i do for panel of cords with xx, yy format? I have a lot of more questions but for now is enought, I think that be usefull for me and a lot of people too. Thanks!! |
I can show you what I do with Discord Art which might be addaptable to KgPanels.
For displaying money, in on OnUpdate script Code:
local m = GetMoney() Code:
In an OnLoad Script: Code:
if event == "MINIMAP_ZONE_CHANGED" then Code:
if self.needZoneUpdate and not WorldMapFrame:IsVisible() then Code:
OpenAllBags() Code:
if CalendarFrame:IsVisible() then |
Quote:
Code:
if pressed then ToggleAllBags() end Quote:
Code:
if pressed then Calendar_Toggle() end Quote:
|
Ok, Thanks for all the help!!.
I try to aply the changes I said something when I do it. |
For the calendar it would be better to use Calendar_Toggle() than what I posted. I didn't know the function existed as it's not documented at wowprogramming.com or wowpedia.org.
The reason I use DART and not an info bar is because I haven't found one that offers all the colouring options I want. Fussy of me I know but that's the nature of the Fizzle. |
Quote:
|
Quote:
Lua not being my most proficient language, as you have pointed out on several occaisions (thank you), I doubt I would do a better job anyway. |
Hello all again!!
I was away from the computer for unavoidable causes. Now I have time .... and questions ... Sorry if I am very picky ... 1º Make a clock with no military time (aka 12 hours), example: 12:34 am. 2º Can be possible a panel with Zone and Subzone text, with color variation depending of the type of zone (PvP, Sanctuary, City etc.), for example: Zone, Subzone (hostile) Zone, Subzone (in sanctuary) Zone, Subzone (non hostile) Etc... 3º maybe that be imposible... or very hard: ¿Can be posible a panel that show me the memory usage of the addons?, and when I mouse over it show me a tooltip with a list of the Addons with that format? for example: ________ | 10 MB | <---- Mouseover (tootip) --------- Kgpanels config 2.8 MB Kgpanels 711KB. etc etc I want to centralize everything I can in the kgpanels. Thanks!!! |
Again, I just don't get why you are spending all this time and energy bending kgPanels to this purpose, instead of just using a Broker display addon that already exists, with any of the many Broker plugins that already exist to show you time, memory usage, and zone info.
|
Quote:
Each addon need 200KB ~, with functions that I dont use, I think that 5 or 6 lines of code, be better in general, for less CPU / Memory usage. I dont have a lot of idea of lua code...I wish I was able to do it myself ... looking for internet forums, I do not bring any solution, I'm asking here as a last resort trying to disturb as little as possible ... Sorry. |
Is your computer running short on memory? ;) Wanting to learn how to code is perfectly fine - though if that were the case we would still encourage you to create standalone addons instead of using kgPanels. But if all you're worried about is saving 1MB in memory? :) (Which, actually, I'm not even certain the plugins each take 200kb+)
|
Personally I've found it quite handy to use Discord Art to do this sort of thing but I'm already using it for other things as well.
Anyway Akatosh if you decide to proceed with KgPanels here's the code for a clock. Code:
local minutes, hour, minute |
Quote:
|
Essentially what I've given you is the variable called "text" that contains the information you want.
The following line needs to be replaced using whatever KgPanels does to update the display with the information from this "text" variable. -- do whatever KgPanels uses to update the display with "text" if self.text:SetText(gold .. "g " .. silver .. "s " .. m - (10000*gold) - (100*silver) .. "c") worked with your gold display then try: self.text:SetText(text) |
Quote:
For the text of gold I use that, and works fine, (atleast for me). Quote:
Quote:
Edit: ok ok now understood! Quote:
Thanks!! Edit2: Quote:
Quote:
Thanks!! |
If you are going to do it this way you can delete the line:
"local text" as you are not using the variable named text in your script ;). |
Quote:
|
Quote:
The part of "OnLoad" be the some. Now in OnUpdate: Quote:
|
News!
I modify the codes that Phanx and Fizzlemizz provided to me (thanks), I explain, with one of the codes, the calendar works, but only when previously I loaded it manually the blizzard calendar with "/calendar", with the other code, when I click the panel, the frame of calendar only shows the time that I "mouse down" when I "mouse up", the frame disappear. I try to modify the codes viewing codes of brokers and other lua relationated codes of calendar. Finaly I got this: Quote:
Thanks for all slowly, I am learning a lot and... I like! |
Hi!.
I have new questions!. I want make a zonetext panels colored by pvp status. I find information for other lua codes and for now I have this (Dont work of course Xddddd). OnLoad Quote:
Quote:
1º:a class colored text based on pvp status, I extract that lua code, maybe can be usefull: Quote:
2º: When I enter in a zone with no subzone appear only the Main zone, for example, I enter on Dalaran, appear "Dalaran, Dalaran", When the correct be that only appear 1 dalaran: "Dalaran". Any help will be greatly appreciated Thanks!!! |
If you weant sub-zone information you will also need to register "ZONE_CHANGED".
The "ZONE_CHANGED_NEW_AREA" event fires whe you cross zone borders and "ZONE_CHANGED" when you cross unto a new sub-zone. You might also want to register "ZONE_CHANGED_INDOORS" which is trggered when you go from inside to out or outside to in. You can find the list of zone related functions at WowProgramming. |
Quote:
I added to "Onload" section. If you can help me with colored text.... ¿how can I do for do a text colored zonetext based on pvp status?. I have this base code maybe can help: Quote:
2º: When I enter in a zone with no subzone appear only the Main zone, for example, I enter on Dalaran, appear "Dalaran, Dalaran", When the correct be that only appear 1 dalaran: "Dalaran". A lot of Thanks Fizzlemizz. |
The code appears to be only part of a function for getting the appropriate colour. It also seems to asume the the alpha chanel will be set elsewhere but I'll change to set it here
Code:
local col Code:
local zone, subzone |
Is the following what you are looking for?
For the multi-zone feature you should note that ALL GetZone functions return the Zone if there is no Sub-Zone. The colors are a tad tricky but if those are the accepted values then that works. If you're more comfortable with one single object then replace the 'return string.format' with 'self.text:SetFormattedText'. Code:
local pvpType, _, faction = GetZonePVPInfo() |
I was just about to post something similar. I changed the returns because Akatosh is using this in a KgPanels script not as a standalone function. Also changed a bit because sub can be blank.
Code:
if sub == "" then |
Quote:
Quote:
Hi all a lot of thanks!!!!, I am very happy. It works... not exactly one of other... a mix of the two: Quote:
I put OnClick: Quote:
|
Quote:
That is why I mentioned SetFormattedText(). It does the SetText() as if it were string.format(). Thanks for correcting me Fizz, GetSubZoneText() does indeed return an empty string. I also have a tip on appearance, one could move the color escape '|r' and nestle it between the two zones; this would result in only the major zone being colored. Here's an example with a correction of my code with Fizz's fix. Stormwind, Dwarven District Code:
if sub == "" then |
Hello again!, again I have questions!.
I see the broker "RaidBuffs", and explore the code. Dont apperar a lot of dificult... I understand it a bit. The problem be that, I dont have idea, How can I adap It, to a panel for kgpanels, I think that be posible do it. See if you can make it work!!! The code: Quote:
The first part appear something like a register of class and their buff, the second part appear a count of the buffs, the third be the tooltip, And finally the number of current buffs and total buffs. He looks like that with the broker ¿¿You can make it work for kgpanels?? A lot of thanks!! PD: whats the diference betwen "{ or }" and "( or )" |
Please use [code] tags around code blocks, not [quote] tags -- the latter does not preserve indentation, and makes the code annoyingly difficult to read.
Quote:
Code:
-- Indexed table, array, or list: Code:
-- This: Code:
function DoSomething(thisVar, thatVar, otherVar) |
I see the broker "RaidBuffs", and explore the code.
Dont apperar a lot of dificult... I understand it a bit. The problem be that, I dont have idea, How can I adap It, to a panel for kgpanels, I think that be posible do it. See if you can make it work!!! The code: Code:
local ldb = LibStub("LibDataBroker-1.1") Better?. Thanks for the tips, Phanx, I dont want sound rude or border, I'm very grateful to the help that you have rendered me, I respect your point of view, but please be reciprocal with the mine, can be do it by two ways, Kgpanels or broker (or more, I think), is a matter of choice in my opinion. I wish I could do it myself, but I can not learn faster than my personal life allows me to learn, sorry if I'm asking too much, but I have no alternative, because I do not understand how to do this. |
Quote:
|
Quote:
Even for me, I do not know almost nothing, I understand that is something completely different. |
Hi Akatosh,
I see from the RaidBuffStatus page here at WowInterface that it is out of date and from the comments not working. I also see from the DL at Curse that the code, as Phanx pounted out, is most likely copyrighted and now uses 13 libraries and the core.lua file is nearly 5,000 lines long. I'm sorry to say that in this case while it may be technically possible to do, it would not be quick or easy (even if someone had a clue where to start) and most likely is not worth the time. Sorry. |
Quote:
http://www.wowinterface.com/forums/s...52&postcount=5 Works ok but, only for 1 time (1 mouseover), If I mouseover 2 times the text come one more time to original color. ¿You kwon how can I fix that?. Thanks!!. For the other side I countinue trying the part of the raidbuffs, I think that with time maybe can I do it, I refuse to give up so fast, there must be some way to do it. |
Quote:
Quote:
Does the frame start out white or class coloured? When you click you want it to go from the class colour to white. Then when your mouse leaves the frame you want it to go back to the class colour until the next time it is clicked? Is that right? BTW, you're not testing on a priest I hope ;) |
Quote:
When I mouseover turns to white. When I mouse leave turn to class colored. When I click turn to white. But: If the panel its clicked, the color turns white, and continues white when I mouseover (and mouseleave). There are 3 panels for the chat (the picture I mouseover the tab General Aka "("PanelGene"). With that codes: Onclick: Code:
self.clicked = true Code:
if not self.clicked then Code:
self.text:SetTextColor(1, 1, 1) Code:
local font, size, flags = self.text:GetFont() I mouseover, OK put the white color. I mouseleave, OK Red again. I click, OK turns white. I mouseleave (when the panel be clicked) and OK, continue white. But, when I mouseleave one more time the panel turn Red again. Its extrange.... but the panel do that. I think something like: When I push one tab the other in theory hide Aka: ChatFrame3:Show() ChatFrame1:Hide() ChatFrame2:Hide() Maybe that can be use for do that. Something like: If ChatFrame3:Show() or ChatFrame1:Hide() and ChatFrame2:Hide() Put the text on white (and hold it). Becouse If I press ChatFrame3, 1 and 2 hide for sure, and 3 show. Thanks for the support. PD: I need sleep a bit.... all the night with Lua ZzzzzZzzz |
Quote:
Code:
if not self.clicked then OnClick becomes: Code:
if not self.clicked then Code:
if not self.clicked then |
Hi again, Thanks for the help but now the panels do completely different,
I explain. OnEnter 1st time, first time OK they turn to white. Click, dont work as intended, the panels dont hold the text white color. Onleave, the panels turn the text to class colored again, they dont hold the white color. I put all the codes of the 3 panels for give you all info as I can, I hope that help you. I do not understand where I'm failing. Thanks!! --------- Panel "PanelGene" (1) OnLoad Code:
local font,size = self.text:GetFont() Code:
self.text:SetTextColor(1, 1, 1) Code:
if not self.clicked then Code:
if not self.clicked then Panel PanelLog (2) OnLoad Code:
local font,size = self.text:GetFont() Code:
self.text:SetTextColor(1, 1, 1) Code:
if not self.clicked then Code:
if not self.clicked then Panel "PanelTrash" (3) OnLoad Code:
local font,size = self.text:GetFont() Code:
self.text:SetTextColor(1, 1, 1) Code:
if not self.clicked then Code:
if not self.clicked then |
OnClick
Code:
if not self.clicked then So I think OnClick Code:
if not self.clicked then OnLeave Code:
if not self.clicked then The code here allows all buttons to be "unclicked" at the same time. If you want one button to always be "hot" you can remove the else self.clicked = false |
You need to add this to the very beginning of all your OnClick scripts:
Code:
if pressed then |
Wow, that would mess things up. Good insight Phanx.
|
I hate maintenances :mad::mad:
Thanks for the assistance. As I undertand finaly for example the code may be (for example): OnLoad: Code:
local font,size = self.text:GetFont() OnClick: Code:
Code:
self.text:SetTextColor(1, 1, 1) Code:
if not self.clicked then Thanks!! |
So that the colour changes to default immediately when a button is "unclicked" (self.clicked = false) you might want to make OnClick
Code:
if pressed then With the code presented here it is possiible to have one button "clicked" and two buttons "unclicked" or none of the buttons "clicked": General Log Trash or General Log Trash or General Log Trash or General Log Trash |
I know I've written scripts for someone before to manage a collection of related panels like this (eg. when clicking on one, turn it white, turn all the others gray) but I don't remember when or where, or even whether it was on these forums or on Wowace. Maybe you can find it with some creative use of the advanced search.
|
Quote:
At inicial the text is class colored. General Log Trash 1 -When I OnEnter, the text comes white. (for expample I put the cursor over the panel general) 1 -General Log Trash 2 -When I OnLeave, the text comes class colored. (for example I leave the panel general and I put the cursor in another place of the screen out of the panels of tabs). 2 -General Log Trash 3 -But If I click the panel, the text hold the white color, and dont change at mouseleave. (for example I clicked the general panel, and I leave the cursor in another place of the screen out of the panel of tabs). 3 -General Log Trash If I OnEnter on "Log" or "Trash" panel, (when "general" is clicked), but dont click they, OnEnter and Onleave work as the 2 first points), for example general is clicked and at this moment I mouseover the panel "Log". 3 -General LogTrash 3 -General Log Trash (And now I mouseleave). 4 -When I click another panel the Last clicked panel take class colored color again. 4 -General Log Trash (Inicial state). 4 -General Log Trash (Inicial state) (Mouseover over "Log"). 4 -General Log Trash (log at this moment its clicked). I want exactly the some efects like the standart tabs of the basic chat of wow. I dont know how can I explain It better, in general term I want a panels of 3 buttons with identical efects of basic wow chat. Thanks!!. PD: I hate sleep (is a loss of time, how many things I can do In 5 or 6 ours...), but I need it again... and one more time a long lua text night, can be a perfect tittle for a film to sleep. I try to find that post Phanx, thanks, but in a little while, now I have to rest. |
OnLoad -- Everything class coloured
Code:
local font,size = self.text:GetFont() Code:
if pressed then Code:
self.text:SetTextColor(1, 1, 1) Code:
if self.clicked then |
Why do all this work when you can just check to see if a ChatFrame is showing?
Use the OnUpdate field and do a Lua Code:
Not too difficult to add additional checks to see if its being entered by the mouse to disable the updating color. Edit: Here's my version and a rather simplified attempt to make things more straightforward and more 'universal' on all the buttons minus a simple string change. OnLoad: Lua Code:
OnEnter: Lua Code:
OnLeave: Lua Code:
OnClick: Lua Code:
OnUpdate: Lua Code:
Another nifty side effect to this is that it should also update the class color should you change it with CUSTOM_CLASS_COLORS. Layout Export: Code:
^1^T^SGeneral^T^Sborder_advanced^T^Senable^b^Sshow^T^SBOT^B^STOPRIGHTCORNER^B^SLEFT^B^STOPLEFTCORNER^B^SRIGHT^B^SBOTLEFTCORNER^B^STOP^B^SBOTRIGHTCORNER^B^t^t^Sparent^SUIParent^Ssub_level^N0^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SSolid^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sfont^SBlizzard^SjustifyH^SCENTER^Sx^N0^Scolor^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Stext^SGeneral^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S0^Sx^S-100^Sbg_alpha^N1^Sborder_edgeSize^N16^Sheight^S25^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SLLy^N1^SLLx^N0^SLRy^N1^SLRx^N1^SURx^N1^SURy^N0^SULy^N0^SULx^N0^t^Sbg_insets^T^Sb^N4^St^N-4^Sl^N4^Sr^N-4^t^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^Slocal~`font,size~`=~`self.text:GetFont()~Jself.text:SetFont(font,size,"OUTLINE")~Jself.text:SetJustifyH("CENTER")~Jself.text:SetJustifyV("CENTER")~J~`~Jself.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~Jself.frame~`=~`"ChatFrame1"^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)^SUPDATE^Sif~`_G[self.frame]:IsShown()~`or~`self.entered~`then~Jself.text:SetTextColor(1,1,1)~Jelse~Jself.text:SetTextColor(self.color.r,self.color.g,self.color.b)~Jend^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_texture^SBlizzard~`Tooltip^Swidth^S100^Sbg_orientation^SHORIZONTAL^Srotation^N0^Smouse^B^Sbg_color^T^Sa^N0.6^Sr^N0.3^Sg^N0.3^Sb^N0.3^t^Scrop^b^t^SCombat^T^Sborder_advanced^T^Senable^b^Sshow^T^SBOTRIGHTCORNER^B^STOPRIGHTCORNER^B^STOPLEFTCORNER^B^SBOTLEFTCORNER^B^SRIGHT^B^SLEFT^B^STOP^B^SBOT^B^t^t^Sparent^SUIParent^Ssub_level^N0^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SSolid^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sx^N0^SjustifyH^SCENTER^Sfont^SBlizzard^Scolor^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Stext^SCombat^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S0^Sx^S0^Sbg_alpha^N1^Sborder_edgeSize^N16^Sheight^S25^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SLRy^N1^SLRx^N1^SULx^N0^SULy^N0^SURy^N0^SURx^N1^SLLx^N0^SLLy^N1^t^Scrop^b^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^Slocal~`font,size~`=~`self.text:GetFont()~Jself.text:SetFont(font,size,"OUTLINE")~Jself.text:SetJustifyH("CENTER")~Jself.text:SetJustifyV("CENTER")~J~`~Jself.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~Jself.frame~`=~`"ChatFrame2"^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)^SUPDATE^Sif~`_G[self.frame]:IsShown()~`or~`self.entered~`then~Jself.text:SetTextColor(1,1,1)~Jelse~Jself.text:SetTextColor(self.color.r,self.color.g,self.color.b)~Jend^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_texture^SBlizzard~`Tooltip^Swidth^S100^Sbg_insets^T^Sr^N-4^St^N-4^Sl^N4^Sb^N4^t^Sbg_color^T^Sa^N0.6^Sb^N0.3^Sg^N0.3^Sr^N0.3^t^Smouse^B^Srotation^N0^Sbg_orientation^SHORIZONTAL^t^SLoot^T^Sborder_advanced^T^Senable^b^Sshow^T^SBOT^B^STOPRIGHTCORNER^B^SLEFT^B^SBOTLEFTCORNER^B^SRIGHT^B^STOPLEFTCORNER^B^STOP^B^SBOTRIGHTCORNER^B^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SSolid^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sx^N0^SjustifyH^SCENTER^Sfont^SBlizzard^Scolor^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Stext^SLoot^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S0^Sx^S100^Sbg_alpha^N1^Sborder_edgeSize^N16^Sheight^S25^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SULx^N0^SULy^N0^SLLy^N1^SLLx^N0^SURx^N1^SURy^N0^SLRx^N1^SLRy^N1^t^Sbg_insets^T^Sb^N4^St^N-4^Sl^N4^Sr^N-4^t^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^Slocal~`font,size~`=~`self.text:GetFont()~Jself.text:SetFont(font,size,"OUTLINE")~Jself.text:SetJustifyH("CENTER")~Jself.text:SetJustifyV("CENTER")~J~`~Jself.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~Jself.frame~`=~`"ChatFrame4"^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)^SUPDATE^Sif~`_G[self.frame]:IsShown()~`or~`self.entered~`then~Jself.text:SetTextColor(1,1,1)~Jelse~Jself.text:SetTextColor(self.color.r,self.color.g,self.color.b)~Jend^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_texture^SBlizzard~`Tooltip^Swidth^S100^Ssub_level^N0^Srotation^N0^Smouse^b^Sbg_color^T^Sa^N0.6^Sr^N0.3^Sg^N0.3^Sb^N0.3^t^Scrop^b^t^t^^ayer"))])~Jself.frame~`=~`"ChatFrame1"^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)^SUPDATE^Sif~`_G[self.frame]:IsShown()~`or~`self.entered~`then~Jself.text:SetTextColor(1,1,1)~Jelse~Jself.text:SetTextColor(self.color.r,self.color.g,self.color.b)~Jend^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_texture^SBlizzard~`Tooltip^Swidth^S100^Sbg_insets^T^Sr^N-4^St^N-4^Sl^N4^Sb^N4^t^Sbg_color^T^Sa^N0.6^Sb^N0.3^Sg^N0.3^Sr^N0.3^t^Smouse^B^Srotation^N0^Sbg_orientation^SHORIZONTAL^t^t^^ |
Hi all.
1st: Fizzlemizz, Phanx thanks for all the support that give me, the code that leave me Fizz the part of "Onleave dont work as intended, when I Onleave (and the panel is clicked, the loss the white color and be class colored again.) 2nd: suicidalkatt, Works perfetly, exactly as I need, I cant imagine how, with that few lines, all work as I need, really I'm in shock. |
Quote:
Glad it's working how you'd like :) |
Also, there is no need to have OnEnter/OnLeave handlers for the frame, you can use self:IsMousOver()
|
Quote:
One more question. ¿Can be posible OnClick, remove the top border of the panel?. For example I click the panel General, and the top border remove, taking the apareance of "mix", can be posible do that?¿ ......... I find a posible way using the alpha color of the borders, I explain. I put 2 panels Just one over the other. The principal panel have the 4 borders. And the panel of back have 3 borders (all, without top). When I click the principal panel, alpha border of the principal panel get alfa 0, and they show the back panel with the 3 borders. I try that this night leave me a time and I post the results. ...... At this moment it works on a test panels that I just created for test that way to do it, now I try to apply to the panels of chat tabs. Thanks. |
Quote:
|
Quote:
You'd have to set all the texture for the button and it'd take a bit more effort. |
Results:
Pictures: General Log Trash All Codes: General: OnLoad Code:
local font,size = self.text:GetFont() Code:
if _G[self.frame]:IsShown() or self.entered then Code:
self.entered = true Code:
self.entered = false Code:
FCF_Tab_OnClick(_G[self.frame.."Tab"],button) Log: OnLoad Code:
local font,size = self.text:GetFont() Code:
if _G[self.frame]:IsShown() or self.entered then Code:
self.entered = true Code:
self.entered = false Code:
FCF_Tab_OnClick(_G[self.frame.."Tab"],button) Trash: OnLoad Code:
local font,size = self.text:GetFont() Code:
if _G[self.frame]:IsShown() or self.entered then Code:
self.entered = true Code:
self.entered = false Code:
FCF_Tab_OnClick(_G[self.frame.."Tab"],button) Code for kgpanels: Code:
^1^T^SLog^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOT^B^STOPRIGHTCORNER^B^SLEFT^B^SBOTLEFTCORNER^B^SRIGHT^B^STOPLEFTCORNER^B^STOP^B^SBOTRIGHTCORNER^B^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SBlizzard~`Tooltip^Sanchor^SUIParent^Slevel^N0^Svert_tile^b^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sx^S1^SjustifyH^SCENTER^Sfont^SContinuum_Medium^Scolor^T^Sa^N1^Sr^F6887858253625464^f-53^Sg^F8759942804610848^f-56^Sb^F8336074604387744^f-55^t^Stext^SLog^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S-130^Sx^S-267^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^Shorz_tile^b^SanchorTo^SCENTER^Sabsolute_bg^T^SULx^N0^SULy^N0^SLLy^N1^SLLx^N0^SURx^N1^SURy^N0^SLRx^N1^SLRy^N1^t^Sbg_insets^T^Sb^S0^St^S0^Sl^S0^Sr^S0^t^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^S~`~`~`~`local~`font,size~`=~`self.text:GetFont()~J~`~`~`~`self.text:SetFont(font,size,"OUTLINE")~J~`~`~`~`self.text:SetJustifyH("CENTER")~J~`~`~`~`self.text:SetJustifyV("CENTER")~J~`~`~`~`~`~J~`~`~`~`self.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~J~`~`~`~`self.frame~`=~`"ChatFrame2"^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)~J~Jlocal~`tab1~`=~`kgPanels:FetchFrame("General")~`~`~Jlocal~`tab3~`=~`kgPanels:FetchFrame("Trash")~`~J~Jself:SetBackdropBorderColor(0,~`0~`,~`0,~`0)~Jtab1:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jtab3:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jself.bg:SetGradientAlpha("VERTICAL",~`0,~`0,~`0,~`1,0.18,~`0.18,~`0.18,~`1)~Jtab1.bg:SetVertexColor(0.18,~`0.18,~`0.18)~Jtab3.bg:SetVertexColor(0.18,~`0.18,~`0.18)^SUPDATE^S~`~`~`~`if~`_G[self.frame]:IsShown()~`or~`self.entered~`then~J~`~`~`~`~`~`~`~`self.text:SetTextColor(1,1,1)~J~`~`~`~`else~J~`~`~`~`~`~`~`~`self.text:SetTextColor(self.color.r,self.color.g,self.color.b)~J~`~`~`~`end^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_color^T^Sa^N1^Sr^N0^Sg^N0^Sb^N0^t^Sborder_texture^SCaith^Swidth^S46^Srotation^N0^Sbg_color^T^Sa^N1^Sr^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sb^F6499312403420951^f-55^t^Smouse^B^Scrop^b^Ssub_level^N0^t^SGeneral^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOTRIGHTCORNER^B^STOPRIGHTCORNER^B^SBOTLEFTCORNER^B^STOPLEFTCORNER^B^SRIGHT^B^SLEFT^B^STOP^B^SBOT^B^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SBlizzard~`Tooltip^Sanchor^SUIParent^Slevel^N0^Svert_tile^b^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sfont^SContinuum_Medium^SjustifyH^SCENTER^Sx^S2^Scolor^T^Sa^N1^Sb^F8336074604387744^f-55^Sg^F8759942804610848^f-56^Sr^F6887858253625464^f-53^t^Stext^SGeneral^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S-130^Sx^S-323^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^Shorz_tile^b^SanchorTo^SCENTER^Sabsolute_bg^T^SLLy^N1^SLLx^N0^SLRy^N1^SLRx^N1^SURy^N0^SURx^N1^SULy^N0^SULx^N0^t^Sbg_insets^T^Sr^S0^St^S0^Sl^S0^Sb^S0^t^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^S~`~`~`~`local~`font,size~`=~`self.text:GetFont()~J~`~`~`~`self.text:SetFont(font,size,"OUTLINE")~J~`~`~`~`self.text:SetJustifyH("CENTER")~J~`~`~`~`self.text:SetJustifyV("CENTER")~J~`~`~`~`~`~J~`~`~`~`self.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~J~`~`~`~`self.frame~`=~`"ChatFrame1"~J~Jself:SetBackdropBorderColor(0,~`0~`,~`0,~`0)~Jself.bg:SetGradientAlpha("VERTICAL",~`0,~`0,~`0,~`1,0.18,~`0.18,~`0.18,~`1)^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)~J~Jlocal~`tab2~`=~`kgPanels:FetchFrame("Log")~`~`~Jlocal~`tab3~`=~`kgPanels:FetchFrame("Trash")~`~J~Jself:SetBackdropBorderColor(0,~`0~`,~`0,~`0)~Jtab2:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jtab3:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jself.bg:SetGradientAlpha("VERTICAL",~`0,~`0,~`0,~`1,0.18,~`0.18,~`0.18,~`1)~Jtab2.bg:SetVertexColor(0.18,~`0.18,~`0.18)~Jtab3.bg:SetVertexColor(0.18,~`0.18,~`0.18)^SUPDATE^S~`~`~`~`if~`_G[self.frame]:IsShown()~`or~`self.entered~`then~J~`~`~`~`~`~`~`~`self.text:SetTextColor(1,1,1)~J~`~`~`~`else~J~`~`~`~`~`~`~`~`self.text:SetTextColor(self.color.r,self.color.g,self.color.b)~J~`~`~`~`end^SLEAVE^Sself.entered~`=~`false^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N0^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N0^Sg^N0^Sr^N0^t^Sborder_texture^SCaith^Swidth^S68^Ssub_level^N0^Scrop^b^Smouse^B^Sbg_color^T^Sa^N1^Sb^F4945129002602899^f-54^Sg^F4945129002602899^f-54^Sr^F4945129002602899^f-54^t^Srotation^N0^t^SChatB^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOTRIGHTCORNER^b^STOPRIGHTCORNER^b^SBOTLEFTCORNER^b^STOPLEFTCORNER^b^SRIGHT^B^SLEFT^B^STOP^b^SBOT^b^t^t^Sparent^SUIParent^Ssub_level^N0^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SNone^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sfont^SBlizzard^SjustifyH^SCENTER^Sx^N0^Scolor^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Stext^S^SjustifyV^SMIDDLE^Ssize^N12^t^Srotation^N0^Sx^S-375^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S182^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SULx^N0^SULy^N0^SLLy^N1^SLLx^N0^SURy^N0^SURx^N1^SLRx^N1^SLRy^N1^t^Sbg_insets^T^Sr^S^St^S^Sl^S^Sb^S^t^Sscripts^T^t^Sbg_style^SNONE^Sgradient_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N0^Sg^N0^Sr^N0^t^Sborder_texture^SCaith^Swidth^S368^Sy^S-50^Sbg_color^T^Sa^N1^Sb^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sr^F6499312403420951^f-55^t^Smouse^b^Scrop^b^Sbg_orientation^SHORIZONTAL^t^SLogB^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOTRIGHTCORNER^B^STOPRIGHTCORNER^b^STOPLEFTCORNER^b^SBOTLEFTCORNER^B^SRIGHT^B^SLEFT^B^STOP^b^SBOT^B^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SNone^Sanchor^SUIParent^Slevel^N0^Svert_tile^b^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sfont^SContinuum_Medium^SjustifyH^SCENTER^Sx^S1^Scolor^T^Sa^N1^Sb^F8336074604387744^f-55^Sg^F8759942804610848^f-56^Sr^F6887858253625464^f-53^t^Stext^S^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S-130^Sx^S-267^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^Shorz_tile^b^SanchorTo^SCENTER^Sabsolute_bg^T^SLRy^N1^SLRx^N1^SULx^N0^SULy^N0^SURy^N0^SURx^N1^SLLx^N0^SLLy^N1^t^Sbg_insets^T^Sr^S0^St^S0^Sl^S0^Sb^S0^t^Sscripts^T^SENTER^S^SLOAD^S"^SCLICK^S^SUPDATE^S^SLEAVE^S^t^Sbg_style^SNONE^Sgradient_color^T^Sa^N0^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N0^Sg^N0^Sr^N0^t^Sborder_texture^SCaith^Swidth^S46^Ssub_level^N0^Scrop^b^Smouse^b^Sbg_color^T^Sa^N1^Sb^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sr^F6499312403420951^f-55^t^Srotation^N0^t^SGeneralB^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOTRIGHTCORNER^B^STOPRIGHTCORNER^b^SBOTLEFTCORNER^B^STOPLEFTCORNER^b^SRIGHT^B^SLEFT^B^STOP^b^SBOT^B^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SNone^Sanchor^SUIParent^Slevel^N0^Svert_tile^b^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sfont^SContinuum_Medium^SjustifyH^SCENTER^Sx^S2^Scolor^T^Sa^N1^Sb^F8336074604387744^f-55^Sg^F8759942804610848^f-56^Sr^F6887858253625464^f-53^t^Stext^S^SjustifyV^SMIDDLE^Ssize^N12^t^Sy^S-130^Sx^S-323^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^Shorz_tile^b^SanchorTo^SCENTER^Sabsolute_bg^T^SLLy^N1^SLLx^N0^SLRy^N1^SLRx^N1^SURy^N0^SURx^N1^SULy^N0^SULx^N0^t^Sbg_insets^T^Sr^S0^St^S0^Sl^S0^Sb^S0^t^Sscripts^T^SENTER^S^SLOAD^S^SCLICK^S^SUPDATE^S^SLEAVE^S^t^Sbg_style^SNONE^Sgradient_color^T^Sa^N0^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N0^Sg^N0^Sr^N0^t^Sborder_texture^SCaith^Swidth^S68^Ssub_level^N0^Scrop^b^Smouse^b^Sbg_color^T^Sa^N1^Sb^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sr^F6499312403420951^f-55^t^Srotation^N0^t^STrash^T^Sborder_advanced^T^Senable^b^Sshow^T^SBOT^B^STOPRIGHTCORNER^B^SLEFT^B^SBOTLEFTCORNER^B^SRIGHT^B^STOPLEFTCORNER^B^STOP^B^SBOTRIGHTCORNER^B^t^t^Sparent^SUIParent^Ssub_level^N0^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SBlizzard~`Tooltip^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^S0^Sfont^SContinuum_Medium^SjustifyH^SCENTER^Sx^S0^Scolor^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Stext^STrash^SjustifyV^SMIDDLE^Ssize^N12^t^Srotation^N0^Sx^S-218^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SLRy^N1^SLRx^N1^SULx^N0^SULy^N0^SURx^N1^SURy^N0^SLLx^N0^SLLy^N1^t^Sbg_insets^T^Sb^S^St^S^Sl^S^Sr^S^t^Sscripts^T^SENTER^Sself.entered~`=~`true^SLOAD^S~`~`~`~`local~`font,size~`=~`self.text:GetFont()~J~`~`~`~`self.text:SetFont(font,size,"OUTLINE")~J~`~`~`~`self.text:SetJustifyH("CENTER")~J~`~`~`~`self.text:SetJustifyV("CENTER")~J~`~`~`~`~`~J~`~`~`~`self.color~`=~`(CUSTOM_CLASS_COLORS~`or~`RAID_CLASS_COLORS)[select(2,UnitClass("player"))]~J~`~`~`~`self.frame~`=~`"ChatFrame3"~J^SLEAVE^Sself.entered~`=~`false^SCLICK^SFCF_Tab_OnClick(_G[self.frame.."Tab"],button)~J~Jlocal~`tab1~`=~`kgPanels:FetchFrame("General")~`~`~Jlocal~`tab2~`=~`kgPanels:FetchFrame("Log")~`~J~Jself:SetBackdropBorderColor(0,~`0~`,~`0,~`0)~Jtab1:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jtab2:SetBackdropBorderColor(0,~`0~`,~`0,~`1)~Jself.bg:SetGradientAlpha("VERTICAL",~`0,~`0,~`0,~`1,0.18,~`0.18,~`0.18,~`1)~Jtab1.bg:SetVertexColor(0.18,~`0.18,~`0.18)~Jtab2.bg:SetVertexColor(0.18,~`0.18,~`0.18)^SUPDATE^S~`~`~`~`if~`_G[self.frame]:IsShown()~`or~`self.entered~`then~J~`~`~`~`~`~`~`~`self.text:SetTextColor(1,1,1)~J~`~`~`~`else~J~`~`~`~`~`~`~`~`self.text:SetTextColor(self.color.r,self.color.g,self.color.b)~J~`~`~`~`end^SEVENT^S^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_color^T^Sa^N1^Sr^N0^Sg^N0^Sb^N0^t^Sborder_texture^SCaith^Swidth^S54^Sbg_orientation^SHORIZONTAL^Scrop^b^Smouse^B^Sbg_color^T^Sa^N1^Sr^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sb^F6499312403420951^f-55^t^Sy^S-130^t^SChat^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOT^b^STOPRIGHTCORNER^b^SLEFT^B^STOPLEFTCORNER^b^SRIGHT^B^SBOTLEFTCORNER^b^STOP^b^SBOTRIGHTCORNER^b^t^t^Sparent^SUIParent^Sbg_orientation^SHORIZONTAL^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SBlizzard~`Tooltip^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^N0^Sx^N0^SjustifyH^SCENTER^Sfont^SBlizzard^Scolor^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Stext^S^SjustifyV^SMIDDLE^Ssize^N12^t^Srotation^N0^Sx^S-375^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S158^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SLLy^N1^SLLx^N0^SLRy^N1^SLRx^N1^SURx^N1^SURy^N0^SULy^N0^SULx^N0^t^Sbg_insets^T^Sb^S^St^S^Sl^S^Sr^S^t^Sscripts^T^t^Sbg_style^SSOLID^Sgradient_color^T^Sa^N1^Sr^N1^Sg^N1^Sb^N1^t^Sborder_color^T^Sa^N1^Sr^N0^Sg^N0^Sb^N0^t^Sborder_texture^SCaith^Swidth^S368^Ssub_level^N0^Scrop^b^Smouse^b^Sbg_color^T^Sa^N1^Sr^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sb^F6499312403420951^f-55^t^Sy^S-40^t^STrashB^T^Sborder_advanced^T^Senable^B^Sshow^T^SBOTRIGHTCORNER^B^STOPRIGHTCORNER^b^STOPLEFTCORNER^b^SBOTLEFTCORNER^B^SRIGHT^B^SLEFT^B^STOP^b^SBOT^B^t^t^Sparent^SUIParent^Ssub_level^N0^SanchorFrom^SCENTER^Shflip^b^Svflip^b^StileSize^N0^Sbg_texture^SNone^Sanchor^SUIParent^Slevel^N0^Suse_absolute_bg^b^Sbg_blend^SBLEND^Stext^T^Sy^S0^Sx^S0^SjustifyH^SCENTER^Sfont^SContinuum_Medium^Scolor^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Stext^S^SjustifyV^SMIDDLE^Ssize^N12^t^Srotation^N0^Sx^S-218^Sbg_alpha^N1^Sborder_edgeSize^N4^Sheight^S22^Stiling^b^Sstrata^SBACKGROUND^SanchorTo^SCENTER^Sabsolute_bg^T^SLLy^N1^SLLx^N0^SLRy^N1^SLRx^N1^SURy^N0^SURx^N1^SULy^N0^SULx^N0^t^Sbg_insets^T^Sr^S^St^S^Sl^S^Sb^S^t^Sscripts^T^SENTER^S^SLOAD^S^SEVENT^S^SCLICK^S^SUPDATE^S^SLEAVE^S^t^Sbg_style^SNONE^Sgradient_color^T^Sa^N1^Sb^N1^Sg^N1^Sr^N1^t^Sborder_color^T^Sa^N1^Sb^N0^Sg^N0^Sr^N0^t^Sborder_texture^SCaith^Swidth^S54^Sy^S-130^Sbg_color^T^Sa^N1^Sb^F6499312403420951^f-55^Sg^F6499312403420951^f-55^Sr^F6499312403420951^f-55^t^Smouse^b^Scrop^b^Sbg_orientation^SHORIZONTAL^t^t^^ The part of borders: two panels of every Tab with that: 1) A back panel of each tab with 3 borders (Right, Left, and bot), background transparent and the corners of top are hidden. Example: |_| 2) A Front panel of each tab with all the borders corner and background. Example: [] When I click the panel, Alpha of the Front panel (2), set to 0, so the borders of the panel with 4 borders dissapear, and now the back panel with 3 borders are visible, that make the efect of we remove the border of top. Now appear a new problem, cause of corners of back panel (1), are hidden, appear 2 blank spaces, equivalent of top right and top left corners, so... I create 2 panels to fix that. 3) 1 panel with the background and only the borders of right and left. Example : | | 4) 1 panel with all borders and no background (transparent). Example: [] When I join it, the panel (3) cover that blank spaces of the corner tabs, and the panel (4) cover the background and the rest of corners. So at this point the part of borders its OK. Now the part of Gradients and colors: I find a few of Lua codes of gradients I think that understand the next (can be wrong but i think that its ok), I explain: self.bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 1,0.18, 0.18, 0.18, 1) ____________[Tipe of gradient]_|___[First color][Second color]___ In parits of 4 numbers, the first 3 numbers are the code of color, the 4 number is the alpha of the color (transparency). I learn to, that with a division of the rgb color per 255, I can give the number what I need. So When I click each tab, Itselfs take a gradient color (Black / Grey), and the rest of tabs get a solid color of Grey (0.18, 0.18, 0.18), the division of 46, 46, 46 per 255. Another long day with Lua , for today its enought for me... I need sleep again :(:( Plans for tomorrow Xdd Xdd (today) : try to fix the filter of combat log. Cause of I hide the tabs with an option of chatter, the filter of CombatLog dissapear too, dont be intended that... I need that filter. Thanks for all !! |
All times are GMT -6. The time now is 10:35 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI