Commit Graph

92 Commits (fdaa2a35a1d3f30ba5b58372536334b7bcc52c2f)

Author SHA1 Message Date
Alexander Gavrilov e353f5f03e Add a script to complement the weapon rack binary patch. 2012-10-27 20:16:27 +04:00
Alexander Gavrilov 1f994295b8 Consider assigned vehicles in use, and tweak text color rendering. 2012-10-25 13:20:41 +04:00
Alexander Gavrilov 8eebfa007c Tweak the workflow gui script to make the UI operate smoother. 2012-10-25 12:15:18 +04:00
Alexander Gavrilov a1dd31aab3 Tweak the mechanics for showing and rendering lua screens.
- Place new screens below any dismissed ones on top.
- When asked to render a dismissed lua screen, call render() on its
  parent to avoid producing a black screen frame when unlucky.
2012-10-25 12:09:39 +04:00
Alexander Gavrilov 59ec9b304e Implement adding workflow constraints from gui/workflow. 2012-10-24 21:49:30 +04:00
Alexander Gavrilov 616c57257d Support changing the constraint ranges from the workflow gui script.
TODO: implement creating completely new constraints.
2012-10-24 19:25:06 +04:00
Alexander Gavrilov 46938625fd Pass the hotkey keys to dwarfmode from overlays, and fix gui/workshop-job. 2012-10-21 21:45:51 +04:00
Alexander Gavrilov dee0c97584 Add a gui script for viewing and changing job_item properties. 2012-10-20 21:57:36 +04:00
Alexander Gavrilov 1e2570f4cb Add an extremely simple item selection dialog by wrapping ListBox. 2012-10-17 21:42:06 +04:00
Alexander Gavrilov 4f7895f571 Support restricting the set of materials presented in the dialog. 2012-10-17 18:29:15 +04:00
Alexander Gavrilov 0046b093f7 Link visibility and event handling order.
- Hidden widgets don't receive events.
- Children handle events in top to bottom order.
2012-10-17 11:49:11 +04:00
Alexander Gavrilov ad4f9908fb Extract a generic filtered list widget from the materials dialog. 2012-10-17 10:41:50 +04:00
Alexander Gavrilov b14e4e97f5 Natively support entry icons in the List widget. 2012-10-17 09:41:48 +04:00
Alexander Gavrilov 023dc82564 Implement a material selection dialog. 2012-10-16 18:33:00 +04:00
Alexander Gavrilov d336abfd97 Add label and list widgets, and switch stock dialogs to them. 2012-10-16 14:18:35 +04:00
Alexander Gavrilov abfe2754fb Start implementing common widgets for lua screens. 2012-10-15 20:03:18 +04:00
Alexander Gavrilov 33bd8103de Extract an abstract View superclass from Screen to handle widget trees. 2012-10-15 15:30:00 +04:00
Alexander Gavrilov 33aead34b4 Implement a more automated search mode based on keys for some globals. 2012-10-02 19:53:16 +04:00
Alexander Gavrilov bd3d3061ae Add a module that wraps the dialogs as "blocking" coroutine functions. 2012-10-02 18:01:28 +04:00
Alexander Gavrilov abf503fcdc Fix the ListBox dialog to behave in a more consistent way. 2012-10-02 16:45:17 +04:00
Alexander Gavrilov 9d5adf1b2f Update the lua screens to use the new key display string API function. 2012-10-02 15:25:59 +04:00
Alexander Gavrilov 62cde96724 Add a script to reclassify 'individual choice' weapons based on unit skill. 2012-09-29 17:21:49 +04:00
Alexander Gavrilov 57b72831ca Overhaul the concept of lua 'class' initialization yet again. 2012-09-18 20:30:25 +04:00
Alexander Gavrilov 94b729579e Reindent to remove tabs. 2012-09-09 10:53:08 +04:00
warmist 8e0f3e3bce Added ListBox to gui.dialogs
A listbox class. Can be either filled with table of strings, or string+callback tables. Needs some code revision :)
2012-09-09 02:28:07 +03:00
Alexander Gavrilov bfa6ed3e08 Support setting the target area for the siege engine. 2012-09-08 13:46:02 +04:00
Alexander Gavrilov 325e294af2 Start the siege engine plugin with code to highlight obstacles on screen. 2012-09-07 19:54:32 +04:00
Alexander Gavrilov d5ea05ebb8 Implement a pressure plate sensitive to machine power.
When built next to a gearbox, it will monitor its powered state.
2012-09-06 12:37:29 +04:00
Alexander Gavrilov 8d876cc7d9 Support renaming some buildings, and arbitrary units, via gui script. 2012-09-05 21:27:42 +04:00
Alexander Gavrilov 57086ac56e Add stock MessageBox and InputBox dialog screens for lua scripts. 2012-09-05 19:45:45 +04:00
Alexander Gavrilov 27f169e298 Provide a partial application utility function to lua.
Implemented in C++ for efficiency.
2012-09-05 17:37:36 +04:00
Alexander Gavrilov 41ad42d0fd Expose the liquids plugin engine to lua, and make a wrapper gui script. 2012-08-25 10:37:03 +04:00
Alexander Gavrilov d52c54cc76 Pull some minor stuff from mechanisms into main libs. 2012-08-24 13:49:22 +04:00
Alexander Gavrilov 296f82b02f Try using the Objective-C 'alloc + init' idiom for lua screen objects. 2012-08-24 13:28:34 +04:00
Alexander Gavrilov e825dc5ddb Tweak the API for current viewscreen, and dispatch show/dismiss from C++. 2012-08-24 13:20:08 +04:00
Alexander Gavrilov c6c5ad56c9 Track lua event listener count, and let the C++ host know.
This allows completely avoiding the call overhead if there
are none. The downside is that the event object now has to
be a userdata with lots of metamethods.
2012-08-23 19:27:28 +04:00
Alexander Gavrilov cf4b8a0196 Improve viewport manipulation utilities and support scroll in mechanisms.
I.e. allow the user to scroll around with cursor keys,
provided that keeps the cursor still visible.
2012-08-22 22:29:01 +04:00
Alexander Gavrilov 7987ea9a98 Put some compatibility features into the base dfhack viewscreen. 2012-08-22 18:18:19 +04:00
Alexander Gavrilov 6e8b68fb29 Add yet one more frame style. 2012-08-22 13:06:06 +04:00
Alexander Gavrilov 2b79582e99 Implement a policy of marking DFHack-owned screens with a signature. 2012-08-22 12:28:01 +04:00
Alexander Gavrilov 15235cc938 More work on utilities for making lua viewscreens. 2012-08-21 19:40:37 +04:00
Alexander Gavrilov 451e965936 Add a Painter class for lua viewscreens, and extract other utilities.
Painter clips to an arbitrary rectangle window, and
tracks current cursor and color state.
2012-08-21 11:35:39 +04:00
Alexander Gavrilov 601a3a7927 Add a script that implements a linked mechanism browser. 2012-08-20 23:04:01 +04:00
Alexander Gavrilov cacb082416 Add a stupid example of a lua-controlled viewscreen. 2012-08-19 17:53:25 +04:00
Alexander Gavrilov 30f71ff510 Implement support for lua-backed viewscreens. 2012-08-19 14:27:44 +04:00
jj c20951c30b Merge branch 'master' of git://github.com/angavrilov/dfhack 2012-07-06 20:37:14 +02:00
jj 8e17ebbefc add SC_PAUSED / SC_UNPAUSED onStateChange events 2012-07-05 18:03:02 +02:00
Alexander Gavrilov 9046fed648 Add documentation for some utility functions implemented in lua. 2012-06-24 12:51:19 +04:00
Alexander Gavrilov bd37cc09c5 Update the Lua API document with info about scripts. 2012-06-22 20:17:55 +04:00
Alexander Gavrilov 65e82f7c12 Support controllable error presentation verbosity in lua code.
Use qerror to squash stack traces and location prefix.
2012-06-22 16:36:50 +04:00