ACW_Menu

mail@pastecode.io avatar
unknown
lua
12 days ago
1.2 kB
8
Indexable
Never
-- DO NOT CHANGE
local configDir = "ACW\\"
local configFileDefault = "ACW_Default.json"
local modName = "ACW - Advanced Clock Widget"
local modVersion = "2.0.0"

-- Require
log.info("Require Egui:", require("egui/egui"))
package.path = package.path..";?/egui/egui.lua"
local egui = require("egui/egui")

--------------------------------------------
-- REFRAMEWORK MENU
--------------------------------------------
local showConfigMenu = false
re.on_draw_ui(function()
    egui.Seperator()
    egui.NewLine()
    egui.Text(modName.." v"..modVersion)
    egui.SameLine()
    egui.Button("Open Config Window", function()
        showConfigMenu = not showConfigMenu
    end)
    egui.NewLine()
    egui.Seperator()
end)

----------------------------------------------
-- REFRAMEWORK CONFIG MENU
----------------------------------------------
re.on_frame(function()
    if showConfigMenu then
        local window = imgui.begin_window(modName..modVersion.." - Config", showConfigMenu)
        if window == false then
            showConfigMenu = not showConfigMenu
        end

        -- Rest of the cofnig code here
    end
end)
Leave a Comment