I wouldn’t expect to have to do this in order to bind variables. I should be able to bind to a boolean, float, enum, FText, FString, int32, uint32 and documentation should clearly state how to do it.
I shouldn’t have to set the checkbox state in the above code but do so just to make sure that the UI and I are on the same page. If my variable is TRUE, I’m making sure that the checkbox state is also TRUE, meaning CHECKED (or as the case may be).
The point is that Slate CheckBox can be in one of the THREE states: checked, unchecked and undetermined. The last one is used when you, for example, select multiple actors in the scene and they have different bHidden values to be displayed in property panel. Bool can only express two values: 0 and 1, therefore, its not sufficient for checkboxes.
I’m not sure if thats going to help you since I cant see what you’re trying to achieve, but maybe it would be a better idea to create a function that would return value of given checkbox as bool, like this:
@szyszek, I can understand that particular use-case of the checkbox, but for me it is a UI control that the user interacts with indicating if they want a particular feature/option or not. It is either yes or no, true or false.
@Guronzor, I have a UCheckbox as part of a UUserWidget, and I expose the underlying data value using the UPROPERTY() mentioned above. Then in the BP Editor I set the checkbox Appearance::Bind to the UPROPERTY member: