blazium-engine / blazium

Blazium Engine – Multi-platform 2D and 3D game engine
https://blazium.app/
MIT License
149 stars 19 forks source link

Many ColorPicker fixes. #47

Closed WhalesState closed 4 days ago

WhalesState commented 4 days ago

Changes:

  1. Makes RAW sliders colored same as RGB mode.
  2. Fix RAW mode maximum values, from 100 to 1.0.
  3. Allow RGB and RAW modes to have greater values for over bright.
  4. Changes RAW step value to 1.0 / 255.0, to match the RGB mode values when changed.
  5. Fix pressing the sample left side changes the color to black when old color is not displayed.
  6. Remove an empty VBoxContainer called vbl.
  7. Remove an extra VBoxContainer used as child of real_vbox, and adding it's children to the real_vbox directly.
  8. Prevent OKHSL mode from changing the picker shape. The color mode is for sliders only, no need to override the shape.
  9. Fix over bright indicator position.
  10. Fix conversion between RAW and RGB modes when color is over bright.
  11. Fix pressing the ColorPicker's sample left half side changes the color to black when old color is not displayed.
  12. Fix switching to RAW mode and then to RGB will change slider max value.
  13. Expose is_displaying_old_color(), set_display_old_color() and set_old_color() to gdscript.
WhalesState commented 4 days ago

This shows the changes.

https://github.com/user-attachments/assets/6cc04f7c-70b8-4368-9c50-8135b2eb846d

WhalesState commented 4 days ago

I was not not aware of over half of these issues, and I use color pickers with some frequency. Does anyone know if additional changes are required for the functions exposed to GDScript to also be exposed to C#?

Using ClassDB::bind_method will expose it for all scripting languages.