Merge branch 'develop' into 5008-beta1

develop
Myk Taylor 2023-04-26 12:34:01 -07:00
commit 6d3e5f3a1a
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
7 changed files with 34 additions and 12 deletions

@ -36,6 +36,12 @@ jobs:
restore-keys: | restore-keys: |
ccache-win64-cross-msvc-develop-${{ github.event.inputs.commit_hash }} ccache-win64-cross-msvc-develop-${{ github.event.inputs.commit_hash }}
ccache-win64-cross-msvc ccache-win64-cross-msvc
- name: Restore steam SDK
uses: actions/cache@v3
with:
path: depends/steam/steamworks_sdk_156.zip
key: steam-sdk-156
enableCrossOsArchive: true
- name: Cross-compile win64 artifacts - name: Cross-compile win64 artifacts
env: env:
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1' CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'

@ -57,6 +57,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Lua ## Lua
- ``widgets.RangeSlider``: new mouse-controlled two-headed slider widget - ``widgets.RangeSlider``: new mouse-controlled two-headed slider widget
- ``gui.ZScreenModal``: ZScreen subclass for modal dialogs - ``gui.ZScreenModal``: ZScreen subclass for modal dialogs
- ``widgets.CycleHotkeyLabel``: exposed "key_sep" and "val_gap" attributes for improved stylistic control.
## Removed ## Removed
- `title-version`: replaced by an `overlay` widget - `title-version`: replaced by an `overlay` widget

@ -4912,12 +4912,17 @@ It has the following attributes:
:key: The hotkey keycode to display, e.g. ``'CUSTOM_A'``. :key: The hotkey keycode to display, e.g. ``'CUSTOM_A'``.
:key_back: Similar to ``key``, but will cycle backwards (optional) :key_back: Similar to ``key``, but will cycle backwards (optional)
:key_sep: If specified, will be used to customize how the activation key is
displayed. See ``token.key_sep`` in the ``Label`` documentation.
:label: The string (or a function that returns a string) to display after the :label: The string (or a function that returns a string) to display after the
hotkey. hotkey.
:label_width: The number of spaces to allocate to the ``label`` (for use in :label_width: The number of spaces to allocate to the ``label`` (for use in
aligning a column of ``CycleHotkeyLabel`` labels). aligning a column of ``CycleHotkeyLabel`` labels).
:label_below: If ``true``, then the option value will apear below the label :label_below: If ``true``, then the option value will apear below the label
instead of to the right of it. Defaults to ``false``. instead of to the right of it. Defaults to ``false``.
:val_gap: The size of the gap between the label text and the option value.
Default is ``1``. If set to ``0``, there'll be no gap between the strings.
Note that ``val_gap`` is ignored if ``label_below`` is set to ``true``.
:options: A list of strings or tables of :options: A list of strings or tables of
``{label=string or fn, value=val[, pen=pen]}``. String options use the same ``{label=string or fn, value=val[, pen=pen]}``. String options use the same
string for the label and value and use the default pen. The optional ``pen`` string for the label and value and use the default pen. The optional ``pen``

