WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Wish List (https://www.wowinterface.com/forums/forumdisplay.php?f=15)
-   -   Help me plz (https://www.wowinterface.com/forums/showthread.php?t=59539)

wootan12 03-23-23 04:04 PM

Help me plz
 
I'd like to move a position of item count in inventory.
I managed to make it smaller than the first, but I can't move it.
I've tried to find setPosition or something but I couldn't find it in the end.

Here is my addon that I made by myself.

------------------------------------------------------------
local frame = CreateFrame("Frame")
frame:SetScript("OnEvent", function()
NumberFont_Outline_Med:SetFont("Fonts\\arialn.ttf", 13, "OUTLINE")

stackCount:SetPoint("BOTTOMRIGHT", -1, 0) <-- This is what I'm trying to figure out. (It doesn't work)
end)

frame:RegisterEvent("PLAYER_LOGIN")
--------------------------------------------------------------
I don't have any idea about lua, I just mimicked it.
I'd like anyone to move item stacks count to bottomright, 0, 0.

Fizzlemizz 03-23-23 04:44 PM

SetPoint is addative so if the fontstring was originally set using another point(s) this will move that one point and leave the other(s) in place:
Lua Code:
  1. stackCount:ClearAllPoints()
  2. stackCount:SetPoint("BOTTOMRIGHT", -1, 0)

wootan12 03-23-23 09:00 PM

Thank you for your reply
 
I've add those lines, but it doesn't work and even font doesn't work..


local frame = CreateFrame("Frame")
frame:SetScript("OnEvent", function()
NumberFont_Outline_Med:SetFont("Fonts\\arialn.ttf", 13, "OUTLINE")

stackCount:ClearAllPoints()
stackCount:SetPoint("BOTTOMRIGHT", -1, 0)

frame:RegisterEvent("PLAYER_LOGIN")

If my own addon would be a problem, is there any way to make the item count number moved to bottomright, 0, 0?

Here is my inventory in game. I want the item count number font which is smaller and moved to bottomright.


Fizzlemizz 03-25-23 11:11 AM

If you were just using the default UI bag setup you could

Lua Code:
  1. local function Rescale(self)
  2.     self.Count:SetScale(1)
  3. end
  4.  
  5. local function Reset(self)
  6.     self.Count:ClearAllPoints()
  7.     self.Count:SetPoint("BOTTOMRIGHT", 0, 0)
  8.     self.Count:SetFont("Fonts\\arialn.ttf", 13, "OUTLINE")
  9. end
  10.  
  11. for i = 1, NUM_TOTAL_BAG_FRAMES do
  12.     local bag = _G["ContainerFrame" .. i]
  13.     for k, v in pairs(bag.Items) do
  14.         Reset(v)
  15.         Rescale(v)
  16.         hooksecurefunc(v, "SetItemButtonAnchorPoint", Reset)
  17.         hooksecurefunc(v, "SetItemButtonScale", Reset)
  18.  
  19.     end
  20. end

But a bag addon might alter bag/ItemButton configuration so your milage may vary.

wootan12 03-25-23 11:35 PM

Omg Jesus Thank You Sooooo Much
 
OMG You are my saint and my hero. God dang it I can't thank enough.
Thank you sooooo much!!!!!
You solved my problem!
I wish I could do anything for you.

Fizzlemizz 03-26-23 12:10 AM

Quote:

Originally Posted by wootan12 (Post 342285)
I wish I could do anything for you.

Have fun! :)


All times are GMT -6. The time now is 07:55 PM.

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