mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 11:50:49 +00:00
extend chat inputbox to be a movable frame
This commit is contained in:
+21
-7
@@ -436,17 +436,31 @@ pfUI:RegisterModule("chat", function ()
|
|||||||
ChatFrameMenuButton:SetHeight(6)
|
ChatFrameMenuButton:SetHeight(6)
|
||||||
ChatFrameMenuButton:SetWidth(6)
|
ChatFrameMenuButton:SetWidth(6)
|
||||||
|
|
||||||
ChatFrameEditBox:ClearAllPoints()
|
pfUI.chat.editbox = CreateFrame("Frame", "pfChatInputBox", UIParent)
|
||||||
ChatFrameEditBox:SetHeight(22)
|
if pfUI_config.chat.text.input_height == "0" then
|
||||||
ChatFrameEditBox:SetPoint("BOTTOMLEFT", pfUI.bars.bottom, "TOPLEFT", 0, 5)
|
pfUI.chat.editbox:SetHeight(22)
|
||||||
ChatFrameEditBox:SetPoint("BOTTOMRIGHT", pfUI.bars.bottom, "TOPRIGHT", 0, 5)
|
else
|
||||||
|
pfUI.chat.editbox:SetHeight(pfUI_config.chat.text.input_height)
|
||||||
|
end
|
||||||
|
|
||||||
|
if pfUI_config.chat.text.input_width == "0" then
|
||||||
|
pfUI.chat.editbox:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12) -- actionbar size
|
||||||
|
else
|
||||||
|
pfUI.chat.editbox:SetWidth(pfUI_config.chat.text.input_width)
|
||||||
|
end
|
||||||
|
|
||||||
|
pfUI.chat.editbox:ClearAllPoints()
|
||||||
|
pfUI.chat.editbox:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5)
|
||||||
|
pfUI.utils:loadPosition(pfUI.chat.editbox)
|
||||||
|
|
||||||
|
ChatFrameEditBox:SetParent(pfUI.chat.editbox)
|
||||||
ChatFrameEditBox:SetBackdrop(pfUI.backdrop)
|
ChatFrameEditBox:SetBackdrop(pfUI.backdrop)
|
||||||
|
ChatFrameEditBox:SetAllPoints(pfUI.chat.editbox)
|
||||||
|
|
||||||
for i,v in ipairs({ChatFrameEditBox:GetRegions()}) do
|
for i,v in ipairs({ChatFrameEditBox:GetRegions()}) do
|
||||||
if i==6 or i==7 or i==8 then
|
if i==6 or i==7 or i==8 then v:Hide() end
|
||||||
v:SetTexture(0,0,0,1)
|
if v.SetFont then
|
||||||
v:SetHeight(ChatFrameEditBox:GetHeight())
|
v:SetFont("Interface\\AddOns\\pfUI\\fonts\\arial.ttf", pfUI_config.global.font_size + 1, "OUTLINE")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ChatFrameEditBox:SetAltArrowKeyMode(false)
|
ChatFrameEditBox:SetAltArrowKeyMode(false)
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
|
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
|
||||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||||
|
pfUI:UpdateConfig("chat", "text", "input_width", "0")
|
||||||
|
pfUI:UpdateConfig("chat", "text", "input_height", "0")
|
||||||
pfUI:UpdateConfig("chat", "text", "time", "0")
|
pfUI:UpdateConfig("chat", "text", "time", "0")
|
||||||
pfUI:UpdateConfig("chat", "text", "timeformat", "%H:%M:%S")
|
pfUI:UpdateConfig("chat", "text", "timeformat", "%H:%M:%S")
|
||||||
pfUI:UpdateConfig("chat", "text", "timebracket", "[]")
|
pfUI:UpdateConfig("chat", "text", "timebracket", "[]")
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
pfUI.uf.raid[26], pfUI.uf.raid[27], pfUI.uf.raid[28], pfUI.uf.raid[29], pfUI.uf.raid[30],
|
pfUI.uf.raid[26], pfUI.uf.raid[27], pfUI.uf.raid[28], pfUI.uf.raid[29], pfUI.uf.raid[30],
|
||||||
pfUI.uf.raid[31], pfUI.uf.raid[32], pfUI.uf.raid[33], pfUI.uf.raid[34], pfUI.uf.raid[35],
|
pfUI.uf.raid[31], pfUI.uf.raid[32], pfUI.uf.raid[33], pfUI.uf.raid[34], pfUI.uf.raid[35],
|
||||||
pfUI.uf.raid[36], pfUI.uf.raid[37], pfUI.uf.raid[38], pfUI.uf.raid[39], pfUI.uf.raid[40],
|
pfUI.uf.raid[36], pfUI.uf.raid[37], pfUI.uf.raid[38], pfUI.uf.raid[39], pfUI.uf.raid[40],
|
||||||
|
pfUI.chat.editbox,
|
||||||
}
|
}
|
||||||
|
|
||||||
if not pfUI.gitter then
|
if not pfUI.gitter then
|
||||||
@@ -547,6 +548,8 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
|
|
||||||
-- chat
|
-- chat
|
||||||
pfUI.gui.chat = pfUI.gui:CreateConfigTab("Chat")
|
pfUI.gui.chat = pfUI.gui:CreateConfigTab("Chat")
|
||||||
|
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat inputbox width:", pfUI_config.chat.text, "input_width")
|
||||||
|
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat inputbox height:", pfUI_config.chat.text, "input_height")
|
||||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp in chat:", pfUI_config.chat.text, "time", "checkbox")
|
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp in chat:", pfUI_config.chat.text, "time", "checkbox")
|
||||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp format:", pfUI_config.chat.text, "timeformat")
|
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp format:", pfUI_config.chat.text, "timeformat")
|
||||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp brackets:", pfUI_config.chat.text, "timebracket")
|
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp brackets:", pfUI_config.chat.text, "timebracket")
|
||||||
|
|||||||
Reference in New Issue
Block a user