Skip to content

Commit

Permalink
[BREAKING CHANGE] Fixes for opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
user-grinch committed Nov 6, 2023
1 parent b992dce commit acf5622
Show file tree
Hide file tree
Showing 3 changed files with 2,260 additions and 17 deletions.
22 changes: 8 additions & 14 deletions src/opcodemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,7 @@ static RTN_TYPE RUNTIME_API ImGuiCheckbox(RUNTIME_CONTEXT ctx) {
};

bool clicked = data->GetData(buf, 0, state);
if (clicked) {
wSetIntParam(ctx, data->GetData(buf, 1, state));
} else {
wSetIntParam(ctx, state);
}

wUpdateCompareFlag(ctx, clicked ? data->GetData(buf, 1, state) : state);
return RTN_CONTINUE;
}

Expand Down Expand Up @@ -552,7 +547,7 @@ static RTN_TYPE RUNTIME_API ImGuiBeginMainMenuBar(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, state);
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand All @@ -577,7 +572,7 @@ static RTN_TYPE RUNTIME_API ImGuiMenuItem(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, state);
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand All @@ -592,7 +587,7 @@ static RTN_TYPE RUNTIME_API ImGuiSelectable(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, state);
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand Down Expand Up @@ -648,7 +643,7 @@ static RTN_TYPE RUNTIME_API ImGuiCollapsingHeader(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, state);
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand Down Expand Up @@ -926,7 +921,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemActive(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, ImGui::IsItemActive());
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand All @@ -939,7 +934,6 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemHovered(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, ImGui::IsItemHovered());
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, 0));
return RTN_CONTINUE;
}
Expand All @@ -953,7 +947,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemClicked(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, ImGui::IsItemClicked());
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand All @@ -966,7 +960,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemFocused(RUNTIME_CONTEXT ctx) {
data->SetData(buf, 0, ImGui::IsItemFocused());
};

wSetIntParam(ctx, data->GetData(buf, 0, false));
wUpdateCompareFlag(ctx, data->GetData(buf, 0, false));
return RTN_CONTINUE;
}

Expand Down
Loading

0 comments on commit acf5622

Please sign in to comment.