Add button next to script combo-box to open file to that script.

Revert the behavior of Open Map Scripts button.
This commit is contained in:
BigBahss
2020-12-02 03:39:08 -05:00
parent 9da465fe53
commit afc0c0c501
8 changed files with 32 additions and 9 deletions

View File

@@ -225,11 +225,17 @@ Respawn NPC
Open Map Scripts
----------------
Clicking the ``Open Map Scripts`` button |open-map-scripts-button| will open the map's scripts file in your default text editor. If nothing happens when this button is clicked, you may need to associate a text editor with the `.inc` file extension (or `.pory` if you're using Porycript). `Alternatively`, you may specify a preferred text editor command in *Options -> Edit Preferences*. By specifying a text editor like this you can allow Porymap to open the scripts file directly to the script of the currently selected event.
Clicking the ``Open Map Scripts`` button |open-map-scripts-button| will open the map's scripts file in your default text editor. If nothing happens when this button is clicked, you may need to associate a text editor with the `.inc` file extension (or `.pory` if you're using Porycript).
Additionally, if you specify a ``Goto Line Command`` in *Options -> Edit Preferences* then a tool-button will appear next to the `Script` combo-box for selected events. Clicking this button will open the map's scripts file directly to the cooresponding script (if the script can be found in that file).
|go-to-script-button|
.. |open-map-scripts-button|
image:: images/editing-map-events/open-map-scripts-button.png
.. |go-to-script-button|
image:: images/editing-map-events/go-to-script-button.png
Tool Buttons
------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -31,7 +31,7 @@ determined by this file.
``monitor_files``, 1, global, yes, Whether porymap will monitor changes to project files
``region_map_dimensions``, 32x20, global, yes, The dimensions of the region map tilemap
``theme``, default, global, yes, The color theme for porymap windows and widgets
``text_editor_goto_line``, , global, yes, Optional command that will be executed when clicking ``Open Map Scripts``.
``text_editor_goto_line``, , global, yes, The command that will be executed when clicking the tool-button next the ``Script`` combo-box.
``text_editor_open_directory``, , global, yes, The command that will be executed when clicking ``Open Project in Text Editor``.
``base_game_version``, , project, no, The base pret repo for this project
``use_encounter_json``, 1, project, yes, Enables wild encounter table editing