Commit Graph

3905 Commits (a770a4cae49d337423f8a108dc5eb78a42a0c75c)

Author SHA1 Message Date
Myk 116f9bf8e6
Merge pull request #2641 from myk002/myk_buildingplan
minimal implementation of buildingplan
2023-01-20 09:28:26 -08:00
20k 4d9c411358 fix flag 2023-01-19 23:33:03 +00:00
20k 8b7c8d83b5 remove save fixup
Add notifyCivzoneModified
2023-01-19 21:55:20 +00:00
cjhammel c05b7526b1
Update Units.cpp
fixes renamed value
2023-01-19 15:12:24 -05:00
20k d5610ab859 zone <-> building interop 2023-01-19 16:39:41 +00:00
DFHack-Urist via GitHub Actions d52aff8ff3 Auto-update submodules
library/xml: master
scripts: master
2023-01-19 07:14:40 +00:00
Rose f9ac987367 Added bounds checking to various creature name functions in the Units module. 2023-01-18 20:52:58 -08:00
DFHack-Urist via GitHub Actions 452d44d985 Auto-update submodules
library/xml: master
scripts: master
2023-01-18 23:55:29 +00:00
Myk Taylor d6b69ca8fc
move useful functions from uicommon to MiscUtils 2023-01-16 23:46:47 -08:00
Myk Taylor 3958d37684
update changelog and submodules for 50.05-alpha1 2023-01-16 16:56:31 -08:00
lethosor 9c36c3978f
Update xml, scripts 2023-01-16 16:06:00 -05:00
Myk 95d7db2bb4
Merge pull request #2622 from myk002/myk_datasave
adjust to new directory layouts
2023-01-16 11:05:33 -08:00
Myk Taylor 762cd46d14
look for init.d directories in the root instead of raw/ 2023-01-15 23:28:01 -08:00
Myk Taylor 50cc6d965d
update to new save directory structure 2023-01-15 23:13:58 -08:00
Myk Taylor fb5675ef1b
keep windows on the screen when the DF window is resized 2023-01-15 20:41:48 -08:00
Myk Taylor 20f865eba0
don't reset scroll pos when window is resized or moved 2023-01-15 15:59:09 -08:00
Myk Taylor d14a3b2c83
ensure the untested warning doesn't bork on bad scripts 2023-01-15 00:49:48 -08:00
DFHack-Urist via GitHub Actions f82acec9d4 Auto-update submodules
library/xml: master
2023-01-14 09:26:48 +00:00
Myk 977946e5bc
Merge pull request #2603 from myk002/myk_resizingpanel
give more control over the resizing dimensions of ResizingPanels
2023-01-14 01:10:26 -08:00
Myk fc6a8fb00b
Merge pull request #2601 from myk002/myk_dwarfmode
pull the useful bits out of guidm.MenuOverlay and make them available
2023-01-14 01:09:57 -08:00
Myk 2a84bb61db
Merge pull request #2599 from myk002/myk_hotspot_hotfoot
update behavior of hotspot menu
2023-01-14 01:09:35 -08:00
Myk 3b40621324
Merge pull request #2595 from myk002/myk_textures
add some more icon textures we can use
2023-01-14 01:09:23 -08:00
Myk Taylor f19ae16c9d
give more control over the resizing dimensions of ResizingPanels 2023-01-14 01:00:38 -08:00
Rose 0e021e392d Added a report to autoclothing, as well as some changes to DFHack::Units to enable it. 2023-01-13 21:20:01 -08:00
Myk Taylor e450af74aa
pull the useful bits out of MenuOverlay 2023-01-13 17:05:23 -08:00
Myk Taylor 4f88d27e08
cancel EditField editing on r-click 2023-01-13 17:05:08 -08:00
Myk Taylor 21d160c478
terminology change: locked -> pinned 2023-01-13 16:07:27 -08:00
Myk Taylor 6c6c4e159f
add reminder why we can't clear mouse_lbut 2023-01-13 12:17:51 -08:00
DFHack-Urist via GitHub Actions f6372b97d1 Auto-update submodules
library/xml: master
scripts: master
2023-01-13 07:14:32 +00:00
Myk Taylor 508777897b
allow tile list icons to be rendered properly 2023-01-12 22:30:47 -08:00
Myk Taylor 478b5ada39
expose icons texpos to Lua 2023-01-12 22:17:39 -08:00
Myk Taylor ac06508d92
add some more icon textures we can use
contributed by TaxiService on the DFHack Discord server
2023-01-12 21:04:41 -08:00
Myk 68e373100b
Merge pull request #2591 from myk002/myk_penn
support foreground and background writing from pens
2023-01-12 21:00:38 -08:00
Myk Taylor c98e389ac8
move untested warning back to run_script
so we don't waste our warning on the initial env scans
2023-01-12 14:15:43 -08:00
Myk Taylor 52a39438f7
don't make EditField's transparent
this is actually a very old bug, but now that I know how transparency
works, it's obvious how to fix this
2023-01-12 12:47:43 -08:00
Myk Taylor 15998f2ebe
add gui.TRANSPARENT_PEN for clearing the UI layer 2023-01-12 12:44:50 -08:00
Myk Taylor 079d5e4178
support foreground and background writing from pens 2023-01-12 12:30:07 -08:00
Myk Taylor 88f158921f
move warning to run_script_with_env 2023-01-11 19:48:15 -08:00
Myk Taylor 679e91d2e7
warn against running untested scripts
but allow after the first try
2023-01-10 23:21:30 -08:00
Myk Taylor 1d0f6b3a95
more careful bounds checking for screen tiles 2023-01-10 19:40:13 -08:00
Myk Taylor 353117d484
fix a crash in Screen when read or paint tile indices are negative 2023-01-10 19:05:04 -08:00
Myk Taylor 7cf703ef23
turn down Ruby support 2023-01-09 23:59:55 -08:00
Myk 17bcdb1f56
Merge pull request #2583 from arekatir/develop
Remove os.execute and io.popen
2023-01-09 23:53:32 -08:00
DFHack-Urist via GitHub Actions 7a9dd02bbd Auto-update submodules
library/xml: master
scripts: master
2023-01-10 07:51:40 +00:00
Myk c26ed36893
Merge pull request #2577 from myk002/myk_get_any
get rudimentary getAny(Unit|Item|Building) working
2023-01-09 23:50:02 -08:00
Myk e1b63d8600
Merge pull request #2576 from myk002/myk_pin
use an actual pin texture for ZScreen pins
2023-01-09 23:49:50 -08:00
DFHack-Urist via GitHub Actions c6472560c6 Auto-update submodules
library/xml: master
scripts: master
2023-01-10 07:14:21 +00:00
pre-commit-ci[bot] 8ad1cafb07 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-10 04:52:00 +00:00
arekatir d725b813c7
Remove os.execute and io.popen 2023-01-09 23:04:43 -05:00
Myk Taylor fecc733192
detect clicks on part of pin that sticks up 2023-01-09 12:52:26 -08:00
Myk Taylor f39684dbfd
pass getAny calls through ZScreens 2023-01-09 09:35:55 -08:00
Myk Taylor f8728a4388
get rudimentary getAny(Unit|Item|Building) working 2023-01-09 01:39:48 -08:00
Myk Taylor 2234328a91
use an actual pin texture for ZScreen pins 2023-01-09 00:47:13 -08:00
DFHack-Urist via GitHub Actions 3e11a31070 Auto-update submodules
library/xml: master
2023-01-09 07:15:10 +00:00
Myk Taylor 92489ef27d
get things to compile with the recent structure updates 2023-01-08 11:33:14 -08:00
DFHack-Urist via GitHub Actions f78267351d Auto-update submodules
library/xml: master
2023-01-08 18:45:17 +00:00
Myk a983326dd6
Merge pull request #2569 from myk002/myk_set_option
add CycleHotkeyLabel:setOption()
2023-01-08 04:48:28 -08:00
DFHack-Urist via GitHub Actions 0684b4a9ba Auto-update submodules
library/xml: master
scripts: master
2023-01-08 07:13:26 +00:00
Myk f9cc43728f
Merge pull request #2567 from RosaryMala/develop
Remote Fortress Reader updates
2023-01-07 16:30:31 -08:00
Rose 95223d8197 Got archery target direction back, and cleaned up a few things. 2023-01-07 14:37:44 -08:00
Myk Taylor 72d5760ff6
add CycleHotkeyLabel:setOption() 2023-01-07 01:00:40 -08:00
Myk f20180de47
Merge pull request #2568 from ab9rf/5005-persistence
fix persistence
2023-01-06 21:50:20 -08:00
Kelly Kinkade 51bb5589de change order of state change event processing
this will cause persistent data storage to load _before_ `SC_WORLD_LOADED` events are sent to scripts and plugins
2023-01-06 21:55:42 -06:00
Kelly Kinkade 3e4861b54b fix persistence for changed file structure
`data/save` -> `save`
2023-01-06 21:24:01 -06:00
Myk fe9d1e186e
Merge pull request #2562 from myk002/myk_greenify
allow color options for CycleHotkeyLabel
2023-01-06 19:10:39 -08:00
Myk Taylor 093eac3eb2
use a black background for non-top ZScreen titles 2023-01-06 18:58:08 -08:00
Myk Taylor 810430f1a2
make windows lockable (can ignore r-click and esc) 2023-01-06 18:48:53 -08:00
Myk Taylor 1f5ae4165f
return self from raise, update docs 2023-01-06 15:43:08 -08:00
Myk Taylor fccefd1155
don't pass through handled r-clicks 2023-01-06 15:43:08 -08:00
Myk Taylor f43358002d
Allow dialogs to close on r-click 2023-01-06 15:43:08 -08:00
Myk Taylor 574be3fe73
provide a useful default impl of isMouseOver 2023-01-06 15:42:40 -08:00
Myk Taylor f15e9e3577
don't revert to plain strings for pens 2023-01-06 15:42:30 -08:00
Myk Taylor e111a73763
allow color options for CycleHotkeyLabel
and use the option to render `On` in green for ToggleHotkeyLabel
2023-01-06 15:42:27 -08:00
Myk Taylor 6f46ae672e
add Gui::getDFViewscreen and Lua binding 2023-01-06 12:17:36 -08:00
DFHack-Urist via GitHub Actions 1540e7c294 Auto-update submodules
library/xml: master
scripts: master
2023-01-06 07:13:54 +00:00
DFHack-Urist via GitHub Actions f4d059ea3d Auto-update submodules
library/xml: master
scripts: master
2023-01-06 02:43:42 +00:00
Myk a59f1518c1
Merge pull request #2556 from myk002/myk_zscreen
framework for passthru, z-order swapping windows
2023-01-05 18:41:57 -08:00
DFHack-Urist via GitHub Actions 9eb5165ebe Auto-update submodules
library/xml: master
2023-01-06 02:11:27 +00:00
Myk Taylor 1934014659
framework for passthru, z-order swapping windows 2023-01-05 18:07:38 -08:00
Myk Taylor 3969262e44
update submodule refs 2023-01-05 17:50:49 -08:00
Myk Taylor 845391f4e6
fix overzealous "ui" -> "plotinfo" replacement
some comments were just talking about the UI..
2023-01-05 17:46:30 -08:00
Myk Taylor c4a2bdd08e
update lua too 2023-01-05 17:35:33 -08:00
Myk Taylor 5e5775f5e3
rename globals according to structures update 2023-01-05 17:11:01 -08:00
Myk a5b11065db
Merge pull request #2547 from lethosor/codegen-stl-map-stub+v50
[v50] Add read-only container_identity for std::map
2023-01-05 15:35:27 -08:00
Myk Taylor 412531bf03
really fix the format string this time 2023-01-04 21:29:45 -08:00
Myk Taylor 9cbcd81f63
fix format strings for vars that were size_t 2023-01-04 21:24:52 -08:00
Myk Taylor c70c4131bd
don't include dfhack-config/ in release tarball
create it at runtime
move files around so no dfhack-owned files are in there
2023-01-04 19:41:58 -08:00
Myk b62cfa3699
Merge pull request #2552 from myk002/myk_mouse
Get correct mouse button down behavior in Lua without overwriting enabler fields
2023-01-04 19:39:43 -08:00
Myk 78be3a6463
Merge pull request #2548 from myk002/myk_logo
Display DFHack logo for the hotkeys overlay widget
2023-01-04 19:06:05 -08:00
Myk Taylor 4e51e02924
move SDL shims to a new DFSDL module 2023-01-04 17:15:32 -08:00
Myk Taylor 5d04b9c4cb
add Textures module and load DFHack logo
undocumented for now since it's internal. in the future, perhaps this
could morph into a dynamic texture loading facility for tools
2023-01-04 13:30:18 -08:00
Myk Taylor 9fd3ef7b4b
correct mouse down behavior without hosing enabler
before, we inhibited multiple mouse button down events by overwriting
the values in enabler. now we keep state internally and inhibit multiple
events on our own.

