View previous topic :: View next topic |
Author |
Message |
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Dec 10, 2013 3:35 pm Post subject: AA script + Lua script ==> CE "compact mode" |
|
|
If you used Borderlands2 tables, you probably know something about "compact mode" CETRAINER.
(there is my code from here t=558871)
Here, updated code for CE6.3
Code: | function cycleFullCompact()
local state = not(compactmenuitem.Caption == 'Compact View Mode')
compactmenuitem.Caption = state and 'Compact View Mode' or 'Full View Mode'
getMainForm().Splitter1.Visible = state
getMainForm().Panel4.Visible = state
getMainForm().Panel5.Visible = state
end
function addCompactMenu()
if compactmenualreadyexists then return end
local parent = getMainForm().Menu.Items
compactmenuitem = createMenuItem(parent); parent.add(compactmenuitem)
compactmenuitem.Caption = 'Compact View Mode'
compactmenuitem.OnClick = cycleFullCompact
compactmenualreadyexists = 'yes'
end
addCompactMenu() |
Code adopted for LuaCall command inside AA script:
Code: | function cycleFullCompact(sender,force)
local state = not(compactmenuitem.Caption == 'Compact View Mode')
if force~=nil then state = not force end
compactmenuitem.Caption = state and 'Compact View Mode' or 'Full View Mode'
getMainForm().Splitter1.Visible = state
getMainForm().Panel4.Visible = state
getMainForm().Panel5.Visible = state
end
function addCompactMenu()
if compactmenualreadyexists then return end
local parent = getMainForm().Menu.Items
compactmenuitem = createMenuItem(parent); parent.add(compactmenuitem)
compactmenuitem.Caption = 'Compact View Mode'
compactmenuitem.OnClick = cycleFullCompact
compactmenualreadyexists = 'yes'
end
addCompactMenu() |
Example AA script:
Code: | [ENABLE]
LuaCall(cycleFullCompact(nil,true))
[DISABLE]
LuaCall(cycleFullCompact(nil,false)) |
Enabling script will change CE into compact mode, disabling = normal mode (Full View)
Bonus:
Btw, we can also use only AA script. We have to squeeze Lua code to "one and very very long line". Example - see attached CT file.
Description: |
|
Download |
Filename: |
compactModeDemo.CT |
Filesize: |
1.15 KB |
Downloaded: |
2382 Time(s) |
_________________
|
|
Back to top |
|
|
emt21 How do I cheat? Reputation: 0
Joined: 12 Dec 2013 Posts: 8
|
Posted: Wed Dec 18, 2013 3:02 pm Post subject: Hi |
|
|
How do I update CE 6.3 with this code u mention
_________________
Always willing to help |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Dec 18, 2013 6:38 pm Post subject: |
|
|
You can just:
1) open my CT file with CE, highlight "CompactMode" script, press ctrl+C. Close CE
2) now open your CT file with CE, then press ctrl+V. Now you can save.
3) from now on, anyone who is using your CT file can change CE mode by activating/deactivating that script (or main menu entry, which is added after first use).
Note: you need CE6.3, download it from CE homepage.
_________________
|
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Tue Oct 27, 2020 12:43 pm Post subject: startup in compact mode... |
|
|
I'm gradually adding this feature to all my tables. And my default setting is 'Compact View'; set in CE Lua script (~startup)
Here is the snack: [ https://imgur.com/a/EnfOets ]
If I start in 'Full View', switching between the 2 modes is just fine. However, when I start in 'compact' and then switch to 'full' I get that little hickup (that particular panel has "moved up"... after some experimenting, I'm getting the impression that this is related to 'panel5' (menu button(s) topleft) ?
any workaround to get this (a)ligned up again? (did some experimenting, making it actually worse )
ps: this is more of an annoyance to me then to the user, as they rarely touch/need that part of the gui.
ps2: i'm using the 1st vs
|
|
Back to top |
|
|
|