New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Menus #13810
Draft
Jade-Harleyy
wants to merge
15
commits into
FakeFishGames:master
Choose a base branch
from
Jade-Harleyy:debugmenu
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Debug Menus #13810
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Entity explorers - Entity inspector
- Characters can now be selected. - Contained items only appear in the explorer.
- Rename DebugUI -> DebugMenus - GUI inspector mode & explorers - UI cleanup - Code cleanup - Add all entities to the general entity explorer - Fix entity inspector mode character detection (again) - Add submarine detection to the entity inspector
- Entity inspector tooltip creation optimization - GUI debug overlay also for DebugDraw mode
- Allow opening an editor for any entity, even if its blank. - Submarine infos support in editors - Fix GUI update order
- Check for permissions. - Improved detection of wires under cursor. - Code organization. - Open new GUI explorer windows by clicking on an entry. - Item spawner.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds entity lists and inspectors for easier debugging and mod-making.
In addition to what's layed out below, I also plan to add more features such as an item spawner window and individual toggles for certain debug overlays.
Console Commands
debugmenu
: Opens an entity explorer window.close
|closeall
: Closes all open windows, and disables the inspector.entities
|entityexplorer
: Opens an entity explorer window.gui
|guiexplorer
|guiheirarchy
: Opens a GUI explorer window.spawnitems
|spawnitem
|itemspawner
: Opens the entity spawner window.inspect
: Enables the entity inspector.entities
: Enables the entity inspector.gui
: Enables the GUI inspector.Windows
All windows can be dragged, and closed with either their respective Close button, or with the
close
|closeall
commands.Entity Explorers
A list of every loaded entity if opened with the console, or a list of entities under the cursor if opened with the entity inspector.
On the left of an entry is its name (if available), its class, and its location. On the right is its ID, and a button to destroy the entity.
Entries can be clicked to open an entity editor window.
Entity Editors
A list of serializable entity editors; same as what would be seen in the submarine and character editors.
GUI Explorers
A heirarchy of GUI elements, with parents above the focused element, and children below.
Opening one of these windows from the console focuses
Screen.Selected.Frame
, while opening one from the GUI inspector focusesGUI.MouseOn
.On the left of an entry is its class, and its style. On the right is its update order, a visibility toggle, and a button to orphan the element. Elements whose parents are the GUI canvas cannot be orphaned.
Hovering over an entry will outline its rect, holding Ctrl will outline each element in its parent heirarchy, and holding Alt will fill in the outlines at half opacity.
Clicking on an entry will open a new GUI Explorer window focused on that element.
Entity Spawner
A categorized list of entities, same as in the Submarine Editor but with only items.
The quality of selected items can be changed with the buttons at the bottom of the window.
Left-clicking an entity in the list will add one to the cursor, while right-clicking will remove one.
Selecting/deselecting items is split based on the selected quality. For example, if "Good" is selected, only "Good" quality items will be added/removed.
When the cursor is off of the window, left clicking in the world will spawn the entities at that location, while clicking on the controlled character's inventory slots will spawn them in the character's inventory.
Holding shift while clicking will preserve the entities in the cursor, allowing them to be spawned multiple times without having to be reselected.
Similar to the inspector modes, clicking the right mouse button or pressing escape outside the window will clear the selected items.
All inspectors override this mode.
Inspector Modes
Regardless of its current mode, clicking the right mouse button or pressing escape will disable the inspector.
Entities
Displays the cursor's current position in the world, and a list of entities under the cursor.
Each entry on the list displays the entity's name (if applicable), and its class.
Clicking the left mouse button will create an Entity Explorer window with a list of each entity under the cursor, as well as any items contained in selected items' or characters' inventories (if applicable).
GUI
Displays the cursor's current position on the screen, and the selected GUI element's class and style.
Hovering over an element will outline its rect, holding Ctrl will outline each element in its parent heirarchy, and holding Alt will fill in the outlines at half opacity.
Clicking the left mouse button will create a GUI Explorer window focused on the currently selected element.
New Content
GUI Styles
English Localization
Media
GUI Explorer
Entity Inspector
Entity Explorer and Entity Editors
Item Spawner