also add events and state tracking for middle mouse button
2023-01-03 14:52:49 -08:00
Myk Taylor 55cdaea636
refactor EditField text insertion 2023-01-03 12:57:02 -08:00
Myk Taylor a0343b06a6
adjust text wrap to new scrollbar width 2023-01-03 00:56:07 -08:00
DFHack-Urist via GitHub Actions fa2da54852 Auto-update submodules
library/xml: master
scripts: master
2023-01-03 07:13:58 +00:00
lethosor feeefcf149
Add read-only container_identity for std::map 2023-01-03 01:16:42 -05:00
Myk 6361b0a3a4
Merge pull request #2543 from myk002/myk_prep_for_quietust
prep for Quietust's structure updates
2023-01-02 20:42:48 -08:00
Myk 35ce361b09
Merge pull request #2542 from myk002/myk_dwarfmode_dims
clear out obsolete area map and menu logic from the Gui module
2023-01-02 20:42:30 -08:00
Myk 24235694f2
Merge pull request #2539 from myk002/myk_screen_write
implement Screen::paintTile for both modes and readTile for graphics mode
2023-01-02 20:41:35 -08:00
Myk 3ccf6034b9
Merge pull request #2538 from myk002/myk_script_paths
add dfhack-config/scripts to default script paths
2023-01-02 20:41:13 -08:00
Myk Taylor da63d6294b
ensure the scrollbar midpoint is always rendered
this mimics the vanilla scrollbar behavior (and looks better)
2023-01-01 17:55:06 -08:00
Myk Taylor 218fbdbd45
prep for Quietust's structure updates 2023-01-01 01:03:42 -08:00
Myk Taylor aa091ed37e
overwrite anchored textures where we actually touch their anchor 2023-01-01 00:45:14 -08:00
Myk Taylor 7d5d2d0a9b
clear out obsolete area map and menu logic
in particular, return the correct map dimensions in getDwarfmodeDims()
2022-12-31 22:49:30 -08:00
Myk Taylor a6294c24fb
implement Screen::paintTile and readTile 2022-12-31 21:16:42 -08:00
Myk Taylor 5232e2b04e
add dfhack-config/scripts to default script paths 2022-12-30 23:30:11 -08:00
Myk bf995a0968
Merge pull request #2533 from myk002/myk_lua_input
adjust Lua widgets to new input scheme
2022-12-30 22:37:12 -08:00
Myk a7dd14d699
Merge pull request #2535 from myk002/myk_smart_refresh
only do a full refresh when needed
2022-12-30 22:36:42 -08:00
Myk Taylor cf65f48aa0
don't use defunct MENU_CONFIRM keybinding 2022-12-30 22:35:08 -08:00
Myk Taylor 21f137644f
remove trailing whitespace 2022-12-30 22:35:08 -08:00
Myk Taylor 3a76fc086f
fix keyboard movement of Panel widgets 2022-12-30 22:35:08 -08:00
Myk Taylor 6871bc20c4
use new KEYBOARD interface keys in move delta 2022-12-30 22:35:08 -08:00
Myk Taylor 04f2d555c6
implement context-aware mouse wheel scrolling 2022-12-30 22:35:08 -08:00
Myk Taylor 38b525bdb5
adapt lua library widgets to new keyboard keybindings 2022-12-30 22:35:08 -08:00
Myk Taylor 1d7a7c8a49
Don't leave artifats behind when dimissing mboxes 2022-12-30 22:20:50 -08:00
Myk Taylor dd0cc087d5
Revert "consolidate full refresh logic in widgets.Panel"
This reverts commit 33787473f0.

