- 335
- 29
- Версия MoonLoader
- .026-beta
Когда видно мой ник - идёт отображение перед временем в виде [!]
Помогите плс реализовать
Пример:
[!] | h:m:s text
На видео показал как работает само отображение текста
Помогите плс реализовать
Пример:
[!] | h:m:s text
На видео показал как работает само отображение текста
Lua:
-- Onframe
if selectedTag1[0] ~= prevTag1 or selectedChannel[0] ~= prevChannel then
prevTag1 = selectedTag1[0]
prevChannel = selectedChannel[0]
saveElements()
end
local resX, resY = getScreenResolution()
local sizeX, sizeY = 950, 610
local mainWindowPos = imgui.ImVec2(resX / 2, resY / 2)
imgui.SetNextWindowPos(mainWindowPos, imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
if imgui.Begin('Departament', renderWindow, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoResize + imgui.WindowFlags.NoTitleBar) then
local mainWindowPos = imgui.GetWindowPos()
local mainWindowSize = imgui.GetWindowSize()
local colorYellow = imgui.GetStyle().Colors[imgui.Col.FrameBgActive]
local colorBlue = imgui.ImVec4(0.2, 0.6, 1.0, 1.0)
imgui.PushFont(FontBold)
for i, title in ipairs(nav.list) do
if HeaderButton(nav.c == i, title) then
nav.c = i
end
if i ~= #nav.list then
imgui.SameLine(nil, 30)
end
end
if nav.c == 1 then
-- imgui.ColCenterText(imgui.ImVec4(0.2, 0.6, 1.0, 1.0), u8('Чат департамента'))
imgui.ColCenterText(imgui.GetStyle().Colors[imgui.Col.ButtonActive], u8('Чат департамента'))
imgui.BeginChild('##DeptTextChild', imgui.ImVec2(920, 370), 1)
for i, msgData in ipairs(chatMessages) do
local currentTag = tags1[selectedTag1[0] + 1]
local tagPattern = currentTag:gsub('([%[%]%-])', '%%%1')
local baseColor = msgData.text:find(tagPattern) and colorYellow or colorBlue
local messageText = u8(msgData.time .. msgData.text)
imgui.TextColored(baseColor, messageText)
if imgui.IsItemHovered() then
local pos = imgui.GetItemRectMin()
local size = imgui.GetItemRectSize()
imgui.GetWindowDrawList():AddRectFilled(pos, imgui.ImVec2(pos.x + size.x, pos.y + size.y), imgui.ColorConvertFloat4ToU32(imgui.ImVec4(0.3, 0.3, 0.3, 0.5)))
imgui.SetCursorScreenPos(pos)
-- imgui.TextColored(imgui.ImVec4(0.6, 0.6, 0.6, 1), messageText)
imgui.TextColored(imgui.GetStyle().Colors[imgui.Col.TextDisabled], messageText)
end
if imgui.IsItemClicked() then
imgui.SetClipboardText(u8(msgData.time .. msgData.text))
end
end
if shouldScrollToBottom then
imgui.SetScrollHereY(1.0)
shouldScrollToBottom = false
end
imgui.EndChild()
imgui.PopFont()
--
elseif nav.c == 4 then
imgui.ColCenterText(imgui.GetStyle().Colors[imgui.Col.ButtonActive], u8('Настройки темы'))
imgui.Spacing()
if imgui.ColorEdit3(u8'##CustomColor', theme.custom) then
applyCustomTheme()
saveTheme()
end
imgui.Spacing()
end