Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
master
Breadcrumbs
scripts
/
hide-interface.lua
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
37 lines (33 loc) · 1.01 KB
master
Breadcrumbs
scripts
/
hide-interface.lua
Copy path
Top
File metadata and controls
Code
Blame
37 lines (33 loc) · 1.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local gui = require('gui')
local widgets = require('gui.widgets')
TransparentScreen = defclass(TransparentScreen, gui.ZScreen)
TransparentScreen.ATTRS {
focus_path='hide-interface',
pass_movement_keys=true,
pass_mouse_clicks=false,
defocusable=false,
}
function TransparentScreen:init()
self:addviews{
widgets.Panel{
frame_background=gui.TRANSPARENT_PEN,
visible=function() return dfhack.screen.inGraphicsMode() end,
},
widgets.Panel{
frame={h=5, w=50},
frame_background=gui.CLEAR_PEN,
frame_style=gui.FRAME_PANEL,
visible=function() return not dfhack.screen.inGraphicsMode() end,
subviews={
widgets.Label{
auto_width=true,
text='Interface cannot be hidden in ASCII mode.',
}
},
},
}
end
function TransparentScreen:onDismiss()
view = nil
end
view = view and view:raise() or TransparentScreen{}:show()
You can’t perform that action at this time.