@ -1488,6 +1488,8 @@ CycleHotkeyLabel = defclass(CycleHotkeyLabel, Label)
CycleHotkeyLabel.ATTRS{ CycleHotkeyLabel.ATTRS{
key=DEFAULT_NIL, key=DEFAULT_NIL,
key_back=DEFAULT_NIL, key_back=DEFAULT_NIL,
key_sep=': ',
val_gap=1,
label=DEFAULT_NIL, label=DEFAULT_NIL,
label_width=DEFAULT_NIL, label_width=DEFAULT_NIL,
label_below=false, label_below=false,
@ -1499,17 +1501,16 @@ CycleHotkeyLabel.ATTRS{
function CycleHotkeyLabel:init() function CycleHotkeyLabel:init()
self:setOption(self.initial_option) self:setOption(self.initial_option)
local val_gap = 1
if self.label_below then if self.label_below then
val_gap = 0 + (self.key_back and 1 or 0) + (self.key and 3 or 0) self.val_gap = 0 + (self.key_back and 1 or 0) + (self.key and 3 or 0)
end end
self:setText{ self:setText{
self.key_back ~= nil and {key=self.key_back, key_sep='', width=0, on_activate=self:callback('cycle', true)} or {}, self.key_back ~= nil and {key=self.key_back, key_sep='', width=0, on_activate=self:callback('cycle', true)} or {},
{key=self.key, key_sep=': ', text=self.label, width=self.label_width, {key=self.key, key_sep=self.key_sep, text=self.label, width=self.label_width,
on_activate=self:callback('cycle')}, on_activate=self:callback('cycle')},
self.label_below and NEWLINE or '', self.label_below and NEWLINE or '',
{gap=val_gap, text=self:callback('getOptionLabel'), {gap=self.val_gap, text=self:callback('getOptionLabel'),
pen=self:callback('getOptionPen')}, pen=self:callback('getOptionPen')},
} }
end end

@ -9,13 +9,22 @@ if(WIN32)
${STEAMAPI_DIR}/steamworks_sdk_156.zip ${STEAMAPI_DIR}/steamworks_sdk_156.zip
EXPECTED_HASH MD5=af5a579990dbe5ae4c1b0689260d001b EXPECTED_HASH MD5=af5a579990dbe5ae4c1b0689260d001b
USERPWD $ENV{steam_username}:$ENV{steam_password} USERPWD $ENV{steam_username}:$ENV{steam_password}
STATUS STEAM_SDK_DOWNLOAD_STATUS
SHOW_PROGRESS
) )
file(ARCHIVE_EXTRACT list(GET STEAM_SDK_DOWNLOAD_STATUS 0 STEAM_SDK_DL_STATUS_CODE)
INPUT ${STEAMAPI_DIR}/steamworks_sdk_156.zip list(GET STEAM_SDK_DOWNLOAD_STATUS 1 STEAM_SDK_DL_ERROR_MESSAGE)
DESTINATION ${STEAMAPI_DIR}) if (NOT (${STEAM_SDK_DL_STATUS_CODE} EQUAL 0))
set(STEAMAPI_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.lib") message(FATAL_ERROR "Steam SDK download: " ${STEAM_SDK_DL_ERROR_MESSAGE})
set(STEAMAPI_SOURCE_DIR "${STEAMAPI_DIR}/sdk/public/steam") else ()
set(STEAMAPI_SHARED_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.dll") message(STATUS "Steam SDK download: " ${STEAM_SDK_DL_ERROR_MESSAGE})
file(ARCHIVE_EXTRACT
INPUT ${STEAMAPI_DIR}/steamworks_sdk_156.zip
DESTINATION ${STEAMAPI_DIR})
set(STEAMAPI_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.lib")
set(STEAMAPI_SOURCE_DIR "${STEAMAPI_DIR}/sdk/public/steam")
set(STEAMAPI_SHARED_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.dll")
endif()
else() else()
message(SEND_ERROR "Need to set steam_username and steam_password in environment to download Steamworks SDK") message(SEND_ERROR "Need to set steam_username and steam_password in environment to download Steamworks SDK")
endif() endif()

@ -577,7 +577,7 @@ TitleVersionOverlay.ATTRS{
function TitleVersionOverlay:init() function TitleVersionOverlay:init()
local text = {} local text = {}
table.insert(text, 'DFHack ' .. dfhack.getDFHackVersion() .. table.insert(text, 'DFHack ' .. dfhack.getDFHackVersion() ..
(dfhack.isPrerelease() and (' (git: %s)'):format(dfhack.getGitCommit(true)) or '')) (dfhack.isRelease() and '' or (' (git: %s)'):format(dfhack.getGitCommit(true))))
if #dfhack.getDFHackBuildID() > 0 then if #dfhack.getDFHackBuildID() > 0 then
table.insert(text, NEWLINE) table.insert(text, NEWLINE)
table.insert(text, 'Build ID: ' .. dfhack.getDFHackBuildID()) table.insert(text, 'Build ID: ' .. dfhack.getDFHackBuildID())

@ -1 +1 @@
Subproject commit 6b4001dc2f9d0e662bb7d06d8ba6fcf343a656aa Subproject commit ad1998a0032ce50e90d05429a4178b668c0840ba