WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   LitePanels - An art framework (https://www.wowinterface.com/forums/showthread.php?t=25283)

Miralen 09-07-09 03:28 AM

Ya basically I want the panels to be positioned in roughly the same screen location no matter what screen resolution I am using I am going to check this out and see if this will work.

Gnoore 09-07-09 03:39 AM

Quote:

Originally Posted by Yhor (Post 157844)
Might parent it to a raid frame... but.

What is the purpose of the frame you want to display? A little more detail will get you much better help :).


An extra panel is displayed when I am in the raid then you can see where to Grid and Decursive.

Yhor 09-07-09 05:01 AM

Quote:

Originally Posted by Gnoore (Post 157920)
An extra panel is displayed when I am in the raid then you can see where to Grid and Decursive.

A static frame shouldn't be hard at all. You tell it the dimensions of your frame and parent it to whatever raid frame you wish. Find the frame's name via a mouse-over script, or the addon MoveAnything! can also give you the exact frame name.

Assuming you are using a texture, I'll give an example. This will only show the panel frame when the raid frame is there, and will disappear when the raid frame is not there.

Code:

{ name="TheNameOfYourFrame", parent="YourRaidFrameName", tex_file="YourTextureFileNameInMediaFolder.tga",
      bg_alpha=.95, anchor_to="CENTER", width="735", height="575", y_off = 143, x_off = -143 },

Fill in TheNameOfYourFrame with the name of your frame, YourRaidFrameName with your raid frame name you want to parent it to..etc.... Don't remove the quotes, they belong there. Adjust width, height, x and y position according to your needs. Be sure to have a tga or blp texture that meets WoW's standards in the media folder inside the LitePanels addon folder. There are texture packs available on the site for download as well :), if you care to use them.

I hope this helps, and wasn't overkill on information you already knew. If you want a dynamic panel (adjusts to size), then hopefully someone with more skill than I have can help (if it's possible). There's more information inside the example layout.lua file also, if needed.

Katae 09-07-09 05:25 AM

Quote:

Originally Posted by Yhor (Post 157922)
If you want a dynamic panel (adjusts to size), then hopefully someone with more skill than I have can help (if it's possible).

A width or height of "100%" would do just that. It can be adjusted pixel by pixel by using the inset attribute. :)

For the moment, a % uses the parent's dimensions, but the next version will use anchor_frame's.

Yhor 09-07-09 06:37 AM

Quote:

Originally Posted by Katae (Post 157925)
A width or height of "100%" would do just that. It can be adjusted pixel by pixel by using the inset attribute. :)

For the moment, a % uses the parent's dimensions, but the next version will use anchor_frame's.

Does the current version allow for "105%" (or any % greater than 100)? I ask this because it may be useful for an

{ if blah blah blah = "10", then "100%";
if blah blah blah = "15", then "201%";
end... }
etc.. situation. Does that even make any sense?:confused:

Sorry for the terrible example, I've been studying button/bar api and lua manual for about 14 hours and have work in 1 1/2 hours... I hate my OCD and already (before fixations..) abnormal sleep habits. All of which should should make my lazy example inexcusable... but there it is.:rolleyes:

Katae 09-07-09 06:52 AM

Quote:

Originally Posted by Yhor (Post 157928)
Does the current version allow for "105%" (or any % greater than 100)? I ask this because it may be useful for an

{ if blah blah blah = "10", then "100%";
if blah blah blah = "15", then "201%";
end... }
etc.. situation. Does that even make any sense?:confused:

Well, yes and no, you can use any n% as the width/height, but it currently cannot be changed on the fly like in your example since the config is only read once.

It's totally possible to implement that sort of behavior. For instance, allowing width/height to be a function and change itself conditionally.

But for the time being, to alter the width/height as a % conditionally, something like this could be used...
Code:

