-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad code gen for SlideInt2(), etc. #462
Comments
The generated code is actually correct, although I agree it is a little confusing. You can use multiple ints because the parameter is a static int[] GridColor = [255, 255, 255];
void Render()
{
// ...
ImGui.SliderInt3("Grid color", ref GridColor[0], 0, 255);
} This works correctly in this example, given that the array holds at least 3 items. |
Alright, thanks for pointing that out. It doesn't really sound very "kosher", though. It should probably accept a span or an array rather than a ref to the first element of the array. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code generation seems to have failed for the methods that are supposed to accept multiple ints, ie.
bool DragInt2(string label, ref int v)
bool DragInt3(string label, ref int v)
bool DragInt4(string label, ref int v)
bool SliderInt2(string label, ref int v, int v_min, int v_max)
bool SliderInt3(string label, ref int v, int v_min, int v_max)
bool SliderInt4(string label, ref int v, int v_min, int v_max)
etc.
I'm assuming they're supposed to accept multiple ints, not a single one, unless I've gravely misunderstood something.
The text was updated successfully, but these errors were encountered: