Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local backdrop = {
- bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
- edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16,
- insets = { left = 4, right = 3, top = 4, bottom = 3 }
- }
- local f = CreateFrame("Frame",nil,UIParent)
- f:SetFrameStrata("BACKGROUND")
- f:SetWidth(200)
- f:SetHeight(100)
- f:SetBackdrop(backdrop)
- f:SetBackdropColor(0, 0, 0)
- f:SetBackdropBorderColor(0.4, 0.4, 0.4)
- local editBox = CreateFrame("EditBox", "testbox", f);
- editBox:SetAllPoints();
- editBox:SetFontObject(ChatFontNormal)
- editBox:SetMultiLine(true)
- editBox:EnableMouse(true)
- editBox:SetAutoFocus(false)
- f:SetPoint("CENTER",0,0)
- f:Show()
- local lastFrame;
- f:SetScript("OnUpdate", function()
- if(not lastFrame) then
- lastFrame = GetTime();
- else
- local timeSinceLastFrame = GetTime() - lastFrame;
- if (timeSinceLastFrame > 1) then
- print("Took", timeSinceLastFrame);
- end
- lastFrame = GetTime();
- end
- end);
Add Comment
Please, Sign In to add comment