Commit Graph

365 Commits

Author SHA1 Message Date
Tom Rochette a783ef75f6 Simple Lua sandbox.
Uses an EnvironmentSandbox to restore the Environment.CurrentDirectory. Will also catch any script exception and redirect them to the Lua console.

With this change, I've tried to replace all the places where Lua is executed so that if an exception occurs, it is catched, sent to the console and a callback is executed if necessary.

This also fixes a small issue where any callback generating an exception would crash BizHawk.
2015-07-01 22:38:19 -04:00
adelikat c53cef6cf9 tastudio/lua - implement tastudio.onqueryitemtext 2015-07-01 19:46:14 -04:00
adelikat f847e905d2 tastudio/lua - add onqueryitembg event to the lua library, this is called during each cell's background color drawing callback, and gives the opportunity for lua to override the color. 2015-07-01 19:01:29 -04:00
Tom Rochette de98e0ed66 [#405] Set Environment.CurrentDirectory when executing Lua events within a WinForm.
Since events are not executed within the LuaConsole.ResumeScripts method, those did not have Environment.CurrentDirectory available for the executing script.

The fix is simple: when a lua script instantiates a LuaWinForm (through forms.newform), we store the current Environment.CurrentDirectory in the LuaWinForm object.
When a button or checkbox is triggered, it calls WinForm.DoLuaEvent which will set up the Environment.CurrentDirectory for the duration of the callback and then set it back to the initial Environment.CurrentDirectory.
2015-06-30 22:35:59 -04:00
Tom Rochette c03a162bc1 Add a split container to LUA console window.
With the split container, resizing the window will properly reformat the output section as well as allow users to resize it.
2015-06-29 00:28:35 -04:00
ConHuevosGuey d97d94ecbc Made size nullable...now requires a size input. 2015-06-28 13:25:28 -05:00
ConHuevosGuey 229865c443 Added a 'Draw Axis' function to lua GUI library 2015-06-28 13:23:07 -05:00
pasky1382 703dc33cc0 Small correction.
Removed the link to the key names that did not contain correct information, this list of key names is not used in Bizhawk for lua's input.get()
2015-06-22 13:40:22 +00:00
adelikat 6517178e6d lua - savestate.looad() - if path does not exist put a helpful error message rather than a vague .net error 2015-06-15 01:17:02 +00:00
adelikat a04a80bfce add "new" to LuaCanvas.Refresh() because I"m tired of seeing the warning 2015-05-17 20:33:27 +00:00
adelikat e57d15d85b oops, remove some debugging code 2015-04-12 17:47:34 +00:00
adelikat 53341ee24a Lua - add client.CreateInstance() which receives a type name available to EmuHawk and will construct and return the given object, currently it is limited to objects that have a parameterless constructor but we should be able to improve upon that limitation 2015-04-12 17:46:27 +00:00
adelikat a0d56df06b Lua - client library - change GetOpenTools() to GetAvailableTools() which returns a list of tools available to the currently loaded core, change GetTool() to receive any avaialble tool, if the tool isn't open, GetTool() opens it 2015-04-12 17:37:06 +00:00
adelikat 8d86ee012e Lua - implement client.GetOpenTools() to return a list of currently open tools. And client.GetTool(string name) which return an object to lua representing a currently loaded tool, lua then has access to any public methods of that object 2015-04-10 21:56:03 +00:00
scepheo abf1e55934 A bit of testing with Lua. 2015-04-10 14:11:01 +00:00
pjgat09 57fa633a9e Lua Forms: Fixed a bug with SetProperty 2015-04-05 04:11:00 +00:00
zeromus e12c711a0e try to manage lua memory leak prevention in a way thats safer from re-entrancy during finalization thread 2015-03-28 05:53:03 +00:00
adelikat 6982df8035 Lua console - add a null check on close, LuaImp should never be null unless something went bonkers on load 2015-03-28 01:09:50 +00:00
adelikat b74e0a3b3d Lua - apply CrazyTB's patch to fix gui.drawImageRegion() 2015-03-24 22:15:36 +00:00
adelikat 16e9bc7d38 Fix some lua documentation 2015-03-23 22:22:02 +00:00
adelikat e4b613d9f7 Lua - add gui.drawImageRegion() 2015-03-23 21:27:24 +00:00
adelikat 5a2146bde2 Lua - fix fill behavior in drawBox, drawRectangle, drawEllipse, and drawPie 2015-02-24 00:37:56 +00:00
adelikat b45d3820be Lua - gui library - make all colors optional parameters and use defaults if not provided (initially white foreground and transparent background). Add gui.defaultForeground(color) and gui.defaultBackground(color) to change those defaults 2015-02-23 03:10:38 +00:00
adelikat 1514faf300 Move PresentationPanel from GlobalWin to Mainform, since it was primarily used there (and the few other places knew about GlobaWin.MainForm anyway) 2015-02-22 03:53:07 +00:00
scepheo 48a6686f31 Lua Console: Command window gives slightly more sensible output now. 2015-02-08 23:47:15 +00:00
scepheo 152323d891 Lua Console: Console and immediate fields now use Courier New. 2015-02-08 23:09:58 +00:00
adelikat 0ee999dde4 Lua - drawImage - speed up by caching images instead of reading them from disk on every call 2015-02-07 15:39:16 +00:00
adelikat 3ebd9bb2df Lua functions list - greatly speedup drawing 2015-02-05 00:04:05 +00:00
adelikat 53cda95ca5 Lua Console - don't nag to save a session, unless a session exists 2015-01-31 01:52:29 +00:00
scepheo 860227ee66 LuaConsole: Actually stop and restart script upon tool restart. 2015-01-29 14:50:09 +00:00
adelikat 6f2488aa57 Lua - clear out lua drawing surface on restart 2015-01-29 03:36:19 +00:00
adelikat 307845b3b5 Lua - recover from a locked drawing surface exception and log to the console, rather than crash the emulator 2015-01-29 02:14:39 +00:00
adelikat 24a517d293 Lua - properly re-inject core dependencies on restart 2015-01-28 14:38:06 +00:00
adelikat 09072acb3b Lua Console - immediate box - in some situations wrap the text in a console.log(), such as if the user simply types a variable name 2015-01-27 23:27:44 +00:00
adelikat 3b13ea4a8f spaces to tabs, good ol whitespace commit 2015-01-27 23:18:48 +00:00
goyuken 82fcd0bc5e refactor IVideoProvider into a service. uses in mainform and friends are still hacky 2015-01-14 22:37:37 +00:00
christoph.boehmwalder 99f9d91671 LuaConsole - Fixed tooltip of Duplicate button. 2015-01-03 22:40:11 +00:00
jdpurcell cf7815adc9 Fix anchoring of new textbox. 2015-01-02 22:02:00 +00:00
christoph.boehmwalder 879302710e Lua Console - Attempt to fix scaling horror 2015-01-02 20:01:01 +00:00
christoph.boehmwalder e11811e2f8 Lua - Added an input box to the script console for on-the-fly command input
Set ImageScaling to None for all buttons in the toolbar in order to fix scaling issues
2015-01-02 19:36:32 +00:00
adelikat 4e0e5958ed Lua - Convert Gui library to service injection system 2015-01-01 21:44:49 +00:00
adelikat a7c91ddcdd Lua - convert to the Client library to the service injection system 2015-01-01 20:58:57 +00:00
adelikat 72893a10f3 EmuLuaLibrary - remove some commented code that should have been deleted 2015-01-01 19:19:51 +00:00
adelikat b8d667812b convert Lua Console to IToolFormAutoConfig 2015-01-01 17:48:25 +00:00
adelikat a2bee4f88a Lua Console - move "Autoload Session" to the recent session menu 2015-01-01 17:28:34 +00:00
goyuken cfaf59f887 lua: internal infrsatructure changes to nes library 2014-12-17 23:03:58 +00:00
goyuken ecf8728de6 factor out serviceinjector to emulation.common 2014-12-17 18:17:16 +00:00
goyuken 08d09bc64f a few more itoolform cleanups 2014-12-15 18:13:54 +00:00
adelikat 685756ea8e Remove LoadTraceLogger() from ToolManager since it was simply a wrapper to manage availability logic, most of those types of properties should be removed now 2014-12-14 01:39:15 +00:00
scepheo 769cbeb1a0 - IToolForm: Added RequiredServices attribute to define dependencies, and added EmulatorServices for ToolManager to supply them.
- IServiceProvider, BasicServiceProvider: Added compile-time unknown type versions of GetService and HasService.
- ToolManager: Added IsAvailable to test whether all dependencies for a tool are available.
2014-12-13 21:54:59 +00:00
adelikat 21889bba58 Lua Console - replace a NullEmulator check with a Global.Game != null check as that is more precisely why a check is happening 2014-11-30 18:44:20 +00:00
adelikat 4681fef0c2 Add an IsNull() extension method to IEmulator (checks for null and if NullEmulator) and replace EmuHawk NullEmulator checks with this method instead 2014-11-30 14:18:44 +00:00
adelikat 96b626434f Lua Console - on drag and drop, don't be case sensitive with the file extension 2014-11-26 17:42:30 +00:00
adelikat d7596684c2 Lua - Expose tastudio library in non-developer builds 2014-11-19 16:17:40 +00:00
adelikat e4cd7a3449 Lua Console - when reporting a script error, update the number of active scripts label 2014-11-18 01:09:06 +00:00
adelikat 252ea85f99 Lua Console - add a duplicate script menu and toolbar item, functions similarly to new script except it starts with the text from the highlighted script 2014-11-09 16:18:09 +00:00
adelikat 5c92adcaaa Wire up the Log callback into lua libraries, this got lost in the last refactor I did, and so errors were not getting reported 2014-11-08 14:54:00 +00:00
adelikat d0aee55059 Tastudio - a bit of simplifying some code 2014-10-20 19:04:59 +00:00
scepheo bad2bda4f4 Added Lua functions to work with the letterboxing of the emulator, and for transforming emulator space points to client space. 2014-10-10 11:02:18 +00:00
zeromus 1358294a5c ladies and gentlemen, it is my extreme pleasure to you, for tonight's entertainment to present, the lua DrawText without cleartype. May you all enjoy it as much as I have. 2014-10-04 02:09:25 +00:00
adelikat 7a1fe8d51d lua/tastudio - implement tastudio.islag() and tastudio.hasstate() 2014-09-22 21:58:45 +00:00
adelikat 8b212da594 tastudio/lua - implement tastudio.getmarker(), tastudio.setmarker(), and tastudio.removemarker() 2014-09-21 15:17:29 +00:00
adelikat 538c4632af Add a LuaLibraryAttributes attribute to lua libraries with a Released property, only register libraries that are released except in Developer Builds, set tastudio library Released flag to false 2014-09-20 01:00:50 +00:00
adelikat ad16be7712 Start a tastudio lua library 2014-09-19 21:43:16 +00:00
adelikat afdfe11c7e lua - forms.label - add an optional fixedwidth font param 2014-09-07 02:42:44 +00:00
kylelyk 321c8c64bf Added documentation to IControlMainForm, renamed a few variables, moved IControlMainForm related code in MainForm to the same region. 2014-08-19 19:24:17 +00:00
adelikat fe09023ef6 When closing the lua console - clear the lua surface 2014-08-16 20:09:57 +00:00
adelikat bcd78cc4b8 Round 1 of Movie loading system overhaul, this fixes the problem of loading sram when a movie is loaded. Still todo: some cleanup of some hacks that are no longer needed, and restoring the ability to open the play movie dialog and other things, while a movie is active 2014-08-02 15:32:48 +00:00
adelikat 43d9f77fd6 this is mostly a hack, but fixes loading a rom when a movie is still running 2014-08-01 01:34:40 +00:00
adelikat 7ec866ced5 add some extensions to the ControlExtension class for converting cruddy .NET 1.0 collection objects to IEnumerable<T>, and start removing some code in specific forms that work around cruddy .NET 1.0 stuff 2014-07-28 03:01:57 +00:00
adelikat 5d4ff76ed6 Convert a copy/pasted method in a bunch of tool dialogs to an extension method 2014-07-28 02:31:51 +00:00
adelikat ce4ce0bacc Convert some static methods in ToolHelpers to extension methods 2014-07-28 01:51:11 +00:00
adelikat 0397ea1ff4 Remove the CustomControls/Util file and move all the classes into the Form Extensions file, since they were all extension methods for window form objects 2014-07-27 15:22:30 +00:00
adelikat 22ea422530 Lua documentation - fix anchoring on a button (a dev only button, this has no impact on release builds) 2014-07-27 12:08:28 +00:00
adelikat 5f1df3224c fix some dangling references to BizHawk.Multiclient mostly in comments, but also in some client facing tooltip and lua documentation 2014-07-27 01:19:33 +00:00
adelikat 570f77cc68 Implement FastUpdate() on IToolForm. The intent here is for tools to do the minimum amount necessary when updating. This allows them to avoid slow things like drawing, but do critical activities such as Ram tools incrementing change counters, and loggers can continue logging. When Turboing, instead of bypassing tool updates, the client will run the fast update instead. Note: a few tools still need to be thought out as to what they need to do in a fast update 2014-07-25 01:55:21 +00:00
adelikat 7e768eacb1 When rewinding show << and <<<< symbols (not sure when those ever got removed). Tastudio - disable rewind on load, and restore it (if it was on) when closed 2014-07-11 17:14:45 +00:00
adelikat 1964f3754a Merge InputValidate into StringExtensions 2014-07-03 16:00:57 +00:00
adelikat ab5cfab035 remove redundant code throughout the emuhawk project 2014-06-29 02:28:48 +00:00
adelikat e4a12c58bc for Developer builds - Lua functions list - a ToTASVideosWikiMarkup button that copies to clipboard 2014-06-05 00:23:05 +00:00
zeromus 0fe74f95e7 fix LuaConsole PWD-related bugs 2014-06-03 02:39:15 +00:00
adelikat 0649d1c77e Lua - add some more documentation, add a method that generates tasvideos wiki markup of the documentation and outputs to a file (method not wired to anything, there to save me tons of time when releasing) 2014-06-03 02:19:13 +00:00
adelikat d037c6ed60 Oops 2014-06-03 01:21:49 +00:00
adelikat ba4e7d620b Refactor the LuaDocumentation class to remove a bunch of unnecessary stuff 2014-06-03 00:34:41 +00:00
adelikat 5d79072a38 Lua - Finish strongly typing the Color params in the gui library, Lua Functions List - cleanup display of Color params and some other things 2014-06-02 01:04:13 +00:00
adelikat 58b5163715 Lua Interface - support Strongly typing System.Drawing.Color, and strongly type the color parameters of gui.drawEllipse() 2014-06-02 00:43:25 +00:00
adelikat 83ada011e8 Lua - Refactor how lua libraries are registered by searching assemblies and finding implementations and building a list of these 2014-06-01 22:02:59 +00:00
adelikat 3f675b2053 Lua functions list - don't throw exceptiosn when filtering, don't know why it happens but this will squash it, and it isn't important enough to know why. 2014-06-01 15:44:40 +00:00
adelikat 0782c9820d Lua - implement event.onexit() - fires when the calling script stops execution, supports multiple callbacks per script 2014-05-26 03:08:16 +00:00
adelikat 4086eee72d Load Rom - actually pass in the deterministic emulation flag, and change the logic so that the client derives determinstic emulation (currently just if a movie is active), but can be passed in an override if calling code wanted to. 2014-05-24 22:06:08 +00:00
adelikat 5ebc0f5428 Lua Console F1 hotkey assigned to Lua Functions list 2014-05-24 16:54:00 +00:00
adelikat 8dc56b312e Lua Function List dialog - add a filter box 2014-05-24 13:19:24 +00:00
adelikat ce6cd2ec5f rip out the lua writer dialog and deeming it a failed experiment. Lua Console - re-implement the new script dialog so that it calls a save file dialog, and if the user picks a file it creates a new lua script with a minimal while loop, and then invokes a new process with this newly created file for quick editing 2014-05-24 01:59:59 +00:00
adelikat a89efe9c27 Lua - make form windows have a start position of "Center Parent" 2014-05-22 01:03:18 +00:00
adelikat b406146ae4 Fix "watch file" to "Lua script file" in save dialog on Lua Writer. To do: delete lua writer 2014-05-21 13:18:54 +00:00
adelikat e88b7cc93e one more tweak to make lua library constructors unified 2014-05-21 01:15:52 +00:00
adelikat 17568997bf Lua - unify constructors and have all libraries receive a lua context and an output callback, simplify some convolved registration code 2014-05-21 00:17:35 +00:00
adelikat 6401e6d719 Refactor LuaLibraryBase to have a Lua context rather than misc libraries being in charge of that when needed. Still todo: clean up the inconsistent constructor logic, vs setting these as public properties 2014-05-20 20:34:51 +00:00
adelikat f19d15d1ed Lua - add a Log callback to the LuaLibraryBase class instead of having misc libraries have to build out this behavior when they need it 2014-05-20 20:25:18 +00:00
adelikat 4ee4088c4c read/write byte range functions - range check, and log warnings if user attempts to access outside the domain range, rather than throw a vague lua exception and crash 2014-05-19 01:42:41 +00:00
adelikat 059952f0a4 Change memory.getmemorydomainlist() to return a lua table instead of a string 2014-05-19 01:06:44 +00:00
adelikat 3d10d67fea Implement bizstring.split() 2014-05-18 21:06:16 +00:00
adelikat 55b4dcd53c gui.text - remove hacks that attempt use window size. Better logic is to be pure client space, and let gui.drawText do anything else 2014-05-14 23:44:46 +00:00
adelikat 0b6795fffc Some misc cleanup of redundant qualifiers 2014-05-04 14:10:28 +00:00
gochaism 0a9039fc60 Set SystemIcons.Application to Lua form icon. 2014-05-02 00:44:14 +00:00
gochaism 3fd9113f0d Disable maximize/resize of Lua forms, since user cannot do anything on resize anyway. 2014-05-02 00:38:48 +00:00
gochaism a84b4126f2 Lua: Make console.log(...) a little more prettier. 2014-05-01 00:25:14 +00:00
adelikat 9d7c92fb6e Oops 2014-04-29 21:25:17 +00:00
adelikat 8f35b29a5c Remove extra newline in console.log/print 2014-04-29 20:39:19 +00:00
gochaism 38a0a3593e Lua: Update print and console.log to take variable arguments. 2014-04-29 05:07:43 +00:00
adelikat 8c1c034090 Lua - make Print() be an alias of console.log() 2014-04-29 01:24:06 +00:00
zeromus c450351801 add tooltip for lua console erase button 2014-04-27 17:49:25 +00:00
adelikat bbf7c43b6d Rip out the Alert font from OSD Manager since it wasn't being used for anything useful anymore, Ram Watch on screen display - show frozen addresses in a cyan color instead of red to be consistent with the rest of the system 2014-04-27 13:01:10 +00:00
adelikat 67704b35bf Lua Console - dont' flag changes when change the on/off status of a script as that leads to being nagged too much (for instance, toggling a lua script at any time during recording and then restarting your movie). Remember the file name when creating a new session as to do a Save As during AskSave() 2014-04-22 21:35:04 +00:00
adelikat 603fd81066 Lua - implement movie.fps() and add MovieTimer.lua script that shows the clock time for a given movie (updates while recording) 2014-04-22 21:27:08 +00:00
zeromus 7adc15d97e work on opengl display manager: optimized codepaths, user retroshader selection, support for importing a textureID from another core; add erase button to lua console; 2014-04-15 21:46:18 +00:00
adelikat 6adde23553 Lua - also fix client.frameskip() 2014-04-13 18:39:46 +00:00
adelikat f589a91479 Lua - fix client.setwindowsize() and client.speedmode() 2014-04-13 18:35:27 +00:00
adelikat 9c3a7fec37 Lua - add a gameinfo lua library with getromname(), getromhash(), getdisplaytype(), getindatabase(), getstatus(), getisstatusbad(), getboardtype(), and getoptions() methods 2014-04-13 14:22:13 +00:00
adelikat 5559024757 Lua - Rip out gui.alert() and refactor/simplify things as a result 2014-03-23 17:39:07 +00:00
adelikat 54363e4da1 Lua - fix gui.drawText() (and gui.drawString) 2014-03-23 17:24:06 +00:00
adelikat 1226603697 Lua - Fix gui.Alert() to at least work. However, in trunk the alert font was gimped into regular font with the opengl change, and this is probably for the best. Will remove this lua feature and alert font code in a later commit 2014-03-23 17:12:25 +00:00
adelikat 8ac9f7d2dd Lua Console - try to use relative paths when saving and loading lua scripts 2014-03-23 14:44:18 +00:00
adelikat f714093b23 Movies 2.0 - some progress towards supporting floats 2014-02-25 02:56:32 +00:00
adelikat 33fdf03af6 Lua - fix forms.newForm() 2014-02-23 22:47:45 +00:00
adelikat 63e8702242 Lua - gui.text() and gui.Alert() - strongly type the anchor parameters as a string, will still except 0, 1, 2, or 3 as it did previously, for which it will interpret them as string automatically 2014-02-17 01:57:25 +00:00
adelikat 4ca0f5792b rip out some lua console code I didn't mean to check in 2014-02-16 23:06:14 +00:00
adelikat 5849d2d80d make the Select All feature built right into VirtualListView instead of writing the same code over and over in the tool dialogs, also make said code faster on large lists 2014-02-15 19:15:04 +00:00
adelikat 05823d3022 fix ButtonCount lua script to use console.log instead of the now deleted console.output, Lua - remove some todos that had been done and some rather useless cleanup 2014-02-14 01:27:38 +00:00
zeromus 96da0880b4 work towards generalizing lua display layers. "emu" and "native" surfaces now work and are accessible from lua. 2014-02-14 00:55:18 +00:00
zeromus da5daaa989 change lua console to have distinct toggle and refresh functions.. since the refresh icon being a toggle function was misleading me and refresh is what i want 100% of the time anyway 2014-02-13 23:25:36 +00:00
mvl1986 17f17a02fd Added the display of tooltips for all the methods that are in the lualibraries
-MightyMar
2014-02-12 13:28:48 +00:00
adelikat 23f7017651 Some code cleanup tinkerings in Client.Common 2014-02-03 20:48:01 +00:00
adelikat 3dfcd8b22a drastically cleanup the InputValidate class 2014-02-03 19:37:43 +00:00
adelikat f3755975a1 Lua - implement Always on Top and Floating Window 2014-01-30 22:32:29 +00:00
mvl1986 c4ffc78224 simpler solution for getting single entries of libraries 2014-01-28 15:44:02 +00:00
mvl1986 c392321bb0 Updated intellisense only shows unique hits and the new files are always added to the console. 2014-01-28 14:04:58 +00:00
zeromus 2275ec234f massive displaymanager/renderpanel refactor. All useful logic is now compact and in DisplayManager. Also, remove the old filter infrastructure, its totally outdated now 2014-01-28 04:39:27 +00:00
adelikat 7fac499996 Lua - finish up documentation and strongly type some more params 2014-01-27 20:19:08 +00:00
zeromus 25cab541b1 assorted cleanup and quick restore of DIspBlurry and Vsync settings 2014-01-27 06:03:18 +00:00
adelikat 7417ea7b8f Lua - more documentation and more strong typing of parameters, more fixups to display of parameter types in the Lua functions list 2014-01-27 03:16:05 +00:00
zeromus a2ba761ae1 BizwareGL! 2014-01-27 00:02:21 +00:00
adelikat 157f092aa2 Lua clean up Bit and Client libraries by using strongly typed numbers as a proof of concept that we can 2014-01-26 20:36:00 +00:00
adelikat 70feebf229 Add documentation to as many lua function as I can sanely do in one sitting 2014-01-26 18:36:27 +00:00
adelikat 91fdad9d45 LUa - whack now unused code 2014-01-26 16:21:20 +00:00
adelikat 5f9757d7d0 Lua - finish up refactoring remaining lua libraries 2014-01-26 16:15:45 +00:00
adelikat bce8320b85 Lua - new Register method on some more libraries 2014-01-26 13:30:45 +00:00
adelikat 583be2516c Lua - new registration system added to NES and SNES libraries 2014-01-26 03:26:52 +00:00
adelikat ac9e4c1d3d Lua - same to movie library 2014-01-26 02:50:26 +00:00
adelikat 988ed03198 ditto for Memory library 2014-01-26 02:43:28 +00:00
adelikat 94d20e92f4 Lua - new register system for Main Memory library and a bunch of cleanup for that lib 2014-01-26 01:48:32 +00:00
adelikat c6859a6d4f Lua ditto for joypad library and slight fix documentation 2014-01-26 00:01:40 +00:00
adelikat c66e529fb7 lua - ditto to Events library 2014-01-25 21:37:25 +00:00
adelikat 65d50ca329 Lua - refactor emu library to use the new registration method, documentation is all "TODO" 2014-01-25 21:10:51 +00:00
adelikat 06c0417f96 some Lua documentation related cleanup and support column sorting on Description in Lua Functions list 2014-01-25 20:27:51 +00:00
adelikat e22227160d show descriptions in Lua functions list 2014-01-25 20:04:26 +00:00
mvl1986 73de95d65e LuaWriter LineNumbers now work with scrolling, fixed an exception that was happening if a keyword was longer than the length of the line it checked it against.
AutoCompleteView now resizes depending on how many items are in the list.

-mightyMar
2014-01-25 16:25:05 +00:00
adelikat 4701b319be Lua - add a new way to do reflection to get method names, now the function list simply needs to match the method name, and the method name does not need to redundantly specificy the library name. Only the Bit library hooked up currenlty. 2014-01-25 15:05:53 +00:00
mvl1986 0a494c386e LuaConsole now updates when a new Luascript is saved in the LuaWriter.
LineNumbers can now be shown in the Writer, only updates when a selectionchanged event occurs, not on the scrolling of the screen.

Option to toggle LineNumbers on and off

-MightyMar
2014-01-24 12:44:55 +00:00
adelikat 8ab655d963 A better fix for something I broke 2014-01-21 16:31:12 +00:00
adelikat 9df0821fcd Lua Console - convert spaces to tabs and remove a todo 2014-01-21 16:25:51 +00:00
mvl1986 a177a111b9 Line 53:
changed: LuaImp = new EmuLuaLibrary(this);
into:    LuaImp = new EmuLuaLibrary();     

-MightyMar
2014-01-21 16:24:03 +00:00
adelikat 186503c041 Some formatting cleanup on EmuLuaLibrary, nothing useful here 2014-01-21 00:43:57 +00:00
adelikat 614d457de4 Lua - Implement client.clearautohold() 2014-01-21 00:36:22 +00:00
pasky1382 08504fc25a Added more string lua functions 2014-01-20 17:06:09 +00:00
mvl1986 cb600e5bf7 Updated the AutoCompleteView, now shows possible libraries, possible methods within libraries, replaces halftyped words and adjusts to what you typed. Also made it a bit easier to use 2014-01-20 16:33:45 +00:00
zeromus 7a07a910f8 temporarily fix build by removing lua string library which has a missing file 2014-01-20 05:13:43 +00:00
pasky1382 a2dd821474 Added new EmuLuaLibrary.String, contains decimal to hex string and binary string. 2014-01-19 16:36:43 +00:00
mvl1986 9963518715 Added sorting to the columns in the ListView 2014-01-17 11:51:52 +00:00
adelikat 1626e8b43e oops 2014-01-02 13:51:14 +00:00
adelikat 3fd6da23a6 lua - add client.get/set displayfilter() and get/set scanlineintensity() 2014-01-02 01:11:00 +00:00
adelikat a3a8170c44 Check Global.Config.SupressAskSave in ToolManager instead of doing it in the tool dialogs themselves 2014-01-01 02:09:03 +00:00
adelikat fd56efd33a Some renaming of Save/Load state functions and variables to make them less confusing 2013-12-30 16:49:13 +00:00
zeromus 436881beaf lua: better typecasting for LuaInt and LuaUInt that doesnt throw overflow exceptions; and, render to a null image when the lua script manager Resume process hasnt begun (setting up a render target) but lua scripts run (due to loadstate, for example) 2013-12-30 16:36:15 +00:00
adelikat 213e02ffef Lua - forms.textbox() - add a fixed width option 2013-12-30 14:58:09 +00:00
adelikat dae86e770c Mainform - a round of cleanup 2013-12-29 23:35:42 +00:00
adelikat f122105b42 oops, put Rewinder in Global not GlobalWin 2013-12-27 01:19:38 +00:00
adelikat f090597fbe make MainForm.Rewind.cs into a separate class instead of a partial class of Mainform. Still dependent on the Mainform context so is still a part of the EmuHawk project for now 2013-12-26 23:12:41 +00:00
adelikat 302e71edc3 Rework some input stuff in preparation for moving it to common 2013-12-24 21:37:51 +00:00
adelikat 05e2f67771 Move some tool loading logic from mainform to toolmanager 2013-12-22 23:34:22 +00:00
adelikat 95c619a0b7 Lua Console - a round of code cleanup 2013-12-19 01:17:53 +00:00
adelikat b2b8edb319 Fix removing of registered functions via Lua console 2013-12-19 01:02:50 +00:00
adelikat b604d81d10 Lua Console - refresh things better 2013-12-19 00:54:35 +00:00
pasky1382 ac97e62ed1 Remove registered functions when disabling lua scripts 2013-12-19 00:12:46 +00:00
adelikat 9257cfdc79 Lua textbox - Fix behavior of numeric values when pressing up and down 2013-12-15 04:50:24 +00:00
adelikat 1723f9dc92 Lua forms - make lua textboxes that are set to signed/unsigned/hex types increment/decrement with up/down arrows 2013-12-15 03:41:13 +00:00
adelikat 91063b7ffd Lua forms library - implement forms.dropdown(), forms.checkbox(), and forms.ischecked(). Add support for dropdowns in forms.gettext() (returns the string value of the selected item) 2013-12-15 02:50:50 +00:00
adelikat 1818e6f5fc Lua - forms.textbox() - add multiline parameter 2013-12-02 03:41:29 +00:00
adelikat 9ccc214667 Make an extension method ShowHawkDialog() to use for modal dialog calls that does the Sound Stop/Start methods (and potentially any other EmuHawk specific logic that needs to be done). Use this in the bazillion places we were calling StopSound and StartSound. 2013-11-28 22:39:00 +00:00
adelikat d37f186107 Hex Editor - a bunch of clean up, refactoring, rethinking of stuff, and some slight bug fixes 2013-11-28 20:02:32 +00:00
adelikat b3946082a7 Some code refactoring, mostly in an attempt to pick away at the beast that is Mainform.cs 2013-11-27 23:35:32 +00:00
adelikat 9e521a1f14 Some nitpicky code clean up on lua console, nothing important here 2013-11-27 21:03:48 +00:00
adelikat 788aea970e Lua Console - when removing a script, remove its registered function. Currently however, this behavior will only happen if the script is currently running. If you disable it and then remove it, the functions remain. 2013-11-26 01:21:24 +00:00
adelikat d33d515ae9 Lua Console - don't stop scripts on restart 2013-11-25 23:45:59 +00:00
adelikat 3d48a0b39e Lua Console - fix behavior of Save Changes nag, fix deleting of items 2013-11-25 23:38:10 +00:00
adelikat 5bbed4a58f Fix behavior of Movie Up/Down in tool dialogs 2013-11-25 23:24:26 +00:00
adelikat 92c34c8c2d Refactor Lua Console code to move most of the logic to a custom LuaFile list object. Also fix number of bugs in the process 2013-11-25 21:01:38 +00:00
adelikat 720cf763cd More code refactoring 2013-11-25 02:08:45 +00:00
adelikat 345b628dad Some more misc code cleanup 2013-11-25 00:55:56 +00:00
adelikat 7b244cc87c Lua Console - a round of code cleanup. Some small fixes happened as a result of this cleanup 2013-11-25 00:44:18 +00:00