diff --git a/data/art/border-bold.png b/data/art/border-bold.png new file mode 100644 index 000000000..16423a3a7 Binary files /dev/null and b/data/art/border-bold.png differ diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index 2af9e39f1..e63bc8a61 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -4352,11 +4352,22 @@ There are the following predefined frame style tables: A frame suitable for overlay widget panels. +* ``BOLD_FRAME`` + + A frame suitable for a non-draggable panel meant to capture the user's focus, + like an important notification, confirmation dialog or error message. + * ``INTERIOR_FRAME`` - A frame suitable for light interior accent elements. This frame does *not* have - a visible ``DFHack`` signature on it, so it must not be used as the most external - frame for a DFHack-owned UI. + A frame suitable for light interior accent elements. This frame does *not* + have a visible ``DFHack`` signature on it, so it must not be used as the most + external frame for a DFHack-owned UI. + +* ``INTERIOR_MEDIUM_FRAME`` + + A copy of ``MEDIUM_FRAME`` that lacks the ``DFHack`` signature. Suitable for + panels that are part of a larger widget cluster. Must *not* be used as the + most external frame for a DFHack-owned UI. gui.widgets =========== diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index c9bdc3021..5573d3f20 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -1718,6 +1718,7 @@ static const LuaWrapper::FunctionReg dfhack_textures_module[] = { WRAPM(Textures, getControlPanelTexposStart), WRAPM(Textures, getThinBordersTexposStart), WRAPM(Textures, getMediumBordersTexposStart), + WRAPM(Textures, getBoldBordersTexposStart), WRAPM(Textures, getPanelBordersTexposStart), WRAPM(Textures, getWindowBordersTexposStart), { NULL, NULL } diff --git a/library/include/modules/Textures.h b/library/include/modules/Textures.h index a438f01f4..95e628d5a 100644 --- a/library/include/modules/Textures.h +++ b/library/include/modules/Textures.h @@ -56,6 +56,7 @@ DFHACK_EXPORT long getControlPanelTexposStart(); */ DFHACK_EXPORT long getThinBordersTexposStart(); DFHACK_EXPORT long getMediumBordersTexposStart(); +DFHACK_EXPORT long getBoldBordersTexposStart(); DFHACK_EXPORT long getPanelBordersTexposStart(); DFHACK_EXPORT long getWindowBordersTexposStart(); diff --git a/library/lua/gui.lua b/library/lua/gui.lua index 7791f3685..64e203d3c 100644 --- a/library/lua/gui.lua +++ b/library/lua/gui.lua @@ -916,8 +916,11 @@ end WINDOW_FRAME = make_frame('Window', true) PANEL_FRAME = make_frame('Panel', false) MEDIUM_FRAME = make_frame('Medium', false) +BOLD_FRAME = make_frame('Bold', true) INTERIOR_FRAME = make_frame('Thin', false) INTERIOR_FRAME.signature_pen = false +INTERIOR_MEDIUM_FRAME = copyall(MEDIUM_FRAME) +INTERIOR_MEDIUM_FRAME.signature_pen = false -- for compatibility with pre-steam code GREY_LINE_FRAME = WINDOW_FRAME diff --git a/library/modules/Textures.cpp b/library/modules/Textures.cpp index 25d44695a..a30f879a0 100644 --- a/library/modules/Textures.cpp +++ b/library/modules/Textures.cpp @@ -26,6 +26,7 @@ static long g_on_off_texpos_start = -1; static long g_control_panel_texpos_start = -1; static long g_thin_borders_texpos_start = -1; static long g_medium_borders_texpos_start = -1; +static long g_bold_borders_texpos_start = -1; static long g_panel_borders_texpos_start = -1; static long g_window_borders_texpos_start = -1; @@ -134,6 +135,8 @@ void Textures::init(color_ostream &out) { &g_thin_borders_texpos_start); g_num_dfhack_textures += load_textures(out, "hack/data/art/border-medium.png", &g_medium_borders_texpos_start); + g_num_dfhack_textures += load_textures(out, "hack/data/art/border-bold.png", + &g_bold_borders_texpos_start); g_num_dfhack_textures += load_textures(out, "hack/data/art/border-panel.png", &g_panel_borders_texpos_start); g_num_dfhack_textures += load_textures(out, "hack/data/art/border-window.png", @@ -202,6 +205,10 @@ long Textures::getMediumBordersTexposStart() { return g_medium_borders_texpos_start; } +long Textures::getBoldBordersTexposStart() { + return g_bold_borders_texpos_start; +} + long Textures::getPanelBordersTexposStart() { return g_panel_borders_texpos_start; }