- 447
- 92
- Версия MoonLoader
- .027.0-preview
Крч ошибка данного типа:
Стиль такой
a use ya pificsil
(error) TEEEEEST: H:\aboba\SAMP\faa\WING\moonloader\New.lua:147: sol: attempt to index (set) nil value "WindowBorderSize" on userdata (bad (misspelled?) key name or does not exist)
stack traceback:
[C]: in function '__newindex'
H:\aboba\SAMP\faa\WING\moonloader\New.lua:147: in function 'imgui_style'
H:\aboba\SAMP\faa\WING\moonloader\New.lua:73: in function 'OnDrawFrame'
H:\aboba\SAMP\faa\WING\moonloader\lib\imgui.lua:1377: in function <H:\aboba\SAMP\faa\WING\moonloader\lib\imgui.lua:1366>
[ML] (error) TEEEEEST: Script died due to an error. (0C388E8C)
attempt to index (set) nil value "WindowBorderSize" on userdata (bad (misspelled?) key name or does not exist)
stack traceback:
[C]: in function '__newindex'
H:\aboba\SAMP\faa\WING\moonloader\New.lua:147: in function 'imgui_style'
H:\aboba\SAMP\faa\WING\moonloader\New.lua:73: in function 'OnDrawFrame'
H:\aboba\SAMP\faa\WING\moonloader\lib\imgui.lua:1377: in function <H:\aboba\SAMP\faa\WING\moonloader\lib\imgui.lua:1366>
[ML] (error) TEEEEEST: Script died due to an error. (0C388E8C)
attempt to index (set) nil value "WindowBorderSize" on userdata (bad (misspelled?) key name or does not exist)
Стиль такой
Код:
function imgui_style()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
style.WindowRounding = 2.0
style.WindowTitleAlign = imgui.ImVec2(0.5, 0.84)
style.ChildWindowRounding = 2.0
style.FrameRounding = 2.0
style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
style.ScrollbarSize = 13.0
style.ScrollbarRounding = 0
style.GrabMinSize = 8.0
style.GrabRounding = 1.0
style.WindowPadding = imgui.ImVec2(5, 5)
style.ItemSpacing = imgui.ImVec2(5, 5)
style.WindowBorderSize = 55.0 -- Где "1.0" - своё значение в float
style.FrameBorderSize = 6.0-- Где "1.0" - своё значение в float
colors[clr.FrameBg] = ImVec4(0.16, 0.48, 0.42, 0.54)
colors[clr.FrameBgHovered] = ImVec4(0.26, 0.98, 0.85, 0.40)
colors[clr.FrameBgActive] = ImVec4(0.26, 0.98, 0.85, 0.67)
colors[clr.TitleBg] = ImVec4(0.04, 0.04, 0.04, 1.00)
colors[clr.TitleBgActive] = ImVec4(0.16, 0.48, 0.42, 1.00)
colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
colors[clr.CheckMark] = ImVec4(0.26, 0.98, 0.85, 1.00)
colors[clr.SliderGrab] = ImVec4(0.24, 0.88, 0.77, 1.00)
colors[clr.SliderGrabActive] = ImVec4(0.26, 0.98, 0.85, 1.00)
colors[clr.Button] = ImVec4(0.26, 0.98, 0.85, 0.40)
colors[clr.ButtonHovered] = ImVec4(0.26, 0.98, 0.85, 1.00)
colors[clr.ButtonActive] = ImVec4(0.06, 0.98, 0.82, 1.00)
colors[clr.Header] = ImVec4(0.26, 0.98, 0.85, 0.31)
colors[clr.HeaderHovered] = ImVec4(0.26, 0.98, 0.85, 0.80)
colors[clr.HeaderActive] = ImVec4(0.26, 0.98, 0.85, 1.00)
colors[clr.Separator] = colors[clr.Border]
colors[clr.SeparatorHovered] = ImVec4(0.10, 0.75, 0.63, 0.78)
colors[clr.SeparatorActive] = ImVec4(0.10, 0.75, 0.63, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.26, 0.98, 0.85, 0.25)
colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.98, 0.85, 0.67)
colors[clr.ResizeGripActive] = ImVec4(0.26, 0.98, 0.85, 0.95)
colors[clr.PlotLines] = ImVec4(0.61, 0.61, 0.61, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(1.00, 0.81, 0.35, 1.00)
colors[clr.TextSelectedBg] = ImVec4(0.26, 0.98, 0.85, 0.35)
colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.TextDisabled] = ImVec4(0.50, 0.50, 0.50, 1.00)
colors[clr.WindowBg] = ImVec4(0.50, 0.50, 0.50, 1.00) --твой цвет окна
colors[clr.ChildWindowBg] = ImVec4(0.50, 0.50, 0.50, 1.00) --твой цвет чилда
colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
colors[clr.ComboBg] = colors[clr.PopupBg]
colors[clr.Border] = ImVec4(0.43, 0.43, 0.50, 0.50)
colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.MenuBarBg] = ImVec4(0.14, 0.14, 0.14, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.53)
colors[clr.ScrollbarGrab] = ImVec4(0.31, 0.31, 0.31, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.41, 0.41, 0.41, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.51, 0.51, 0.51, 1.00)
colors[clr.CloseButton] = ImVec4(0.41, 0.41, 0.41, 0.50)
colors[clr.CloseButtonHovered] = ImVec4(0.98, 0.39, 0.36, 1.00)
colors[clr.CloseButtonActive] = ImVec4(0.98, 0.39, 0.36, 1.00)
colors[clr.PlotHistogram] = ImVec4(0.90, 0.70, 0.00, 1.00)
colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
colors[clr.ModalWindowDarkening] = ImVec4(0.80, 0.80, 0.80, 0.35)
end
a use ya pificsil
Последнее редактирование: