added BOLD_FRAME and INTERIOR_MEDIUM_FRAME

develop
Taxi Service 2023-04-03 20:13:57 +02:00
parent 7d293c89a2
commit 7c63ea9394
6 changed files with 26 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

@ -4352,11 +4352,22 @@ There are the following predefined frame style tables:
A frame suitable for overlay widget panels. 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`` * ``INTERIOR_FRAME``
A frame suitable for light interior accent elements. This frame does *not* have A frame suitable for light interior accent elements. This frame does *not*
a visible ``DFHack`` signature on it, so it must not be used as the most external have a visible ``DFHack`` signature on it, so it must not be used as the most
frame for a DFHack-owned UI. 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 gui.widgets
=========== ===========

@ -1718,6 +1718,7 @@ static const LuaWrapper::FunctionReg dfhack_textures_module[] = {
WRAPM(Textures, getControlPanelTexposStart), WRAPM(Textures, getControlPanelTexposStart),
WRAPM(Textures, getThinBordersTexposStart), WRAPM(Textures, getThinBordersTexposStart),
WRAPM(Textures, getMediumBordersTexposStart), WRAPM(Textures, getMediumBordersTexposStart),
WRAPM(Textures, getBoldBordersTexposStart),
WRAPM(Textures, getPanelBordersTexposStart), WRAPM(Textures, getPanelBordersTexposStart),
WRAPM(Textures, getWindowBordersTexposStart), WRAPM(Textures, getWindowBordersTexposStart),
{ NULL, NULL } { NULL, NULL }

@ -56,6 +56,7 @@ DFHACK_EXPORT long getControlPanelTexposStart();
*/ */
DFHACK_EXPORT long getThinBordersTexposStart(); DFHACK_EXPORT long getThinBordersTexposStart();
DFHACK_EXPORT long getMediumBordersTexposStart(); DFHACK_EXPORT long getMediumBordersTexposStart();
DFHACK_EXPORT long getBoldBordersTexposStart();
DFHACK_EXPORT long getPanelBordersTexposStart(); DFHACK_EXPORT long getPanelBordersTexposStart();
DFHACK_EXPORT long getWindowBordersTexposStart(); DFHACK_EXPORT long getWindowBordersTexposStart();

@ -916,8 +916,11 @@ end
WINDOW_FRAME = make_frame('Window', true) WINDOW_FRAME = make_frame('Window', true)
PANEL_FRAME = make_frame('Panel', false) PANEL_FRAME = make_frame('Panel', false)
MEDIUM_FRAME = make_frame('Medium', false) MEDIUM_FRAME = make_frame('Medium', false)
BOLD_FRAME = make_frame('Bold', true)
INTERIOR_FRAME = make_frame('Thin', false) INTERIOR_FRAME = make_frame('Thin', false)
INTERIOR_FRAME.signature_pen = false INTERIOR_FRAME.signature_pen = false
INTERIOR_MEDIUM_FRAME = copyall(MEDIUM_FRAME)
INTERIOR_MEDIUM_FRAME.signature_pen = false
-- for compatibility with pre-steam code -- for compatibility with pre-steam code
GREY_LINE_FRAME = WINDOW_FRAME GREY_LINE_FRAME = WINDOW_FRAME

@ -26,6 +26,7 @@ static long g_on_off_texpos_start = -1;
static long g_control_panel_texpos_start = -1; static long g_control_panel_texpos_start = -1;
static long g_thin_borders_texpos_start = -1; static long g_thin_borders_texpos_start = -1;
static long g_medium_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_panel_borders_texpos_start = -1;
static long g_window_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_thin_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-medium.png", g_num_dfhack_textures += load_textures(out, "hack/data/art/border-medium.png",
&g_medium_borders_texpos_start); &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_num_dfhack_textures += load_textures(out, "hack/data/art/border-panel.png",
&g_panel_borders_texpos_start); &g_panel_borders_texpos_start);
g_num_dfhack_textures += load_textures(out, "hack/data/art/border-window.png", 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; return g_medium_borders_texpos_start;
} }
long Textures::getBoldBordersTexposStart() {
return g_bold_borders_texpos_start;
}
long Textures::getPanelBordersTexposStart() { long Textures::getPanelBordersTexposStart() {
return g_panel_borders_texpos_start; return g_panel_borders_texpos_start;
} }