WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   ScrollingMessageFrame and letters getting cut off (https://www.wowinterface.com/forums/showthread.php?t=57820)

enterLivi 02-14-20 08:56 PM

ScrollingMessageFrame and letters getting cut off
 
Hello!



This is a message added to a ScrollingMessageFrame in InsertMode 2, so starting at the bottom. Is there a way to bump it up a few pixels, so those specific letters don't get cut off by the frame's edge? Moving/resizing the frame will cause the fontstrings to "jump" a pixel up and down, as it likes to do, so it is possible to get it to display perfectly, but I'd like to avoid the occasional glitch.

Thank you

enterLivi 02-16-20 12:23 PM

I found a solution, for anyone running into the same issue. The ScrollingMessageFrame keeps an indexed table of visible lines, called visibleLines, where 1 (at least in my case, with insertMode 2) is the first one, and RefreshLayout gets called every time the frame gets resized, moved, etc.

Lua Code:
  1. hooksecurefunc(f, "RefreshLayout", function(self, ...)
  2.         if self.visibleLines[1] ~= nil then
  3.             self.visibleLines[1]:SetPoint("BOTTOMLEFT", 0, 2)
  4.         end
  5. end)

Where f is the SMF itself. Anyway, works for now!


All times are GMT -6. The time now is 08:43 PM.

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