OnUpdate = function(self)
    local height, width
    if true then
        height = "100%"
    elseif condition == 5 then
        height = "201%"
    end
    width = "100%"

    local pwidth, pheight = self:GetParent():GetWidth(), self:GetParent():GetHeight()

    if width then self:SetWidth(strmatch(width,"%%") and pwidth * strmatch(width, "(%d+)%%") * .01 or width) end
    if height then self:SetHeight(strmatch(height,"%%") and pheight * strmatch(height, "(%d+)%%") * .01 or height) end
end


Pixol 09-19-09 09:47 AM

Simply Clock/WG Timer Display

Quote:

Originally Posted by Katae (Post 157549)
I actually just wrote a clock module for a stats layout I was working on the other day. Pick it apart if you like: http://pastebin.com/f486e5824

Awesome add-on. I see a lot of potential in this once I learn more about lua.
I never figured out why your lua code never worked for me... But it gave me a good start for the Clock and WG timer codes. Not sure how they are in terms of efficiency but it appears to work fine, I have yet to test the clock in PM range and yet to test the WG timer in progress and in an instance away from map, but I guess it should get the timer from our BG queueing window.

Code:

-- Left mid-section of the box
{        name = "BoxLx",
        anchor_to = "TOP",
        width = 140,                height = 20,
        x_off = -140/2,                y_off = -60,
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0,                gradient_alpha = 0.2,
},
-- Right mid-section
{        name = "BoxRx",                parent = "BoxLx",
        anchor_to = "LEFT",        anchor_from = "RIGHT",
        width = "100%",                height = "100%",
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0.2,                gradient_alpha = 0,
},
-- Top Left gradient line
{        name = "LineTLx",
        parent = "BoxLx",        anchor_to = "TOP",
        width = "100%",                height = 1,
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0,                gradient_alpha = 0.8,
},
-- Top right line
{        name = "LineTRx",
        parent = "BoxRx",        anchor_to = "TOP",
        width = "100%",                height = 1,
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0.8,                gradient_alpha = 0,
},
-- Bottom left line
{        name = "LineBLx",
        parent = "BoxLx",        anchor_to = "BOTTOM",
        width = "100%",                height = 1,
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0,                gradient_alpha = 0.8,
},
-- Bottom right line
{        name = "LineBRx",
        parent = "BoxRx",        anchor_to = "BOTTOM",
        width = "100%",                height = 1,
        gradient = "H",
        bg_color = "CLASS",        gradient_color = "CLASS",
        bg_alpha = 0.8,                gradient_alpha = 0,
},




