Skip to content

Hide child code entries in main tree#1926

Closed
zivmaor wants to merge 9 commits intoUnderminersTeam:masterfrom
zivmaor:hideChildren
Closed

Hide child code entries in main tree#1926
zivmaor wants to merge 9 commits intoUnderminersTeam:masterfrom
zivmaor:hideChildren

Conversation

@zivmaor
Copy link
Copy Markdown
Contributor

@zivmaor zivmaor commented Sep 21, 2024

Description

Implements #1609. Adds a setting to the settings menu to control whether the child code entries (entries which have ParentEntry set) are hidden or shown in the main tree.

Visual Changes

Settings before change:
settings_old
Settings after change:
settings_new

Code in main tree before change:
code_old
Code in main tree after change (no more gray child entries):
code_new
Code in main tree after change with setting off (exact same as before change):
code_new_off

Caveats

The are 2 tiny things that need to be adressed before this can be merged:

  • The setting is missing a tooltip - I don't know enough about the data structure to properly describe what the setting does. @VladiStep can you please write it?
  • Default behavior - Currently the setting is off by default, but maybe it should be on by default. I couldn't decide what to choose.

Notes

Resolves #1609.

which filters child code entries from the code list
on top of the normal filtering done by FilteringViewConverter.
The setting has no tooltip as of yet.
also correct accessibility levels in FilteredViewConverter and CodeViewConverter.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 21, 2024

@zivmaor zivmaor changed the title Hide children Hide child code entries in main tree Sep 21, 2024
@Dobby233Liu
Copy link
Copy Markdown
Contributor

Dobby233Liu commented Sep 21, 2024

The setting is missing a tooltip - I don't know enough about the data structure to properly describe what the setting does.

🤔 "Hides code entries corresponding to sub-functions of scripts in GMS2.3 games"
See I can't english

Default behavior

Our main focus is UT/DR, and since in DR Ch1&2 scripts containing multiple subfunctions are not common, making the child code entries mostly noise, I feel it would be fair to hide them by default for now

- Add setting tooltip.
- Make the setting on by default.
@zivmaor
Copy link
Copy Markdown
Contributor Author

zivmaor commented Sep 21, 2024

Done and done
Edit:

See I can't english

It seems neither can I.

@zivmaor zivmaor marked this pull request as ready for review September 21, 2024 14:07
Copy link
Copy Markdown
Contributor

@Miepee Miepee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a GUI screenshot


<Separator Grid.Row="6" Grid.ColumnSpan="4" Margin="10"/>
<CheckBox Grid.Row="6" Grid.Column="0" Margin="3" Content="" IsChecked="{Binding HideChildCodeEntries}"/>
<TextBlock Grid.Row="6" Grid.Column="0" Margin="25 2 2 2" Text="Hide child code entries" ToolTip="Hides code entries corresponding to sub-functions of scripts in GMS2.3 games."/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change it so that the text and/or tooltip mentions that this is for the visible tree-view thingy?

Copy link
Copy Markdown
Contributor Author

@zivmaor zivmaor Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how to call it so users would understand so I called it "the asset list". In the tooltip for "Enable asset order swapping" it's called "the asset tabs" but that seems confusing given that there are no tabs in a tree view and now UTMT has tabs for content.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been resolved?

Changes the code to use SettingsWindow instead of Settings.Instance
to better fit with similar code for other settings.

Note: this should probably be standardized across all settings.
Dobby233Liu added a commit to Dobby233Liu/UndertaleModTool that referenced this pull request Apr 12, 2025
@zivmaor
Copy link
Copy Markdown
Contributor Author

zivmaor commented Nov 9, 2025

This PR has been superseded by #2013.

@zivmaor zivmaor closed this Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to hide child code entries (gray ones)

3 participants