@@ -3367,7 +3367,7 @@ void ImGui::PopStyleColor(int count)
3367
3367
}
3368
3368
}
3369
3369
3370
- static const ImGuiDataVarInfo GStyleVarInfo [] =
3370
+ static const ImGuiDataVarInfo GStyleVarsInfo [] =
3371
3371
{
3372
3372
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, Alpha) }, // ImGuiStyleVar_Alpha
3373
3373
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, DisabledAlpha) }, // ImGuiStyleVar_DisabledAlpha
@@ -3407,15 +3407,15 @@ static const ImGuiDataVarInfo GStyleVarInfo[] =
3407
3407
const ImGuiDataVarInfo* ImGui::GetStyleVarInfo(ImGuiStyleVar idx)
3408
3408
{
3409
3409
IM_ASSERT(idx >= 0 && idx < ImGuiStyleVar_COUNT);
3410
- IM_STATIC_ASSERT(IM_ARRAYSIZE(GStyleVarInfo ) == ImGuiStyleVar_COUNT);
3411
- return &GStyleVarInfo [idx];
3410
+ IM_STATIC_ASSERT(IM_ARRAYSIZE(GStyleVarsInfo ) == ImGuiStyleVar_COUNT);
3411
+ return &GStyleVarsInfo [idx];
3412
3412
}
3413
3413
3414
3414
void ImGui::PushStyleVar(ImGuiStyleVar idx, float val)
3415
3415
{
3416
3416
ImGuiContext& g = *GImGui;
3417
3417
const ImGuiDataVarInfo* var_info = GetStyleVarInfo(idx);
3418
- if (var_info->Type != ImGuiDataType_Float || var_info->Count != 1)
3418
+ if (var_info->DataType != ImGuiDataType_Float || var_info->Count != 1)
3419
3419
{
3420
3420
IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!");
3421
3421
return;
@@ -3429,7 +3429,7 @@ void ImGui::PushStyleVarX(ImGuiStyleVar idx, float val_x)
3429
3429
{
3430
3430
ImGuiContext& g = *GImGui;
3431
3431
const ImGuiDataVarInfo* var_info = GetStyleVarInfo(idx);
3432
- if (var_info->Type != ImGuiDataType_Float || var_info->Count != 2)
3432
+ if (var_info->DataType != ImGuiDataType_Float || var_info->Count != 2)
3433
3433
{
3434
3434
IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!");
3435
3435
return;
@@ -3443,7 +3443,7 @@ void ImGui::PushStyleVarY(ImGuiStyleVar idx, float val_y)
3443
3443
{
3444
3444
ImGuiContext& g = *GImGui;
3445
3445
const ImGuiDataVarInfo* var_info = GetStyleVarInfo(idx);
3446
- if (var_info->Type != ImGuiDataType_Float || var_info->Count != 2)
3446
+ if (var_info->DataType != ImGuiDataType_Float || var_info->Count != 2)
3447
3447
{
3448
3448
IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!");
3449
3449
return;
@@ -3457,7 +3457,7 @@ void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
3457
3457
{
3458
3458
ImGuiContext& g = *GImGui;
3459
3459
const ImGuiDataVarInfo* var_info = GetStyleVarInfo(idx);
3460
- if (var_info->Type != ImGuiDataType_Float || var_info->Count != 2)
3460
+ if (var_info->DataType != ImGuiDataType_Float || var_info->Count != 2)
3461
3461
{
3462
3462
IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!");
3463
3463
return;
@@ -3481,8 +3481,8 @@ void ImGui::PopStyleVar(int count)
3481
3481
ImGuiStyleMod& backup = g.StyleVarStack.back();
3482
3482
const ImGuiDataVarInfo* info = GetStyleVarInfo(backup.VarIdx);
3483
3483
void* data = info->GetVarPtr(&g.Style);
3484
- if (info->Type == ImGuiDataType_Float && info->Count == 1) { ((float*)data)[0] = backup.BackupFloat[0]; }
3485
- else if (info->Type == ImGuiDataType_Float && info->Count == 2) { ((float*)data)[0] = backup.BackupFloat[0]; ((float*)data)[1] = backup.BackupFloat[1]; }
3484
+ if (info->DataType == ImGuiDataType_Float && info->Count == 1) { ((float*)data)[0] = backup.BackupFloat[0]; }
3485
+ else if (info->DataType == ImGuiDataType_Float && info->Count == 2) { ((float*)data)[0] = backup.BackupFloat[0]; ((float*)data)[1] = backup.BackupFloat[1]; }
3486
3486
g.StyleVarStack.pop_back();
3487
3487
count--;
3488
3488
}
0 commit comments