{        name = "Clock", parent = "BoxLx", anchor_to = "CENTER", anchor_from="RIGHT",
        text = {
                string = function()
                        -- Clock
                        local hour, min, sec, pm = GetGameTime()
                        if hour > 12 then hour = hour - 12; pm = true elseif hour == 0 then hour = 12 end
                        local timehour = format("%02.f",hour)
                        local timemin = format("%02.f",min)
                        local timeframe = format("%s", pm and " PM" or " AM")

                        -- WG Timer
                        local wgtimeinseconds = GetWintergraspWaitTime() or nil
                        if wgtimeinseconds == nil then
                                wgtime = "In Progress"
                        else
                        --local wghour = floor(wgtimeinseconds/3600)
                        --local wgmin = floor(wgtimeinseconds/60 - (wghour*60)
                        --local wgsec = floor(wgtimeinseconds - wghour*3600 - wgmin *60)                               
                        local wgtime = format("%02.f:%02.f:%02.f",floor(wgtimeinseconds/3600), floor(wgtimeinseconds/60 - floor(wgtimeinseconds/3600)*60), floor(wgtimeinseconds - floor(wgtimeinseconds/60)*60))
                        end


                        return "Clock:"..timehour..":"..timemin..""..timeframe.."::: Wintergrasp: "..wgtime..""
                end, update = 1, font = "Fonts\\FRIZQT__.TTF", size = 10, alpha = 1.0, justify_h = "right", justify_v = "bottom", y_off = -2,
        },


--This part below seems to be acting funny for me when removing my mouse from the area, the tooltip takes a while to disappear and sometimes disappears instantly.
        OnEnter = function(self)
                GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT")
                GameTooltip:ClearLines()
               
                local hour, min, pm = GetGameTime()
                if hour > 12 then hour = hour - 12; pm = true elseif hour == 0 then hour = 12 end
                local rtime = hour..":"..format("%02.f",min)..(pm and "pm" or "am")
                local ltime = format("%01.f",date("%I"))..":"..date("%M")..strlower(date("%p"))
               
                local wgtime = GetWintergraspWaitTime() or nil
                if wgtime == nil then
                        wgtime = "In Progress"
                else
                        local hour = tonumber(format("%01.f", floor(wgtime/3600)))
                        local min = format(hour>0 and "%02.f" or "%01.f", floor(wgtime/60 - (hour*60)))
                        local sec = format("%02.f", floor(wgtime - hour*3600 - min *60))                               
                        wgtime = (hour>0 and hour..":" or "")..min..":"..sec
                end
               
                GameTooltip:AddLine(date("%A, %B %d"),0.4,0.78,1)
                GameTooltip:AddLine(" ")
                GameTooltip:AddDoubleLine("Local Time",ltime,0.75,0.9,1,1,1,1)
                GameTooltip:AddDoubleLine("Realm Time",rtime,0.75,0.9,1,1,1,1)
                GameTooltip:AddLine(" ")
                GameTooltip:AddDoubleLine("Time to Wintergrasp",wgtime,0.75,0.9,1,1,1,1)
                GameTooltip:Show()
        end,
        OnLeave = HideTT,
        OnClick = function(_,b) (b == "RightButton" and ToggleTimeManager or ToggleCalendar)() end

},

All code credited to Katae, I modified it to work for me since I couldn't get the original one to work.
Edit:
So after adding in the tooltip part, I noticed mousing over back and forth, the tooltip doesn't disappear instantaneously, in fact, sometimes it seems random as if it takes forever until it disappears when moving my mouse up and down. left and right mousing motion seems better it seems.
Also after enabling tooltip, is there a function supported to disable mouse clicks? say if I were to remove the OnClick function?

Thanks :)

Katae 09-19-09 10:57 AM

Quote:

Originally Posted by Pixol (Post 159457)
So after adding in the tooltip part, I noticed mousing over back and forth, the tooltip doesn't disappear instantaneously

I forgot to add the "HideTT" function I have in my original code, which is attached to OnLeave. Sorry about that. Change it to this code so it works properly.
Code:

function() ToggleFrame(GameTooltip) end
Quote:

Originally Posted by Pixol (Post 159457)
Also after enabling tooltip, is there a function supported to disable mouse clicks? say if I were to remove the OnClick function?

Mouse interaction is enabled automatically for OnClick, OnEnter, and OnLeave. None of those actions would do anything otherwise.

Also, I wonder if it didn't work because of my font, did you remove that bit?

Pseudopod 10-05-09 01:37 AM

I took this lua text from the "LuaTexts" thread in EJ, which collects some lua stuff for Pitbull. Since it's a bit different to import that to LitePanels, I'm wondering what's the correct way to update this info:

Code:

local base, posBuff, negBuff = UnitRangedAttackPower("player");
local ap = base + posBuff + negBuff;
local cr,arpp, hrp = GetRangedCritChance(), GetCombatRatingBonus(25), GetCombatRatingBonus(7)
local cr = format("%.2f", cr)
local hrp = format("%.2f", hrp)
local arpp = format("%.2f", arpp)

return "AP: "..ap.." crit: "..cr.."% ArP: "..arpp.."% hit: "..hrp.."%"
end

So it's supposed to show your current ranged attack power, crit, armor penetration & hit. Of those four, at least RAP & crit will change during combat, and ArP too if you have e.g. an item that procs ArP. I'm interested in getting them show without much delay, but without unnecessary updating. I've put it for now in your money/fps/memory/latency script so that "update = 1," but I figure that might not be the best way to do it?

