Tags: dev | interface

Command: devel/pop-screen

Forcibly closes the current screen.

Running this tool is usually equivalent to pressing Esc (LEAVESCREEN), but will bypass the screen’s input handling. This is intended primarily for development, if you have created a screen whose input handling throws an error before it handles Esc (or if you have forgotten to handle Esc entirely).


If you run this script when the current screen does not have a parent, this will cause DF to exit immediately. These screens include:

  • The main fortress mode screen (viewscreen_dwarfmodest)

  • The main adventure mode screen (viewscreen_dungeonmodest)

  • The main legends mode screen (viewscreen_legendsst)

  • The title screen (viewscreen_titlest)