Integrate fix into function generation script

This commit is contained in:
Not-Nik 2022-03-25 16:33:29 +01:00
parent d098e025ad
commit 533cd5a0ad
No known key found for this signature in database
GPG Key ID: 08BB71E672DB3BFD
2 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,9 @@ def fix_enums(arg_name, arg_type, func_name):
if arg_name == "key":
arg_type = "KeyboardKey"
elif arg_name == "button":
if "Gamepad" in func_name:
arg_type = "GamepadButton"
else:
arg_type = "MouseButton"
elif arg_name == "mode" and func_name == "SetCameraMode":
arg_type = "CameraMode"

View File

@ -9,6 +9,7 @@ const Camera3D = rl.Camera3D;
const CameraMode = rl.CameraMode;
const Color = rl.Color;
const Font = rl.Font;
const GamepadButton = rl.GamepadButton;
const Gestures = rl.Gestures;
const GlyphInfo = rl.GlyphInfo;
const Image = rl.Image;
@ -22,7 +23,6 @@ const Mesh = rl.Mesh;
const Model = rl.Model;
const ModelAnimation = rl.ModelAnimation;
const MouseButton = rl.MouseButton;
const GamepadButton = rl.GamepadButton;
const Music = rl.Music;
const NPatchInfo = rl.NPatchInfo;
const Quaternion = rl.Quaternion;