Katae 10-05-09 02:45 AM

Quote:

Originally Posted by Pseudopod (Post 161074)
I'm interested in getting them show without much delay, but without unnecessary updating. I've put it for now in your money/fps/memory/latency script so that "update = 1," but I figure that might not be the best way to do it?

It would be possible to RegisterEvent to UNIT_STATS, UNIT_DAMAGE, COMBAT_RATING_UPDATE (tested with /eventtrace, and at least ArP triggers this) in your OnLoad function, then assign your variables and output the string to the text object within the OnEvent function.

I don't think it would be necessary to check if specific stats have changed, since your variable assignments are pretty light already. I imagine that these events may, at times, fire more than a 1 sec timer during a raid scenario, but I don't believe it would make a noticeable impact on performance.

Katae 10-07-09 08:36 PM

Made big changes to the layout and profile system with 1.5 and edited some of my posts to reflect them. Older layout code should still work with this version.

Canities 10-11-09 09:20 AM

Hi,
Ive juist updated to the latest version and i'm having an issue with my code and cant figure out whats wrong with it.

The error mrssage i get is:
ID: -1
Error occured in: Global
Count: 1
Message: ..\AddOns\LitePanels\layout.lua line 473:
unexpected symbol near ')'

the full code is here: Pastebin Link (ps line 473 in my layout lua is line 189 on the pastebin)

Any help would be greatly appreciated.

Cani

Katae 10-11-09 03:29 PM

Is there more to the file? That code alone doesn't produce an error for me. There must be a syntax error somewhere else.

But there is one problem, your layout is contained in an extra pair of braces. http://pastebin.com/m6f1bff10

Quote:

Originally Posted by Canities (Post 161688)
Message: ..\AddOns\LitePanels\layout.lua line 473:
unexpected symbol near ')'


Dajova 10-11-09 04:57 PM

Any idea how to make a frame hide/show in combat? like i have a dps frame, but i dont wanna see it when im not in combat :)

EDIT: Or rather, making it so it doesn't show unless it's updated, like if you are a healer, you dont want a dps frame showing, but want it show on a dps char. If you follow how i mean ;)

Katae 10-11-09 06:08 PM

Quote:

Originally Posted by richerich (Post 161741)
Any idea how to make a frame hide/show in combat? like i have a dps frame, but i dont wanna see it when im not in combat :)

This should get you going ;)
Code:

{ width=50, height=50,
  OnLoad=function(self)
    self:RegisterEvent'PLAYER_REGEN_ENABLED'
    self:RegisterEvent'PLAYER_REGEN_DISABLED'
    self:Hide()
  end,
  OnEvent=function(self) ToggleFrame(self) end
}

Quote:

Originally Posted by richerich (Post 161741)
EDIT: Or rather, making it so it doesn't show unless it's updated, like if you are a healer, you dont want a dps frame showing, but want it show on a dps char. If you follow how i mean ;)

You'll probably need to make a custom function to check if the character is a healer and not a deeps, probably by checking where they put their talent points.

Dajova 10-11-09 07:14 PM

Quote:

Originally Posted by Katae (Post 161746)
This should get you going ;)
Code:

{ width=50, height=50,
  OnLoad=function(self)
    self:RegisterEvent'PLAYER_REGEN_ENABLED'
    self:RegisterEvent'PLAYER_REGEN_DISABLED'
    self:Hide()
  end,
  OnEvent=function(self) ToggleFrame(self) end
}

You'll probably need to make a custom function to check if the character is a healer and not a deeps, probably by checking where they put their talent points.

Yay, that code worked, although i had to work with it a bit to make it fit with my layout ;)

Anyhow, that wasn't how i meant really. I meant if you could make it ONLY show it when u do damage to something, in compilation with the hide/show in combat. So when you dont do damage in combat, it stays hidden :)


