Skip to content

Commit

Permalink
update ImGui to 1.90.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Apr 24, 2024
1 parent 7ba271c commit ad38b68
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion imgui
Submodule imgui updated 209 files
11 changes: 10 additions & 1 deletion src/bsp/Bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@ bool Bsp::downscale_texture(int textureId, int maxDim) {
return false;
}

downscale_texture(textureId, newWidth, newHeight);
return downscale_texture(textureId, newWidth, newHeight);
}

void Bsp::downscale_invalid_textures() {
Expand Down Expand Up @@ -3543,6 +3543,15 @@ bool Bsp::validate() {
isValid = false;
}
}

if (nodes[i].nMins[0] > nodes[i].nMaxs[0] ||
nodes[i].nMins[1] > nodes[i].nMaxs[1] ||
nodes[i].nMins[2] > nodes[i].nMaxs[2]) {
logf("Backwards mins/maxs in node %d. Mins: (%d, %d, %d) Maxs: (%d %d %d)\n", i,
(int)nodes[i].nMins[0], (int)nodes[i].nMins[1], (int)nodes[i].nMins[2],
(int)nodes[i].nMaxs[0], (int)nodes[i].nMaxs[1], (int)nodes[i].nMaxs[2]);
isValid = false;
}
}
for (int i = 0; i < planeCount; i++) {
BSPPLANE& plane = planes[i];
Expand Down
15 changes: 5 additions & 10 deletions src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1840,13 +1840,7 @@ void Gui::drawKeyvalueEditor_SmartEditTab(Entity* ent) {

string newVal = data->Buf;
if (newVal.empty()) {
if (inputData->defaultValue.length()) {
ent->setOrAddKeyvalue(inputData->key, inputData->defaultValue);
}
else {
ent->removeKeyvalue(inputData->key);
}

ent->removeKeyvalue(inputData->key);
}
else {
ent->setOrAddKeyvalue(inputData->key, newVal);
Expand Down Expand Up @@ -3283,7 +3277,8 @@ void Gui::drawEntityReport() {
static vector<int> visibleEnts;
static vector<bool> selectedItems;

const ImGuiKeyModFlags expected_key_mod_flags = ImGui::GetMergedKeyModFlags();
ImGuiIO& io = ImGui::GetIO();
const ImGuiModFlags expected_key_mod_flags = io.KeyMods;

int footerHeight = ImGui::GetFrameHeightWithSpacing() * 5 + 16;
ImGui::BeginChild("entlist", ImVec2(0, -footerHeight));
Expand Down Expand Up @@ -3371,11 +3366,11 @@ void Gui::drawEntityReport() {
string cname = ent->keyvalues["classname"];

if (ImGui::Selectable((cname + "##ent" + to_string(i)).c_str(), selectedItems[i], ImGuiSelectableFlags_AllowDoubleClick)) {
if (expected_key_mod_flags & ImGuiKeyModFlags_Ctrl) {
if (expected_key_mod_flags & ImGuiModFlags_Ctrl) {
selectedItems[i] = !selectedItems[i];
lastSelect = i;
}
else if (expected_key_mod_flags & ImGuiKeyModFlags_Shift) {
else if (expected_key_mod_flags & ImGuiModFlags_Shift) {
if (lastSelect >= 0) {
int begin = i > lastSelect ? lastSelect : i;
int end = i > lastSelect ? i : lastSelect;
Expand Down

0 comments on commit ad38b68

Please sign in to comment.