Skip to content
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

Hide child code entries in main tree #1926

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

zivmaor
Copy link
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.
Copy link

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
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
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
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

UndertaleModTool/Converters/FilteredViewConverter.cs Outdated Show resolved Hide resolved
@@ -60,41 +61,44 @@
<CheckBox Grid.Row="5" Grid.Column="2" Margin="3" Content="" IsChecked="{Binding ShowDebuggerOption}"/>
<TextBlock Grid.Row="5" Grid.Column="2" Margin="25 2 2 2" Text="Show &quot;Run game under GMS debugger&quot; file option" ToolTip="Whether to show the option in the &quot;File&quot; menu. Disabled by default."/>

<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
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
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
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.
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