EDIT: Hmm, now i notice something weird... The frame like is like flashing shown/hidden all the time o.O Seems to happen when i just do something, like moving the mouse or typing something o.O Can provide u with the code, see if u can find the problem ;)

Code:

-- DPS Frame
{        name = "DPS", anchor_to = "BOTTOM", y_off = "175",
        text = {
                string = function(self)
                        self = self:GetParent()
                        self.dps = self.active and format("%.1f", self.damage / (GetTime() - self.starttime)) or self.dps or "0.0"
                        return self.dps.." dps" -- "5433.4 dps"
                end, update = 0.5, color = {1,1,1}, size = 15, shadow=2, font = "Fonts\\FRIZQT__.TTF",
        },
        OnLoad = function(self)
                self:RegisterEvent("UNIT_PET")
                self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
                self:RegisterEvent("PLAYER_REGEN_ENABLED")
                self:RegisterEvent("PLAYER_REGEN_DISABLED")
                self.events = "SWING_DAMAGE RANGE_DAMAGE SPELL_DAMAGE SPELL_PERIODIC_DAMAGE DAMAGE_SHIELD DAMAGE_SPLIT"
                self.player, self.pet, self.damage, self.active = UnitGUID'player', UnitGUID'pet' or '0x0', 0, false
                self:RegisterEvent'PLAYER_REGEN_ENABLED'
                self:RegisterEvent'PLAYER_REGEN_DISABLED'
                self:Hide()
        end,
        OnEvent = function(self, event, ...) ToggleFrame(self)
                if event == "COMBAT_LOG_EVENT_UNFILTERED" then
                        local _,spellevent,unit,_,_,_,_,_,type,_,_,damage = ...
                        if not strmatch(self.events,spellevent) then return end
                        if unit == self.player or unit == self.pet then
                                if spellevent == "SWING_DAMAGE" then damage = type end
                                self.damage = self.damage + damage
                        end
                end
                if event == "UNIT_PET" then self.pet = UnitGUID'pet' or '0x0' end
                if event == "PLAYER_REGEN_ENABLED" then self.active = false end
                if event == "PLAYER_REGEN_DISABLED" then
                        self.starttime, self.damage, self.active = GetTime(), 0, true
                end
        end,
        OnClick = function(self, button)
                if button == "RightButton" then
                        self.starttime, self.damage, self.dps = GetTime(), 0, '0.0'
                        self.text:SetText("0.0 dps")
                end
        end
        },


Katae 10-11-09 07:40 PM

Take out the RegisterEvents I gave you since it is already registered on your side. Instead of the toggle, you can approach this another way by showing when damage is done and hiding when leaving combat.

See lines 24 and 32: http://pastebin.com/m71acbac3

Canities 10-12-09 07:24 AM

Katae,
Thanks for that, I will give that a try when I get back from work this afternoon.
The only other information in the file is the coding notation, will try it with creating a new LUA file.

Quote:

Originally Posted by Katae (Post 161733)
Is there more to the file? That code alone doesn't produce an error for me. There must be a syntax error somewhere else.

But there is one problem, your layout is contained in an extra pair of braces. http://pastebin.com/m6f1bff10

EDIT: That worked fine, i'm still unsure what the issue with it was but it is fixed now, thanks for the help and a great addon!

Cani

Jooze 10-13-09 01:47 PM

Just a bit of code i want to share. Use this in a text element and it will display when you have new mail.

Code:

string = function()
local hasMail = HasNewMail()
local MailText
if (hasMail == 1) then
MailText = format("%s", "New Mail!")
else
MailText = format("%s", "No Mail")
end
return MailText
end,


Dajova 11-21-09 06:37 PM

One thing that still buggers me that keeps me from completely go from kgPanels to LitePanels is the way that it works with blending textures...

for example, here's a screenshot with kgPanels (and LitePanels for gradient style) that im currently using:



but when i switch entirely to LitePanels (used class color gradient this time), it shows like this:



It doesn't blend in as nicely as kgPanel does or is there a way to do that?

