You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Steam.InputGlyphStyle is supposed to be bitfield flags rather than a straight enum. This causes the problem that when a variable is defined as type Steam.InputGlyphStyle, it causes a warning when trying to use multiple styles together, such as Steam.INPUT_GLYPH_STYLE_LIGHT | Steam.INPUT_GLYPH_STYLE_SOLID_ABXY.
To Reproduce
Steps to reproduce the behavior:
Define a variable set as type Steam.InputGlyphStyle. Example: var gstyle : Steam.InputGlyphStyle
Use bitwise OR to use multiple styles together, and assign that value to the variable. gstyle = Steam.INPUT_GLYPH_STYLE_LIGHT | Steam.INPUT_GLYPH_STYLE_SOLID_ABXY
Code editor (I use Visual Studio Code Insiders) will give INT_AS_ENUM_WITHOUT_MATCH and INT_AS_ENUM_WITHOUT_CAST warnings.
Expected behavior
These warnings should not appear.
Screenshots
Desktop (please complete the following information):
OS: Windows 11
Version: 22H2 Build 22621.3155
Version of Godot:
Godot 4.2.1 .NET
Version of GodotSteam:
GDExtension 4.6
Additional context
Unfortunately, I don't know if GDScript is structured such that this problem even can be fixed. From what I've seen, it uses a different syntax for bitflags than it does for enums, and I can't tell if said syntax is even compatible with being used in code in the first place; the docs seem to imply using bitflags only as hints for the Inspector.
Thankfully, this isn't a breaking error. It just gives warnings that can be suppressed with @ignore_warning and in-game functionality will be as expected (that is, the styles combine without issue when you request a glyph path from Steam) even if you don't do so. Also, not explicitly casting the variable will avoid these warnings as well.
The text was updated successfully, but these errors were encountered:
Formedras
changed the title
Steam.InputGlyphStyle issues as enum
Steam.InputGlyphStyle warnings when combining flags
Feb 29, 2024
Hey there! Interesting. I know in Godot 3.x we cannot set a bitfield cast:
VARIANT_ENUM_CAST(Steam::InputGlyphStyle);
But in 4.x we can:
VARIANT_BITFIELD_CAST(Steam::InputGlyphStyle);
Yeah, I'm not sure this is fixable on our end but I will investigate it more and see what I can figure out! Thank you for submitting this issue. If it is not something that can be fixed, we do need to mention this in our documentation.
Describe the bug
Steam.InputGlyphStyle is supposed to be bitfield flags rather than a straight enum. This causes the problem that when a variable is defined as type Steam.InputGlyphStyle, it causes a warning when trying to use multiple styles together, such as
Steam.INPUT_GLYPH_STYLE_LIGHT | Steam.INPUT_GLYPH_STYLE_SOLID_ABXY
.To Reproduce
Steps to reproduce the behavior:
var gstyle : Steam.InputGlyphStyle
gstyle = Steam.INPUT_GLYPH_STYLE_LIGHT | Steam.INPUT_GLYPH_STYLE_SOLID_ABXY
Expected behavior
These warnings should not appear.
Screenshots
Desktop (please complete the following information):
Version of Godot:
Godot 4.2.1 .NET
Version of GodotSteam:
GDExtension 4.6
Additional context
Unfortunately, I don't know if GDScript is structured such that this problem even can be fixed. From what I've seen, it uses a different syntax for bitflags than it does for enums, and I can't tell if said syntax is even compatible with being used in code in the first place; the docs seem to imply using bitflags only as hints for the Inspector.
Thankfully, this isn't a breaking error. It just gives warnings that can be suppressed with
@ignore_warning
and in-game functionality will be as expected (that is, the styles combine without issue when you request a glyph path from Steam) even if you don't do so. Also, not explicitly casting the variable will avoid these warnings as well.The text was updated successfully, but these errors were encountered: