Thread Tools Display Modes
02-14-20, 08:56 PM   #1
enterLivi
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 3
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
  Reply With Quote
02-16-20, 12:23 PM   #2
enterLivi
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 3
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!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ScrollingMessageFrame and letters getting cut off

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