Katae 11-21-09 06:45 PM

Quote:

Originally Posted by richerich (Post 166707)
One thing that still buggers me that keeps me from completely go from kgPanels to LitePanels is the way that it works with blending textures...

What's your settings? Were you using a blend mode with kgpanels?

Dajova 11-21-09 07:30 PM

Quote:

Originally Posted by Katae (Post 166708)
What's your settings? Were you using a blend mode with kgpanels?

Yeah, i used the "Add" blend to get it...

Katae 11-21-09 07:38 PM

Quote:

Originally Posted by richerich (Post 166712)
Yeah, i used the "Add" blend to get it...

You can use blend modes in litepanels with blend = "ADD" (if you didn't try this already). If that doesn't help, maybe I can take a look to compare your layout and your kgpanels WTF settings.

Dajova 11-21-09 09:18 PM

Quote:

Originally Posted by Katae (Post 166713)
You can use blend modes in litepanels with blend = "ADD" (if you didn't try this already). If that doesn't help, maybe I can take a look to compare your layout and your kgpanels WTF settings.

tried it and it gave a change, but not the change im looking for :p
i can PM u the code that im using and my WTF for kgpanels.

Katae 11-21-09 11:04 PM

Quote:

Originally Posted by Katae (Post 166713)
You can use blend modes in litepanels with blend = "ADD".

Sorry, it should be bg_blend, not blend.

Ferous 11-23-09 02:47 AM

Okay nvm. I don't know what I did but its working now lol. Is there a way to set strata?

i.e.

Code:

framestrata = "background"

Katae 11-23-09 03:23 AM

Quote:

Originally Posted by Ferous (Post 166828)
Okay nvm. I don't know what I did but its working now lol. Is there a way to set strata?

Code:

framestrata = "background"

Code:

strata = "BACKGROUND"

Ferous 11-23-09 03:33 PM

Quote:

Originally Posted by Katae (Post 166832)
Code:

strata = "BACKGROUND"

kewl thanks katae :)

Ferous 11-23-09 04:43 PM

Okay one more question for you katae, how do I make experience on mouseover? Im sort of boggled on that one, and I am a noob! :) Thanks again and sorry to bug you! :)

-Ferous

Ferous 11-23-09 05:33 PM

Here is my progress :) LitePanels and Litestats! :O

http://i48.tinypic.com/2rndmdd.jpg

most of my addon memory is due to carbonite so ignore it :P My addon memory is around 2.5 to 3 MB

Katae 11-23-09 06:19 PM

Quote:

Originally Posted by Ferous (Post 166880)
Okay one more question for you katae, how do I make experience on mouseover?

In next version, once I'm done with it!



Quote:

Originally Posted by Ferous (Post 166886)
Here is my progress :) LitePanels and Litestats! :O

http://i48.tinypic.com/2rndmdd.jpg

most of my addon memory is due to carbonite so ignore it :P My addon memory is around 2.5 to 3 MB

Awesome :D

Ferous 11-25-09 01:22 AM

Hey there katae, I was curious as to why my border is showing up so funny? It is on the panel I want but it has some grey around it as well and I don't understand why its doing that >.> Here is the screeny:

http://i49.tinypic.com/x40huh.jpg

and here is the layout for this particular panel:

Code:

{        name = "Actionbar",
                        anchor_to = "CENTER",
                        y_off = -419,
                        width = 482,
                        height = 100,
                        bg_color = {0.30,0.30,0.30},
            strata = "LOW",       
                        border = "glowtex", border_color = "0 0 0",
                },

Also, just to clarify I mean this: http://i50.tinypic.com/11ttw6o.png

so I dont confizzle you as to what border im talking about :P

You know what Katae, never mind. I just saw there was a border_size and Im just an idiot! :) Sorry to bug you lol

-Ferous

Katae 11-25-09 01:39 AM

Quote:

Originally Posted by Ferous (Post 167040)
You know what Katae, never mind. I just saw there was a border_size and Im just an idiot! :) Sorry to bug you lol

