4ian / GDevelop

:video_game: Open-source, cross-platform game engine designed to be used by everyone.
https://gdevelop.io
Other
6.62k stars 724 forks source link

Add Events Sheet Indent Scale preference. #6653

Closed cyraid closed 5 hours ago

cyraid commented 5 days ago

Description

Add a preference Indent Scale in the preferences dialog that controls the amount of scale (multiplying indent width) for the Events Sheet Control.

Background

My friend asked me if I could add an indent level setting as an extension, and after viewing the code it was not possible (as the indent is controlled with a hardcoded value). I thought a simple slider would fit the simplicity model of GDevelop. What do you guys think?

Screenshots

In the Events Sheet

This screenshot is using 3x indent scale.

IndentScaleEditor

In the Preferences Dialog

IndentScalePref

cyraid commented 1 day ago

@4ian My friend would sure love to use this as I did it for him, but he wants it officially in the editor. Thoughts? :)

4ian commented 19 hours ago

I think that's an interesting setting :) Could you replace it with maybe a dropdown (SelectField)? We've never used the field you chose in material ui and I think for consistency with the rest of the app it might be just simpler to have something like:

Indent scale in Events Sheet : [ 2x ⌄]

cyraid commented 8 hours ago

@4ian Hi Florian! I'm glad you think it's interesting as well! I'm not sure if you wanted the combo box on the right of the label, seeing as you wrote it like <label>: [ 2x v ] and the square brackets being the box. Let me know if you'd like me to change it or keep like the screenshot below.

New Screenshot

image

ClementPasteau commented 5 hours ago

Closing this PR in favor of #6671 - had to do a few fixes in the PR regarding typing and formatting and couldn't push on your master branch :)