Compact mode lua AA script

A forum dedicated to use and support LUA for Cheat Engine.


Post Reply
User avatar
bbfox
Table Master
Table Master
Journeyman Hacker
Journeyman Hacker
Posts: 367
Joined: Sat Jul 23, 2022 8:59 am
Answers: 0
x 777

Compact mode lua AA script

Post by bbfox »

Code: Select all

[ENABLE]
{$lua}
if syntaxcheck then return end

if not toggleCompactView then
    function toggleCompactView(sender, forceEnable)
        local isCompactMode = not (compactViewMenuItem.Caption == 'Compact View Mode')
        if forceEnable ~= nil then
            isCompactMode = not forceEnable
        end

    synchronize(function()
        compactViewMenuItem.Caption = isCompactMode and 'Compact View Mode' or 'Full View Mode'
        getMainForm().Splitter1.Visible = isCompactMode
        getMainForm().Panel4.Visible    = isCompactMode
        getMainForm().Panel5.Visible    = isCompactMode
    end)
end
end

if not createCompactViewMenu then
    function createCompactViewMenu()
        if isCompactMenuCreated then return end

    synchronize(function()
        local mainMenu = getMainForm().Menu.Items
        compactViewMenuItem = createMenuItem(mainMenu)
        mainMenu.add(compactViewMenuItem)
        compactViewMenuItem.Caption = 'Compact View Mode'
        compactViewMenuItem.OnClick = toggleCompactView
    end)

    isCompactMenuCreated = true
end
end

createCompactViewMenu()
toggleCompactView(nil, true)

[DISABLE]
{$lua}
if toggleCompactView then
    toggleCompactView(nil, false)
end

In case, if you want to add a menu that can create an AA script to your table directly:
Image

Put attach file in CE autorun folder, restart CE


If you are using Table Dev Tools, please update it here: https://opencheattables.com/viewtopic.php?t=346
(thread safe and combine menu together)

Spoiler

Image

Old releases

Spoiler
Add Toggle Compact View mode.lua
v1: (2025/03/05): init. ver.
(3.51 KiB) Downloaded 404 times
Attachments
Add Toggle Compact View mode.lua
v2: (2025/04/15): minor tweaks
(3.52 KiB) Downloaded 488 times

Table is free to use, but need to leave the author's name and source URL: https://opencheattables.com.
Table will not be up-to-date. Feel free to modify it, but leave credit to the source.
Tip me a coffee? https://ko-fi.com/bbfoxmodding


Post Reply