Still quite strange and a likely bug, the default border_size is 16 and inset is supposed to be set to border_size / 4 even when only border is given.

Thanks for bringing it to my attention ;)

edit - Bug: When setting border_size, it sets inset to that number instead of the 0.25 multiplier as intended. Normally, if that multiplier doesn't yield the right inset size you need, you'd set inset manually, i.e inset = 16.

Long story short, in the next update you'll need to make use of inset if your border/inset doesn't match up. I'll probably hold off uploading until the 3.3 toc update.

Ferous 11-25-09 01:56 AM

Quote:

Originally Posted by Katae (Post 167043)
Still quite strange and a likely bug, the default border_size is 16 and inset is supposed to be set to border_size / 4 even when only border is given.

Thanks for bringing it to my attention ;)

No problem and sorry to bug you :P

-Ferous

Ferous 11-25-09 06:07 AM

I hope it was okay, as I seen some other Uis using litepanels, I included it in my package for noVeL Ui.

Heres a preview - http://s.wowinterface.com/preview/pvw33674.jpg

Much love to this awesome addon, it does so much more than I could imagine from kgPanels and I actually have to have less knowledge to use litepanels! :)

Thank you katae :)

-Ferous

Katae 11-25-09 06:30 AM

Quote:

Originally Posted by Ferous (Post 167052)
I hope it was okay, as I seen some other Uis using litepanels, I included it in my package for noVeL Ui.

Looks quite nice :D

cryptor_00 11-26-09 04:55 PM

Having trouble
 
Sadly, i'm having trouble getting this addon to show anything on my screen.

-I saved "layout_example" as "layout.lua" to the LitePanels folder in the addons folder, then enabled the addon on the character select screen. Nothing.

-Next, i wiped "layout.lua" and replaced it with the code you suggested under 'getting started' above, hoping to see the same bar in the screen shot. Restarted the game. Nothing.

At this point, i'm convinced i either A) am not putting "layout.lua" in the right place, or else B) i am missing some critical piece of code that should enable the whole thing.

Any help would be much appreciated.

Katae 11-26-09 05:11 PM

Your layout should look something like this. Make sure you don't have any syntax errors.

cryptor_00 11-26-09 05:39 PM

Thanks. That helped immensely.

And i have to say, that's some pretty quick service! Blizz could learn a thing or two from you :) Happy holiday.


EDIT: Thanks for helping me build this: http://i45.tinypic.com/actkc8.jpg

Keamos 11-27-09 07:49 PM



Super minimalist--anyone interested?

Dominos, LitePanels, LiteStats, Prat, pMinimap, Forte, SBF, MSBT, TipTac, Skada, cargBags, BigWigs and Vuhdo.

enagic 11-29-09 05:09 AM

Okay I got it down, but I really wanna avoid working on it luls.
I wanna copy your panel in the first one, but it keeps having me copying numbers. Could you post another one?

Katae 11-29-09 05:37 AM

Quote:

Originally Posted by enagic (Post 167392)
I wanna copy your panel in the first one, but it keeps having me copying numbers. Could you post another one?

Edited post.

enagic 11-29-09 02:08 PM

Thanks, so if I wanna move it, do you have any addons that tell you the X and Y offset in-game? It might help :D

Ferous 11-30-09 01:15 AM

Quote:

Originally Posted by Katae (Post 167481)
I don't know of addons that that will do that, I'd like to know this as well.

Aye me too :) I have to move, reload, then go back to .lua move, reload :P

Katae 11-30-09 01:41 AM

Here's a simple macro I just wrote for the x-y coords of the cursor.

Code:

/script local x,y=GetCursorPosition() local scale=UIParent:GetEffectiveScale() print(format(" x=%d y=%d",x/scale,y/scale))

Lordyfrb 11-30-09 03:58 AM

Hi just wondering if its possible to set a standand text format for all texts applied to my layout?

i.e. So when I changed the standard text formatting all my texts change.

