Commit Graph

28 Commits (f204f14e522e46b4823bdf0390afed4f1d2090d2)

Author SHA1 Message Date
lethosor 037e7e4901 Merge remote-tracking branch 'suokko/spotclean_ui_state_fix_1194' into develop
Moved/adjusted changelog entry
2018-07-07 18:08:53 -04:00
Pauli 72029e7de9 Avoid closing DF if launching command-prompt from prompt 2018-06-20 22:16:23 +03:00
Pauli 9b6781f0f2 Temporary lower command-prompt when executing the command
command-prompt viewscreen may affect command execution if they are
looking for UI state. To make commands execute simillary to hotkeys or
console commands the viewscreen needs to removed from the top position.

Fixes #1194
2018-06-20 21:51:45 +03:00
Pauli 9c59b7ff48 Fix unlikely memory leaks if Screen::show fails
The Screen::show takes ownership of the screen pointer. I decided to
switch the parameter to std::unique_ptr to make the pointer ownership
explicit. The unique_ptr then provides automatic screen destruction in
Screen::show unless pointer is inserted or is already in the linked list
that is managed by df.
2018-06-19 16:41:31 +03:00
lethosor abb903d28f command-prompt: support getSelectedPlant() 2018-05-12 13:02:52 -04:00
Ben Lubar a7dfacd1c5
Fix warnings in supported plugins. 2018-04-06 01:25:21 -05:00
lethosor a19e268923 Make re-invoking command-prompt hide the current prompt 2017-06-07 15:00:30 -04:00
lethosor d0c28d3f50 Prevent plugins with active viewscreens from being unloaded
This requires plugins to pass plugin_self to Screen::show(), but
avoids the need to implement special checks in plugin_onstatechange
for the SC_BEGIN_UNLOAD event.
2016-01-01 11:15:29 -05:00
lethosor 2ef24a3daf Prevent nested command invocations in command-prompt
For example, running "devel/send-key SELECT" in command-prompt would
blow up the stack by recursively calling submit()
2015-12-27 22:35:14 -05:00
lethosor 5c4e28dbff Fix initial cursor position with initial entry 2015-11-05 19:09:35 -05:00
lethosor 7437400c18 command-prompt: Prevent unloading when prompt is active 2015-08-29 19:38:41 -04:00
lethosor cac2245438 Update some plugins to use REQUIRE_GLOBAL 2014-12-03 23:26:54 -05:00
lethosor 445640f80c Allow commands invoked through command-prompt to access selected items/units/buildings
Fixes #273
2014-11-25 20:25:31 -05:00
Quietust 8a9e3d1a72 Plugin cleanup - always do "using df::global::[foo]". Also, get rid of old 0.34.11 binpatches 2014-08-11 15:07:52 -05:00
Alexander Gavrilov 2471c4a68e Add a new API for converting between interface_key and string characters.
It's necessary now that the simple linear arrangement is broken.
2014-08-11 14:23:19 +04:00
lethosor cca605d8b4 Prevent blank lines from being stored in history 2014-06-17 17:21:30 -04:00
lethosor 0c144b821d Reimplement command-prompt history
Also add shift-left/right for back/forward one word
2014-06-17 17:11:45 -04:00
lethosor 1684eced8a Remove (broken) command history
This reverts commit cc07a373f3.
2014-06-17 12:45:57 -04:00
lethosor cc07a373f3 Command-prompt history
Creates duplicate entries occasionally

Also disabled movies
2014-06-09 19:38:21 -04:00
lethosor aafcd6c43a Fix 4/6 behavior 2014-06-09 17:00:26 -04:00
lethosor 055afafedc command-prompt: Basic line editing
Left/right arrows, Ctrl-A, Ctrl-E
2014-06-09 16:50:06 -04:00
Warmist 99659e7e00 cmd-prompt needs to work on ANY screen. This fixes it. 2014-05-26 18:42:42 +03:00
lethosor 9b1d393c1c Append newline to each section of output 2014-05-15 17:30:42 -04:00
lethosor 2074f7e78b Fix handling of newline characters in command-prompt output 2014-05-15 15:51:03 -04:00
lethosor d52a07ef76 Dismiss previous command prompt before creating a new one 2014-05-14 18:56:30 -04:00
Timothy Collett e4641c506f Replace a std::string method not implemented until C++11 with a C++0x-valid substitute 2014-04-21 09:34:42 +04:00
Warmist cec4c8cd30 Added an output stream, now response is visible in same window. Also added a way to start prompt pre-filled.
It's nice to bind it to e.g. ctrl-shift-o "command-prompt :lua"
2014-03-07 18:52:06 +02:00
Warmist 904808b168 Command prompt plugin with docs and readme patch. 2014-03-04 18:51:23 +02:00