Не агритесь сразу,в этой сфере я всего 2 дня.
Короче,суть в том,что при нажатии imgui.Button - крашит скрипт,чинит только ctrl + r,хотя по идеи должно происходить определенное действие. И еще,почему fonts awesome не подгружаются самостоятельно ,хотя по сути должны ,вместо иконок - ???????? , хотя если вручную добавить 2 файла в resource - все заработает нормально
Короче,суть в том,что при нажатии imgui.Button - крашит скрипт,чинит только ctrl + r,хотя по идеи должно происходить определенное действие. И еще,почему fonts awesome не подгружаются самостоятельно ,хотя по сути должны ,вместо иконок - ???????? , хотя если вручную добавить 2 файла в resource - все заработает нормально
local imgui = require 'imgui'
local vkeys = require 'vkeys'
local fa = require 'fAwesome5'
show_main_window = imgui.ImBool(false)
function apply_custom_style()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2
style.WindowPadding = ImVec2(15, 15)
style.WindowRounding = 15.0
style.FramePadding = ImVec2(5, 5)
style.ItemSpacing = ImVec2(12, 8)
style.ItemInnerSpacing = ImVec2(8, 6)
style.IndentSpacing = 25.0
style.ScrollbarSize = 15.0
style.ScrollbarRounding = 15.0
style.GrabMinSize = 15.0
style.GrabRounding = 7.0
style.ChildWindowRounding = 8.0
style.FrameRounding = 6.0
colors[clr.Text] = ImVec4(0.95, 0.96, 0.98, 1.00)
colors[clr.TextDisabled] = ImVec4(0.36, 0.42, 0.47, 1.00)
colors[clr.WindowBg] = ImVec4(0.11, 0.15, 0.17, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
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.FrameBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.12, 0.20, 0.28, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.09, 0.12, 0.14, 1.00)
colors[clr.TitleBg] = ImVec4(0.09, 0.12, 0.14, 0.65)
colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
colors[clr.TitleBgActive] = ImVec4(0.08, 0.10, 0.12, 1.00)
colors[clr.MenuBarBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.39)
colors[clr.ScrollbarGrab] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.09, 0.21, 0.31, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.CheckMark] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.SliderGrab] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.SliderGrabActive] = ImVec4(0.37, 0.61, 1.00, 1.00)
colors[clr.Button] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
colors[clr.Header] = ImVec4(0.20, 0.25, 0.29, 0.55)
colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.26, 0.59, 0.98, 0.25)
colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
colors[clr.PlotLines] = ImVec4(0.61, 0.61, 0.61, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(1.00, 0.43, 0.35, 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.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
end
apply_custom_style()
local fa_font = nil
local fa_glyph_ranges = imgui.ImGlyphRanges({ fa.min_range, fa.max_range })
function imgui.BeforeDrawFrame()
if fa_font == nil then
local font_config = imgui.ImFontConfig()
font_config.MergeMode = true
fa_font = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fa-solid-900.ttf', 13.0, font_config, fa_glyph_ranges)
end
end
local menu = imgui.ImBool(false)
local binder = imgui.ImBool(false)
local settings = imgui.ImBool(false)
local author = imgui.ImBool(false)
local off = imgui.ImBool(false)
local sw, sh = getScreenResolution()
local ImVec2 = imgui.ImVec2
function imgui.OnDrawFrame()
if show_main_window.v then
local sw, sh = getScreenResolution()
imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(750, 410), imgui.Cond.FirstUseEver)
imgui.Begin( ' Deputy HELPER', show_main_window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse)
if imgui.Button(fa.ICON_FA_COPY .. ' Меню', imgui.ImVec2(180, 65)) then uu() menu[1] = true end
if imgui.Button(fa.ICON_FA_PEN .. ' Биндер', imgui.ImVec2(180, 65)) then uu() menu[2] = true end
if imgui.Button(fa.ICON_FA_COGS .. ' Настройки ', imgui.ImVec2(180, 65)) then uu() menu[3] = true end
if imgui.Button(fa.ICON_FA_USER .. ' Автор', imgui.ImVec2(180, 65)) then uu() menu[4] = true end
if imgui.Button(fa.ICON_FA_POWER_OFF .. ' Выключить скрипт', imgui.ImVec2(180, 65)) then uu() menu[5] = true end
if menu[1] then
imgui.Text('Test text')
end
if menu[2] then
imgui.Text(u8"text:")
end
if menu [3] then
imgui.Text(u8"text")
end
if menu [4] then
imgui.Text(u8"text")
end
if menu [5] then
thisScript():unload()
end
imgui.End()
end
end
function main()
while true do
wait(0)
if wasKeyPressed(vkeys.VK_F3) then
show_main_window.v = not show_main_window.v
end
imgui.Process = show_main_window.v
end
end
function uu()
for i = 0,3 do
menu = false
end
end
local vkeys = require 'vkeys'
local fa = require 'fAwesome5'
show_main_window = imgui.ImBool(false)
function apply_custom_style()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2
style.WindowPadding = ImVec2(15, 15)
style.WindowRounding = 15.0
style.FramePadding = ImVec2(5, 5)
style.ItemSpacing = ImVec2(12, 8)
style.ItemInnerSpacing = ImVec2(8, 6)
style.IndentSpacing = 25.0
style.ScrollbarSize = 15.0
style.ScrollbarRounding = 15.0
style.GrabMinSize = 15.0
style.GrabRounding = 7.0
style.ChildWindowRounding = 8.0
style.FrameRounding = 6.0
colors[clr.Text] = ImVec4(0.95, 0.96, 0.98, 1.00)
colors[clr.TextDisabled] = ImVec4(0.36, 0.42, 0.47, 1.00)
colors[clr.WindowBg] = ImVec4(0.11, 0.15, 0.17, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
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.FrameBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.12, 0.20, 0.28, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.09, 0.12, 0.14, 1.00)
colors[clr.TitleBg] = ImVec4(0.09, 0.12, 0.14, 0.65)
colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
colors[clr.TitleBgActive] = ImVec4(0.08, 0.10, 0.12, 1.00)
colors[clr.MenuBarBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.39)
colors[clr.ScrollbarGrab] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.09, 0.21, 0.31, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.CheckMark] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.SliderGrab] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.SliderGrabActive] = ImVec4(0.37, 0.61, 1.00, 1.00)
colors[clr.Button] = ImVec4(0.20, 0.25, 0.29, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.28, 0.56, 1.00, 1.00)
colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
colors[clr.Header] = ImVec4(0.20, 0.25, 0.29, 0.55)
colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.26, 0.59, 0.98, 0.25)
colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
colors[clr.PlotLines] = ImVec4(0.61, 0.61, 0.61, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(1.00, 0.43, 0.35, 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.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
end
apply_custom_style()
local fa_font = nil
local fa_glyph_ranges = imgui.ImGlyphRanges({ fa.min_range, fa.max_range })
function imgui.BeforeDrawFrame()
if fa_font == nil then
local font_config = imgui.ImFontConfig()
font_config.MergeMode = true
fa_font = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fa-solid-900.ttf', 13.0, font_config, fa_glyph_ranges)
end
end
local menu = imgui.ImBool(false)
local binder = imgui.ImBool(false)
local settings = imgui.ImBool(false)
local author = imgui.ImBool(false)
local off = imgui.ImBool(false)
local sw, sh = getScreenResolution()
local ImVec2 = imgui.ImVec2
function imgui.OnDrawFrame()
if show_main_window.v then
local sw, sh = getScreenResolution()
imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(750, 410), imgui.Cond.FirstUseEver)
imgui.Begin( ' Deputy HELPER', show_main_window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse)
if imgui.Button(fa.ICON_FA_COPY .. ' Меню', imgui.ImVec2(180, 65)) then uu() menu[1] = true end
if imgui.Button(fa.ICON_FA_PEN .. ' Биндер', imgui.ImVec2(180, 65)) then uu() menu[2] = true end
if imgui.Button(fa.ICON_FA_COGS .. ' Настройки ', imgui.ImVec2(180, 65)) then uu() menu[3] = true end
if imgui.Button(fa.ICON_FA_USER .. ' Автор', imgui.ImVec2(180, 65)) then uu() menu[4] = true end
if imgui.Button(fa.ICON_FA_POWER_OFF .. ' Выключить скрипт', imgui.ImVec2(180, 65)) then uu() menu[5] = true end
if menu[1] then
imgui.Text('Test text')
end
if menu[2] then
imgui.Text(u8"text:")
end
if menu [3] then
imgui.Text(u8"text")
end
if menu [4] then
imgui.Text(u8"text")
end
if menu [5] then
thisScript():unload()
end
imgui.End()
end
end
function main()
while true do
wait(0)
if wasKeyPressed(vkeys.VK_F3) then
show_main_window.v = not show_main_window.v
end
imgui.Process = show_main_window.v
end
end
function uu()
for i = 0,3 do
menu = false
end
end