@@ -878,7 +878,7 @@ struct Example:
878
878
for (int i = 0 ; i < linkCount; ++i) ImGui::Text (" Link (%p)" , selectedLinks[i].AsPointer ());
879
879
ImGui::Unindent ();
880
880
881
- if (ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Z) ))
881
+ if (ImGui::IsKeyPressed (ImGuiKey_Z))
882
882
for (auto & link : m_Links)
883
883
ed::Flow (link .ID );
884
884
@@ -1108,11 +1108,7 @@ struct Example:
1108
1108
1109
1109
ed::PushStyleVar (ed::StyleVar_PinArrowSize, 10 .0f );
1110
1110
ed::PushStyleVar (ed::StyleVar_PinArrowWidth, 10 .0f );
1111
- #if IMGUI_VERSION_NUM > 18101
1112
1111
ed::PushStyleVar (ed::StyleVar_PinCorners, ImDrawFlags_RoundCornersBottom);
1113
- #else
1114
- ed::PushStyleVar (ed::StyleVar_PinCorners, 12 );
1115
- #endif
1116
1112
ed::BeginPin (pin.ID , ed::PinKind::Input);
1117
1113
ed::PinPivotRect (inputsRect.GetTL (), inputsRect.GetBR ());
1118
1114
ed::PinRect (inputsRect.GetTL (), inputsRect.GetBR ());
@@ -1154,11 +1150,7 @@ struct Example:
1154
1150
ImGui::Spring (1 , 0 );
1155
1151
outputsRect = ImGui_GetItemRect ();
1156
1152
1157
- #if IMGUI_VERSION_NUM > 18101
1158
1153
ed::PushStyleVar (ed::StyleVar_PinCorners, ImDrawFlags_RoundCornersTop);
1159
- #else
1160
- ed::PushStyleVar (ed::StyleVar_PinCorners, 3 );
1161
- #endif
1162
1154
ed::BeginPin (pin.ID , ed::PinKind::Output);
1163
1155
ed::PinPivotRect (outputsRect.GetTL (), outputsRect.GetBR ());
1164
1156
ed::PinRect (outputsRect.GetTL (), outputsRect.GetBR ());
@@ -1193,13 +1185,8 @@ struct Example:
1193
1185
// drawList->PathStroke(col, true, thickness);
1194
1186
// };
1195
1187
1196
- #if IMGUI_VERSION_NUM > 18101
1197
1188
const auto topRoundCornersFlags = ImDrawFlags_RoundCornersTop;
1198
1189
const auto bottomRoundCornersFlags = ImDrawFlags_RoundCornersBottom;
1199
- #else
1200
- const auto topRoundCornersFlags = 1 | 2 ;
1201
- const auto bottomRoundCornersFlags = 4 | 8 ;
1202
- #endif
1203
1190
1204
1191
drawList->AddRectFilled (inputsRect.GetTL () + ImVec2 (0 , 1 ), inputsRect.GetBR (),
1205
1192
IM_COL32 ((int )(255 * pinBackground.x ), (int )(255 * pinBackground.y ), (int )(255 * pinBackground.z ), inputAlpha), 4 .0f , bottomRoundCornersFlags);
@@ -1263,11 +1250,7 @@ struct Example:
1263
1250
inputsRect.Min .y -= padding;
1264
1251
inputsRect.Max .y -= padding;
1265
1252
1266
- #if IMGUI_VERSION_NUM > 18101
1267
1253
const auto allRoundCornersFlags = ImDrawFlags_RoundCornersAll;
1268
- #else
1269
- const auto allRoundCornersFlags = 15 ;
1270
- #endif
1271
1254
// ed::PushStyleVar(ed::StyleVar_PinArrowSize, 10.0f);
1272
1255
// ed::PushStyleVar(ed::StyleVar_PinArrowWidth, 10.0f);
1273
1256
ed::PushStyleVar (ed::StyleVar_PinCorners, allRoundCornersFlags);
@@ -1324,13 +1307,8 @@ struct Example:
1324
1307
outputsRect.Min .y += padding;
1325
1308
outputsRect.Max .y += padding;
1326
1309
1327
- #if IMGUI_VERSION_NUM > 18101
1328
1310
const auto allRoundCornersFlags = ImDrawFlags_RoundCornersAll;
1329
1311
const auto topRoundCornersFlags = ImDrawFlags_RoundCornersTop;
1330
- #else
1331
- const auto allRoundCornersFlags = 15 ;
1332
- const auto topRoundCornersFlags = 3 ;
1333
- #endif
1334
1312
1335
1313
ed::PushStyleVar (ed::StyleVar_PinCorners, topRoundCornersFlags);
1336
1314
ed::BeginPin (pin.ID , ed::PinKind::Output);
0 commit comments