Added template ImGui::Checkbox function; few minor updates to
Egor Yusov
3 years ago
55 | 55 |
};
|
56 | 56 |
|
57 | 57 |
}
|
|
58 |
|
|
59 |
namespace ImGui
|
|
60 |
{
|
|
61 |
|
|
62 |
template<typename T>
|
|
63 |
inline bool Checkbox(const char* label, T* v)
|
|
64 |
{
|
|
65 |
bool b = *v != 0;
|
|
66 |
auto pressed = Checkbox(label, &b);
|
|
67 |
if (pressed)
|
|
68 |
*v = b ? 1 : 0;
|
|
69 |
return pressed;
|
|
70 |
}
|
|
71 |
|
|
72 |
}
|
381 | 381 |
else if(io.KeyAlt || io.KeySuper) { rotationVector = Diligent::float3(0, 0, 1); }
|
382 | 382 |
|
383 | 383 |
Diligent::Quaternion qtStep = {0, 0, 0, 1};
|
384 | |
if(!delta.x && !delta.y)
|
|
384 |
if(delta == Diligent::float2(0,0))
|
385 | 385 |
{
|
386 | 386 |
return;
|
387 | 387 |
}
|
|
402 | 402 |
vecFromPos(b);
|
403 | 403 |
|
404 | 404 |
auto axis = cross(a, b);
|
|
405 |
if(axis == Diligent::float3(0,0,0))
|
|
406 |
return;
|
405 | 407 |
axis = normalize(axis);
|
406 | 408 |
|
407 | 409 |
auto AdotB = dot(a, b);
|