I've already found another use case where we need a more general
implementation -- modal dialogs that inherit from FramedScreen that
appear and disappear
2022-12-30 22:13:53 -08:00
Myk bf9db8e223
Merge pull request #2534 from myk002/myk_scrollbar
skin our scrollbars to look and hover like DF's
2022-12-30 21:51:25 -08:00
Myk Taylor 33787473f0
consolidate full refresh logic in widgets.Panel 2022-12-30 20:44:15 -08:00
Myk Taylor 88dcdfd158
move trigger code from Window to Panel
where the drag/resize code actually is. Panels can be dragged around the
parent screen without them being a Window
2022-12-30 20:01:09 -08:00
Myk Taylor 70a0f4a718
only do a full refresh when needed
this significantly reduces CPU utilization when DFHack-owned screens are
visible.
2022-12-30 17:06:41 -08:00
Myk Taylor 7d91f9262d
respect tile colors in pens 2022-12-30 05:36:41 -08:00
Myk Taylor 3aac79fe4f
skin our scrollbars to look and hover like DF's 2022-12-30 05:33:17 -08:00
Myk Taylor 83a8e9a45a
render bright colors correctly 2022-12-30 03:30:01 -08:00
Myk Taylor 1265d531d5
only keep the anchor flag if it's already there 2022-12-30 00:53:44 -08:00
Myk Taylor f45eac993a
use semantically clearer div rather than bit shift 2022-12-29 22:18:35 -08:00
Myk Taylor a4c11de4fb
returns correct mouse pos when in ascii 2022-12-29 00:01:40 -08:00
Myk Taylor 371f5be050
fix signedness of comparison var 2022-12-28 23:31:06 -08:00
Myk Taylor cff603e243
allow Labels to write tile textures 2022-12-28 23:16:13 -08:00
Myk Taylor d7b67e9528
remove cached USE_GRAPHICS from gui.lua
it's no longer constant
2022-12-28 16:27:44 -08:00
Myk Taylor fc523f12fe
expose and document dfhack.screen.getMousePixels() 2022-12-28 16:05:27 -08:00
Myk Taylor 07f8fad787
implement Gui::getMousePos and Gui::getDepthAt 2022-12-28 16:00:10 -08:00
Myk ada96e616a
Merge pull request #2521 from myk002/myk_hooks
Prepare for the hook API
2022-12-27 19:47:38 -08:00
Myk Taylor e2a4eeb422
write textures and chars to the map 2022-12-27 17:00:50 -08:00
Myk Taylor 99ffe769fa
rendering the parent now involves a full refresh
in order to get the background
2022-12-27 15:23:34 -08:00
Myk Taylor 033eb2aefd
use default background colors
and ensure texpos_lower doesn't peek through
2022-12-27 15:05:13 -08:00
Myk Taylor 75afa88790
use tiles for our default frame 2022-12-27 14:40:35 -08:00
Myk Taylor 69c9e3ffb7
render tiles if given in the pen; otherwise text
this commit also smooths out many conflicts with other layers, but the
anchor layer still gives us trouble. it will overwrite us unless we
cover the upper left tile of the anchor graphic, and then the entire
anchor graphic will disappear. not ideal, but it's a start
2022-12-27 14:39:03 -08:00
Myk Taylor 4f9f8ebcf6
fix unused return value warning 2022-12-26 10:26:22 -08:00
Myk Taylor 4789637625
implement new dfhooks API 2022-12-25 18:15:55 -08:00
DFHack-Urist via GitHub Actions e2425b5c7c Auto-update submodules
library/xml: master
scripts: master
2022-12-25 07:13:11 +00:00
DFHack-Urist via GitHub Actions 7625dc132e Auto-update submodules
library/xml: master
scripts: master
2022-12-24 07:13:19 +00:00
lethosor 6a61c750e9
widgets.render_text(): error early if key is invalid
This helps identify _which_ key is invalid - otherwise, getKeyDisplay()
complains that it was called with `nil`, which is less helpful.
2022-12-23 13:17:26 -05:00
lethosor 12804a10a6
Fix Gui/Screen to work with g_src changes (dfhack/df-structures#487) 2022-12-23 00:36:09 -05:00
DFHack-Urist via GitHub Actions 07a0e6e511 Auto-update submodules
library/xml: master
2022-12-22 19:38:45 +00:00
Myk Taylor 52c1e49197
get the text rendering back 2022-12-21 22:13:05 -08:00
Myk Taylor 48a9e1c518 more new var names 2022-12-22 05:16:40 +00:00
Myk Taylor 93c875fb56
adjust to new variable names 2022-12-21 14:07:36 -08:00
Myk Taylor 839e927f9b
comment out problematic code from Renderer 2022-12-21 14:06:58 -08:00
Myk Taylor 010b18c0e4
hide "offset" tiles that we occlude 2022-12-20 20:10:14 -08:00
Myk Taylor 106b55397a
comment out problematic code in Core 2022-12-20 19:04:30 -08:00