Thread Tools Display Modes
03-23-23, 04:04 PM   #1
wootan12
A Murloc Raider
Join Date: Mar 2023
Posts: 4
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.
  Reply With Quote
03-23-23, 04:44 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,857
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)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
03-23-23, 09:00 PM   #3
wootan12
A Murloc Raider
Join Date: Mar 2023
Posts: 4
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.

  Reply With Quote
03-25-23, 11:11 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,857
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
03-25-23, 11:35 PM   #5
wootan12
A Murloc Raider
Join Date: Mar 2023
Posts: 4
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.
  Reply With Quote
03-26-23, 12:10 AM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,857
Originally Posted by wootan12 View Post
I wish I could do anything for you.
Have fun!
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Help me plz

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off