WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   What is the proper way to make a resizeable messageframe? (https://www.wowinterface.com/forums/showthread.php?t=40558)

tobindax 06-22-11 09:01 AM

What is the proper way to make a resizeable messageframe?
 
I made a message frame that is seemingly stable but when reziing it, sometimes, it loses one of the the three lines it has to show and it shows only two from thereon regardless of further resizing unless /reload.

I do not know if it's a system quirk or something I've done.

The message frame is made with

msg_frame = CreateFrame("MessageFrame", "Msg_Frame", main_frame);
msg_frame:SetFading(false); -- do not fade
msg_frame:SetInsertMode("BOTTOM"); -- start from bottom
msg_frame:SetJustifyH("RIGHT"); -- justify right to arrange numbers in a readable fashion

It's sized with

msg_frame:SetFont("Fonts\\FRIZQT__.TTF", size, "OUTLINE");
msg_frame:SetWidth(DEFAULT_WIDTH); -- a big number
msg_frame:SetHeight(size*4);

It's then populated with

msg_frame:AddMessage("text line 1");
msg_frame:AddMessage("text line 2");
msg_frame:AddMessage("text line 3");

I suspect the "ninja" way of resizing it with "size*4" may need improvement but not sure if the instability comes from there.


edit: By the way, even with a "SetScale", the instability of losing a line sometimes occured.


All times are GMT -6. The time now is 11:36 AM.

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