u/var: Add u16 var kind

This commit is contained in:
Mateo de Mayo 2021-12-06 08:28:19 -03:00
parent 471ca9530b
commit fa88ce5f3f
2 changed files with 3 additions and 0 deletions
src/xrt
auxiliary/util
state_trackers/gui

View file

@ -98,6 +98,7 @@ enum u_var_kind
U_VAR_KIND_RGB_U8,
U_VAR_KIND_RGB_F32,
U_VAR_KIND_U8,
U_VAR_KIND_U16,
U_VAR_KIND_U64,
U_VAR_KIND_I32,
U_VAR_KIND_F32,
@ -204,6 +205,7 @@ u_var_force_on(void);
ADD_FUNC(rgb_u8, struct xrt_colour_rgb_u8, RGB_U8) \
ADD_FUNC(rgb_f32, struct xrt_colour_rgb_f32, RGB_F32) \
ADD_FUNC(u8, uint8_t, U8) \
ADD_FUNC(u16, uint16_t, U16) \
ADD_FUNC(u64, uint64_t, U64) \
ADD_FUNC(i32, int32_t, I32) \
ADD_FUNC(f32, float, F32) \

View file

@ -291,6 +291,7 @@ on_elem(struct u_var_info *info, void *priv)
break;
}
case U_VAR_KIND_U8: igDragScalar(name, ImGuiDataType_U8, ptr, drag_speed, NULL, NULL, NULL, power); break;
case U_VAR_KIND_U16: igDragScalar(name, ImGuiDataType_U16, ptr, drag_speed, NULL, NULL, NULL, power); break;
case U_VAR_KIND_U64: igDragScalar(name, ImGuiDataType_U64, ptr, drag_speed, NULL, NULL, NULL, power); break;
case U_VAR_KIND_I32: igInputInt(name, (int *)ptr, 1, 10, i_flags); break;
case U_VAR_KIND_VEC3_I32: igInputInt3(name, (int *)ptr, i_flags); break;