Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
670 stars 72 forks source link

CogitoUIButton crashes project when using disabling button #164

Closed DaQueenGames closed 2 months ago

DaQueenGames commented 2 months ago

Cogito and Godot Engine Version: Godot 4.2.stable Cogito beta 202403.25

Description: When making a cogitoUIbutton disabled, Invalid get index '3' (on base: 'Dictionary'). error

Reproduction steps: Make button disabled, run project error appears at "var target = styleboxes[current_state] as StyleBoxFlat"

fixed with adding lines: styleboxes[BaseButton.DRAW_DISABLED] = get_theme_stylebox('disabled').duplicate() add_theme_stylebox_override('disabled', tween_stylebox)

Expected behavior: Project not to crash

Phazorknight commented 2 months ago

Hey, thanks for flagging this!

Could you give https://github.com/Phazorknight/Cogito/commit/195b5cc12166d34d57daead4ee6d5e49d5102cc5 a try and see if that works better? I've implemented the lines you added.

DaQueenGames commented 2 months ago

Yes it works on my end. Also, I am using your project for a game I am making (Producer Tycoon), and I have some people that play it on steamdeck. So far they haven't had any major issues with it.

Phazorknight commented 2 months ago

@DaQueenGames awesome, that's great to hear. Closing this issue.

If you feel up for showing off your game, feel free to post in the Discussions tab! Would love to see it.