If you wish to help support this site please disable your adblock program.


Click here to become a Premium Member : No ads site-wide : Forum privileges : Upgraded services : Giveaway & moreSupport the Site! Support Us!
Tukui » Lua Script Help » Panels
  1. Challenger blane
    offline
    Member

    XP: 
     

    5 / 1337

    Hello i have find a lot with of things i can do with the Panels under the Chat but i didn't find how to make it Longer..
    can anyone help me.

    blane

    Posted 2 years ago - #1
     


  2. If you wish to help support this site please disable your adblock program.


    Rival Lanaii
    offline
    Member

    XP: 
     

    461 / 1337

    which ui version did you use?
    pls post your code

    Posted 2 years ago - #2
     
  3. Challenger blane
    offline
    Member

    XP: 
     

    5 / 1337

    i use version t14.28, and i do not find the line.

    local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
    
    local TukuiBar1 = CreateFrame("Frame", "TukuiBar1", UIParent, "SecureHandlerStateTemplate")
    TukuiBar1:CreatePanel("Default", 1, 1, "BOTTOM", UIParent, "BOTTOM", 0, 14)
    TukuiBar1:SetWidth((T.buttonsize * 12) + (T.buttonspacing * 13))
    TukuiBar1:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3))
    TukuiBar1:SetFrameStrata("BACKGROUND")
    TukuiBar1:SetFrameLevel(1)
    
    local TukuiBar2 = CreateFrame("Frame", "TukuiBar2", UIParent)
    TukuiBar2:CreatePanel("Default", 1, 1, "BOTTOMRIGHT", TukuiBar1, "BOTTOMLEFT", -6, 0)
    TukuiBar2:SetWidth((T.buttonsize * 6) + (T.buttonspacing * 7))
    TukuiBar2:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3))
    TukuiBar2:SetFrameStrata("BACKGROUND")
    TukuiBar2:SetFrameLevel(2)
    TukuiBar2:SetAlpha(0)
    if T.lowversion then
    	TukuiBar2:SetAlpha(0)
    else
    	TukuiBar2:SetAlpha(1)
    end
    
    local TukuiBar3 = CreateFrame("Frame", "TukuiBar3", UIParent)
    TukuiBar3:CreatePanel("Default", 1, 1, "BOTTOMLEFT", TukuiBar1, "BOTTOMRIGHT", 6, 0)
    TukuiBar3:SetWidth((T.buttonsize * 6) + (T.buttonspacing * 7))
    TukuiBar3:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3))
    TukuiBar3:SetFrameStrata("BACKGROUND")
    TukuiBar3:SetFrameLevel(2)
    if T.lowversion then
    	TukuiBar3:SetAlpha(0)
    else
    	TukuiBar3:SetAlpha(1)
    end
    
    local TukuiBar4 = CreateFrame("Frame", "TukuiBar4", UIParent)
    TukuiBar4:CreatePanel("Default", 1, 1, "BOTTOM", UIParent, "BOTTOM", 0, 14)
    TukuiBar4:SetWidth((T.buttonsize * 12) + (T.buttonspacing * 13))
    TukuiBar4:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3))
    TukuiBar4:SetFrameStrata("BACKGROUND")
    TukuiBar4:SetFrameLevel(2)
    TukuiBar4:SetAlpha(0)
    
    local TukuiBar5 = CreateFrame("Frame", "TukuiBar5", UIParent)
    TukuiBar5:CreatePanel("Default", 1, (T.buttonsize * 12) + (T.buttonspacing * 13), "RIGHT", UIParent, "RIGHT", -23, -14)
    TukuiBar5:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2))
    TukuiBar5:SetFrameStrata("BACKGROUND")
    TukuiBar5:SetFrameLevel(2)
    TukuiBar5:SetAlpha(0)
    
    local TukuiBar6 = CreateFrame("Frame", "TukuiBar6", UIParent)
    TukuiBar6:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2))
    TukuiBar6:SetHeight((T.buttonsize * 12) + (T.buttonspacing * 13))
    TukuiBar6:SetPoint("LEFT", TukuiBar5, "LEFT", 0, 0)
    TukuiBar6:SetFrameStrata("BACKGROUND")
    TukuiBar6:SetFrameLevel(2)
    TukuiBar6:SetAlpha(0)
    
    local TukuiBar7 = CreateFrame("Frame", "TukuiBar7", UIParent)
    TukuiBar7:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2))
    TukuiBar7:SetHeight((T.buttonsize * 12) + (T.buttonspacing * 13))
    TukuiBar7:SetPoint("TOP", TukuiBar5, "TOP", 0 , 0)
    TukuiBar7:SetFrameStrata("BACKGROUND")
    TukuiBar7:SetFrameLevel(2)
    TukuiBar7:SetAlpha(0)
    
    local petbg = CreateFrame("Frame", "TukuiPetBar", UIParent, "SecureHandlerStateTemplate")
    petbg:CreatePanel("Default", T.petbuttonsize + (T.petbuttonspacing * 2), (T.petbuttonsize * 10) + (T.petbuttonspacing * 11), "RIGHT", TukuiBar5, "LEFT", -6, 0)
    
    local ltpetbg1 = CreateFrame("Frame", "TukuiLineToPetActionBarBackground", petbg)
    ltpetbg1:CreatePanel("Default", 24, 265, "LEFT", petbg, "RIGHT", 0, 0)
    ltpetbg1:SetParent(petbg)
    ltpetbg1:SetFrameStrata("BACKGROUND")
    ltpetbg1:SetFrameLevel(0)
    
    -- INVISIBLE FRAME COVERING BOTTOM ACTIONBARS JUST TO PARENT UF CORRECTLY
    local invbarbg = CreateFrame("Frame", "InvTukuiActionBarBackground", UIParent)
    if T.lowversion then
    	invbarbg:SetPoint("TOPLEFT", TukuiBar1)
    	invbarbg:SetPoint("BOTTOMRIGHT", TukuiBar1)
    	TukuiBar2:Hide()
    	TukuiBar3:Hide()
    else
    	invbarbg:SetPoint("TOPLEFT", TukuiBar2)
    	invbarbg:SetPoint("BOTTOMRIGHT", TukuiBar3)
    end
    
    -- LEFT VERTICAL LINE
    local ileftlv = CreateFrame("Frame", "TukuiInfoLeftLineVertical", TukuiBar1)
    ileftlv:CreatePanel("Default", 2, 130, "BOTTOMLEFT", UIParent, "BOTTOMLEFT", 22, 30)
    
    -- RIGHT VERTICAL LINE
    local irightlv = CreateFrame("Frame", "TukuiInfoRightLineVertical", TukuiBar1)
    irightlv:CreatePanel("Default", 2, 130, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -22, 30)
    
    if not C.chat.background then
    	-- CUBE AT LEFT, ACT AS A BUTTON (CHAT MENU)
    	local cubeleft = CreateFrame("Frame", "TukuiCubeLeft", TukuiBar1)
    	cubeleft:CreatePanel("Default", 10, 10, "BOTTOM", ileftlv, "TOP", 0, 0)
    	cubeleft:EnableMouse(true)
    	cubeleft:SetScript("OnMouseDown", function(self, btn)
    		if TukuiInfoLeftBattleGround and UnitInBattleground("player") then
    			if btn == "RightButton" then
    				if TukuiInfoLeftBattleGround:IsShown() then
    					TukuiInfoLeftBattleGround:Hide()
    				else
    					TukuiInfoLeftBattleGround:Show()
    				end
    			end
    		end
    
    		if btn == "LeftButton" then
    			ToggleFrame(ChatMenu)
    		end
    	end)
    
    	-- CUBE AT RIGHT, ACT AS A BUTTON (CONFIGUI or BG'S)
    	local cuberight = CreateFrame("Frame", "TukuiCubeRight", TukuiBar1)
    	cuberight:CreatePanel("Default", 10, 10, "BOTTOM", irightlv, "TOP", 0, 0)
    	if C["bags"].enable then
    		cuberight:EnableMouse(true)
    		cuberight:SetScript("OnMouseDown", function(self)
    			if T.toc < 40200 then ToggleKeyRing() else ToggleAllBags() end
    		end)
    	end
    end
    
    -- HORIZONTAL LINE LEFT
    local ltoabl = CreateFrame("Frame", "TukuiLineToABLeft", TukuiBar1)
    ltoabl:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0)
    ltoabl:ClearAllPoints()
    ltoabl:Point("BOTTOMLEFT", ileftlv, "BOTTOMLEFT", 0, 0)
    ltoabl:Point("RIGHT", TukuiBar1, "BOTTOMLEFT", -1, 17)
    ltoabl:SetFrameStrata("BACKGROUND")
    ltoabl:SetFrameLevel(1)
    
    -- HORIZONTAL LINE RIGHT
    local ltoabr = CreateFrame("Frame", "TukuiLineToABRight", TukuiBar1)
    ltoabr:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0)
    ltoabr:ClearAllPoints()
    ltoabr:Point("LEFT", TukuiBar1, "BOTTOMRIGHT", 1, 17)
    ltoabr:Point("BOTTOMRIGHT", irightlv, "BOTTOMRIGHT", 0, 0)
    ltoabr:SetFrameStrata("BACKGROUND")
    ltoabr:SetFrameLevel(1)
    
    -- MOVE/HIDE SOME ELEMENTS IF CHAT BACKGROUND IS ENABLED
    local movechat = 0
    if C.chat.background then movechat = 10 ileftlv:SetAlpha(0) irightlv:SetAlpha(0) end
    
    -- INFO LEFT (FOR STATS)
    local ileft = CreateFrame("Frame", "TukuiInfoLeft", TukuiBar1)
    ileft:CreatePanel("Default", T.InfoLeftRightWidth, 23, "LEFT", ltoabl, "LEFT", 14 - movechat, 0)
    ileft:SetFrameLevel(2)
    ileft:SetFrameStrata("BACKGROUND")
    
    -- INFO RIGHT (FOR STATS)
    local iright = CreateFrame("Frame", "TukuiInfoRight", TukuiBar1)
    iright:CreatePanel("Default", T.InfoLeftRightWidth, 23, "RIGHT", ltoabr, "RIGHT", -14 + movechat, 0)
    iright:SetFrameLevel(2)
    iright:SetFrameStrata("BACKGROUND")
    
    if C.chat.background then
    	-- Alpha horizontal lines because all panels is dependent on this frame.
    	ltoabl:SetAlpha(0)
    	ltoabr:SetAlpha(0)
    
    	-- CHAT BG LEFT
    	local chatleftbg = CreateFrame("Frame", "TukuiChatBackgroundLeft", TukuiInfoLeft)
    	chatleftbg:CreatePanel("Transparent", T.InfoLeftRightWidth + 12, 177, "BOTTOM", TukuiInfoLeft, "BOTTOM", 0, -6)
    
    	-- CHAT BG RIGHT
    	local chatrightbg = CreateFrame("Frame", "TukuiChatBackgroundRight", TukuiInfoRight)
    	chatrightbg:CreatePanel("Transparent", T.InfoLeftRightWidth + 12, 177, "BOTTOM", TukuiInfoRight, "BOTTOM", 0, -6)
    
    	-- LEFT TAB PANEL
    	local tabsbgleft = CreateFrame("Frame", "TukuiTabsLeftBackground", TukuiBar1)
    	tabsbgleft:CreatePanel("Default", T.InfoLeftRightWidth, 23, "TOP", chatleftbg, "TOP", 0, -6)
    	tabsbgleft:SetFrameLevel(2)
    	tabsbgleft:SetFrameStrata("BACKGROUND")
    
    	-- RIGHT TAB PANEL
    	local tabsbgright = CreateFrame("Frame", "TukuiTabsRightBackground", TukuiBar1)
    	tabsbgright:CreatePanel("Default", T.InfoLeftRightWidth, 23, "TOP", chatrightbg, "TOP", 0, -6)
    	tabsbgright:SetFrameLevel(2)
    	tabsbgright:SetFrameStrata("BACKGROUND")
    
    	-- [[ Create new horizontal line for chat background ]] --
    	-- HORIZONTAL LINE LEFT
    	local ltoabl2 = CreateFrame("Frame", "TukuiLineToABLeftAlt", TukuiBar1)
    	ltoabl2:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0)
    	ltoabl2:ClearAllPoints()
    	ltoabl2:Point("RIGHT", TukuiBar1, "LEFT", 0, 16)
    	ltoabl2:Point("BOTTOMLEFT", chatleftbg, "BOTTOMRIGHT", 0, 16)
    
    	-- HORIZONTAL LINE RIGHT
    	local ltoabr2 = CreateFrame("Frame", "TukuiLineToABRightAlt", TukuiBar1)
    	ltoabr2:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0)
    	ltoabr2:ClearAllPoints()
    	ltoabr2:Point("LEFT", TukuiBar1, "RIGHT", 0, 16)
    	ltoabr2:Point("BOTTOMRIGHT", chatrightbg, "BOTTOMLEFT", 0, 16)
    end
    
    if TukuiMinimap then
    	local minimapstatsleft = CreateFrame("Frame", "TukuiMinimapStatsLeft", TukuiMinimap)
    	minimapstatsleft:CreatePanel("Default", ((TukuiMinimap:GetWidth() + 4) / 2) -3, 19, "TOPLEFT", TukuiMinimap, "BOTTOMLEFT", 0, -2)
    
    	local minimapstatsright = CreateFrame("Frame", "TukuiMinimapStatsRight", TukuiMinimap)
    	minimapstatsright:CreatePanel("Default", ((TukuiMinimap:GetWidth() + 4) / 2) -3, 19, "TOPRIGHT", TukuiMinimap, "BOTTOMRIGHT", 0, -2)
    end
    
    --BATTLEGROUND STATS FRAME
    if C["datatext"].battleground == true then
    	local bgframe = CreateFrame("Frame", "TukuiInfoLeftBattleGround", UIParent)
    	bgframe:CreatePanel("Default", 1, 1, "TOPLEFT", UIParent, "BOTTOMLEFT", 0, 0)
    	bgframe:SetAllPoints(ileft)
    	bgframe:SetFrameStrata("LOW")
    	bgframe:SetFrameLevel(0)
    	bgframe:EnableMouse(true)
    end
    
    Posted 2 years ago - #3
     
  4. Hero Jasje
    offline
    VIP

    XP: 
     

    1337 / 1337

    or core/init

    T.InfoLeftRightWidth = 370
    Every man is the architect of his own fortune.
    Posted 2 years ago - #4
     
  5. Hero Hydra
    online
    Overlord

    XP: 
     

    1337 / 1337

    blane said:
    Where i must put that in?

    No, no

    It's already there

    Tukui/core/init.lua

    T.InfoLeftRightWidth = 370

    Change the value of 370 as desired, save the file and /rl ingame

    I don't suffer from insanity, I enjoy it.
    Posted 2 years ago - #5
     
  6. Challenger blane
    offline
    Member

    XP: 
     

    5 / 1337

    is there any code how i can make the left panel longer than the right panel?

    Posted 2 years ago - #6
     
  7. Gladiator Sniffles
    offline
    VIP

    XP: 
     

    1175 / 1337

    Line 151:

    -- INFO LEFT (FOR STATS)
    local ileft = CreateFrame("Frame", "TukuiInfoLeft", TukuiBar1)
    ileft:CreatePanel("Default", VALUE_HERE, 23, "LEFT", ltoabl, "LEFT", 14 - movechat, 0)
    ileft:SetFrameLevel(2)
    ileft:SetFrameStrata("BACKGROUND")
    Tukui>modules>maps>minimap.lua ; Line 7
    Posted 2 years ago - #7
     
  8. Challenger blane
    offline
    Member

    XP: 
     

    5 / 1337

    No...the Post from "HYDRA" works, but i want the longer, not higher or something.

    in your post "SNIFFLES" i can change the high not the long.
    I want the Left panel <450> and the Right <400>...somthing like that.

    Sniffles said:
    Line 151:

    -- INFO LEFT (FOR STATS)
    local ileft = CreateFrame("Frame", "TukuiInfoLeft", TukuiBar1)
    ileft:CreatePanel("Default", VALUE_HERE, 23, "LEFT", ltoabl, "LEFT", 14 - movechat, 0)
    ileft:SetFrameLevel(2)
    ileft:SetFrameStrata("BACKGROUND")
    Posted 2 years ago - #8
     
  9. Hero Jasje
    offline
    VIP

    XP: 
     

    1337 / 1337

    Sniffles add the VALUE_HERE part it it should be like this for you

    ileft:CreatePanel("Default", 450, 23, "LEFT", ltoabl, "LEFT", 14 - movechat, 0)

    so 450 is width and 23 is height

    Every man is the architect of his own fortune.
    Posted 2 years ago - #9
     
RSS feed for this topic

Reply

You must log in to post.