WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   How to make a visible window? image link in disc (https://www.wowinterface.com/forums/showthread.php?t=55050)

wille480 02-04-17 06:32 PM

How to make a visible window? image link in disc
 
http://imgur.com/a/a6RGc

How do i create a window like this one in wow?
Pretty straight forward question^^

myrroddin 02-05-17 04:44 PM

That looks like SexyInterrrupter, in which case, look at the code in any text editor.

wille480 02-06-17 03:11 AM

Quote:

Originally Posted by myrroddin (Post 321884)
That looks like SexyInterrrupter, in which case, look at the code in any text editor.

Correct! That is sexy interrupter, i did check the code several times to find the one but simply could not find it:/, would u mind help me?^^
Just the code for the window ,

wille480 02-06-17 12:35 PM

Here is github page for sexyinterrupter, I have tried to find what code section that creates the window but i have failed. I really can not find it.

https://github.com/apnotix/SexyInter...aster/core.lua

myrroddin 02-06-17 03:59 PM

Lines 69 -95. The rest is either creating the anchor, or the announce frame.

wille480 02-20-17 07:28 AM

Create a window table().
 
http://imgur.com/9X12qCc

Hello! how do i create a window like this shown with the image link above? Without the names , just the window
it is from sexyinterrupter. I just want to be able to have the code that makes the window.
All help i need is to create a window like that and then i can continue ,

Here is the github code for sexyinterrupter.
https://github.com/apnotix/SexyInter...aster/core.lua

Please help me with this . I made a post about this before but did not get the help i needed.
Best regards!

Kanegasi 02-20-17 08:57 AM

You said you want the code to make that window, but you just linked it. The basic creation of the box is under SexyInterrupter:CreateUi(). Do what I do: take a chunk of that code, research the function/widget names, and make a standalone example work.

wille480 02-20-17 09:59 AM

Quote:

Originally Posted by Kanegasi (Post 322304)
You said you want the code to make that window, but you just linked it. The basic creation of the box is under SexyInterrupter:CreateUi(). Do what I do: take a chunk of that code, research the function/widget names, and make a standalone example work.

Hey!
Yeah i have tried but there is alot of unverified variables just taking from the createui() block. There included ("LibSharedMedia-3.0"); which i have in my folder but there is also that function at line 18 (self) which is included in createui block which i just can't get to work :/

briskman3000 02-20-17 11:16 AM

If all you want is a frame with a border, and not have to worry about Libs, this should create a simple 200x100 frame for you to work with

Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent)
  2. frame:SetSize(200, 100)
  3. frame:SetPoint("CENTER")
  4. frame:SetBackdrop({
  5.     bgFile="Interface\\Tooltips\\UI-Tooltip-Background",
  6.     edgeFile="Interface\\Tooltips\\UI-Tooltip-Border",
  7.     tile=false,
  8.     tileSize=0,
  9.     edgeSize=2,})
  10. frame:SetBackdropColor(0,0,0,0.5)
  11. frame:SetBackdropBorderColor(0,0,0,1)

Seerah 02-20-17 12:15 PM

I've merged your two threads together.

wille480 02-20-17 02:52 PM

Quote:

Originally Posted by briskman3000 (Post 322308)
If all you want is a frame with a border, and not have to worry about Libs, this should create a simple 200x100 frame for you to work with

Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent)
  2. frame:SetSize(200, 100)
  3. frame:SetPoint("CENTER")
  4. frame:SetBackdrop({
  5.     bgFile="Interface\\Tooltips\\UI-Tooltip-Background",
  6.     edgeFile="Interface\\Tooltips\\UI-Tooltip-Border",
  7.     tile=false,
  8.     tileSize=0,
  9.     edgeSize=2,})
  10. frame:SetBackdropColor(0,0,0,0.5)
  11. frame:SetBackdropBorderColor(0,0,0,1)

Hello! Dude thank you , I have tried litterly for days trying to just make a fraking window , Those libraries drives me insane , Especially trying to work with sexyinterupter code because everything is mixed in to eachother so hard to sort that code out.

best regards!

wille480 02-21-17 02:07 AM

Just a question off topic.

Is this a acceptable way to store variables in an array? Going to have mulitple spellinfos in debuffs array and i want unitdebuff("raid1", debuffs) to look for any of those debuffs on the raid1 unit.

Lua Code:
  1. taintofthesea = GetSpellInfo(228054)
  2. TimeRelease = GetSpellInfo(219965)
  3.  
  4. local debuffs = {taintofthesea, TimeRelease}
  5. local name, _, _, _, _, duration, expires = UnitDebuff("raid1", debuffs)

If this is the wrong way please help me just make the correct array : ).
What i want in short is to unitdebuff() to be searching the debuffs array for any of those debuffs on the raid1 unutid target.
best regards!

Lombra 02-21-17 07:11 AM

Do unpack(debuffs).

Edit: Or wait, you want to look for two different buffs? Then you need to do a loop over debuffs and call UnitDebuff for both values individually.

wille480 02-21-17 07:16 AM

Quote:

Originally Posted by Lombra (Post 322320)
Do unpack(debuffs).

Edit: Or wait, you want to look for two different buffs? Then you need to do a loop over debuffs and call UnitDebuff for both values individually.

Hey , yea well i am making a assist addon that will help with dispelling .
Basicly it will list characther name in a window. That is why i have an array of debuffs that i want unitdebuff to be looking for.

So i dont have to create different unitdebuff() methods for each debuff.
Please help me give a example code :)

Best regards!

Fizzlemizz 02-21-17 09:28 AM

Lua Code:
  1. for key, value in pairs(debuffs) do
  2.     local name, _, _, _, _, duration, expires = UnitDebuff("raid1", value)
  3.     -- do whatever here
  4. end

does an unordered loop throught the table.

wille480 02-21-17 09:51 AM

Quote:

Originally Posted by Fizzlemizz (Post 322323)
Lua Code:
  1. for key, value in pairs(debuffs) do
  2.     local name, _, _, _, _, duration, expires = UnitDebuff("raid1", value)
  3.     -- do whatever here
  4. end

does an unordered loop throught the table.

Ah okey thank you! , i always imagine doing a foor loop like.


For i=0, 2 do

local name, _, _, _, _, duration, expires = UnitDebuff("raid1",debuffs[i])

Fizzlemizz 02-21-17 10:31 AM

Quote:

Originally Posted by wille480 (Post 322324)
Ah okey thank you! , i always imagine doing a foor loop like.


For i=0, 2 do

local name, _, _, _, _, duration, expires = UnitDebuff("raid1",debuffs[i])

for i=1, 2 do
...
end

lua is 1 based but that would have worked also as the keys will be created when you add items to the table. If you print the key in the pairs loop it will print 1, 2 etc.


All times are GMT -6. The time now is 03:47 PM.

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