jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.15k stars 169 forks source link

Change Val::px and Val::Percent to no longer be clamped #66

Closed paul-hansen closed 2 years ago

paul-hansen commented 2 years ago

Description

This removes the min and max from the Inspectable implementation for Val::Px and Val:Percent

Reasoning

Being able to enter negative values is extremely valuable for working with UI and this was preventing using the inspector without breaking things if you have negative or out of "normal" bounds values.

It's not desirable to have simply viewing a node in the inspector make changes to the node (Could cause or even prevent bugs when having the node open in the inspector), so we should strive to only enforce the limits that are imposed by Bevy's types unless we have a way to do so only when the user makes a change using in the inspector.

P.S. Thanks again for this plugin, it's been extremely helpful with my latest project. Let me know if you want any changes to this PR etc.