Katae 11-30-09 04:08 AM

Quote:

Originally Posted by Lordyfrb (Post 167503)
Hi just wondering if its possible to set a standand text format for all texts applied to my layout?

i.e. So when I changed the standard text formatting all my texts change.

Easy, just create variables for your font at the beginning of your layout config, ie:

Code:

local text = {
  font = "Interface\\AddOns\\Path\\to\\font.ttf",
  size = 16,
  color = "1 1 1",
  -- etc
}

-- and for your text configs:
text = { font = text.font, size = text.size, color = text.color }


Lordyfrb 11-30-09 04:23 AM

Thanks for your quick reply, I'm gonna work on that now. :)

Tandurin 11-30-09 11:40 AM

Is there anyway I can make my panels say 1% of from the edges of the screen, with a standard issue width and height for a panel.

Katae 11-30-09 06:56 PM

Quote:

Originally Posted by Tandurin (Post 167530)
Is there anyway I can make my panels say 1% of from the edges of the screen, with a standard issue width and height for a panel.

If you're anchoring to the edge of the screen, you can set your x_off or y_off to "1%" and it will move the panels 1% of your screen height/width. You can also set your panel's height or width to "98%" and that will account for the 1% on both ends.

Tandurin 12-01-09 01:14 AM

Thanks for your reply! :D

Tandurin 12-02-09 10:58 AM

HI there again!

I've been trying to figure out what's wrong but I can't find anything. :S But somehow the code just doesn't work.

Here's a link to what I have: http://pastebin.com/m78ff171b

Katae 12-02-09 11:03 AM

Quote:

Originally Posted by Tandurin (Post 167732)
Here's a link to what I have: http://pastebin.com/m78ff171b

Fixed some things here, at the bottom.

Tandurin 12-02-09 11:14 AM

Wow that was fast!
Thank you very much! I'll go try it out right now. :D

Ferous 12-02-09 07:15 PM

Hey there katae, I hve a question. How would I go about adding a script to a panel and having an onclick so i can click it ingame for it to do something i.e.

Code:

/script ToggleHelpFrame()
Added to the panel? :) Thanks in advanced and im sorry but i have no idea how to go about doing this :O

-Ferous

Katae 12-02-09 08:21 PM

Quote:

Originally Posted by Ferous (Post 167793)
How would I go about adding a script to a panel and having an onclick so i can click it ingame for it to do something

Use the OnClick attribute:
Code:

OnClick = function(self, button)
    if button == "LeftButton" then
        -- do something
    elseif button == "RightButton" then
        -- do something else
    end
end

You can also check for modifiers with IsShiftKeyDown() or IsAltKeyDown().

Ferous 12-03-09 06:48 PM

zomg i got it thanks! :)

Quote:

Code:

{        name = "help",
                        anchor_to = "CENTER",
                        width = "20",
                        height = "20",
                        bg_color = {0,0,0},
                        OnClick = function(self, button)
                                if button == "LeftButton" then
                                        ToggleHelpFrame()
                                end
                        end
                },


Its so easy lol I had put script "togglehelpframe()" but then realized its already a script... get rid of script lol thanks again >.> Im still learning.

kk having problem adding text for some reason? :O

Here is the link its kinda long didn't want to make post big

http://snipt.org/pnok

Katae 12-03-09 08:29 PM

Quote:

Originally Posted by Ferous (Post 167914)
kk having problem adding text for some reason? :O

Here is the link its kinda long didn't want to make post big

http://snipt.org/pnok

You missed a comma after the OnClick function :)

Ferous 12-03-09 09:19 PM

oh hahah its always the little things :P

Thanks again katae :)

Ferous 12-04-09 12:31 AM

Just an update to show you what I did Katae :)

http://i47.tinypic.com/2uxxst1.jpg

? is GM and help and ! is achievements :p I couldn't figure out how to toggle the QuestLogFrame >.>


All times are GMT -6. The time now is 08:33 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI