Updated to ImGui 1.87 to cleanup UI code

This commit is contained in:
AlexandreRouma
2022-02-14 23:33:52 +01:00
parent 04e54a2d57
commit 51c940acd4
47 changed files with 2018 additions and 1069 deletions

View File

@ -3,7 +3,6 @@
#include <gui/gui.h>
#include <sched_task.h>
#include <map>
#include <keybinds.h>
SDRPP_MOD_INFO{
/* Name: */ "scheduler",
@ -101,8 +100,7 @@ private:
if (ImGui::Selectable((name + "##_freq_mgr_bkm_name_" + _this->name).c_str(), &bm.selected, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_SelectOnClick)) {
// if shift or control isn't pressed, deselect all others
if (!ImGui::IsKeyDown(KB_KEY_LSHIFT) && !ImGui::IsKeyDown(KB_KEY_RSHIFT) &&
!ImGui::IsKeyDown(KB_KEY_LCTRL) && !ImGui::IsKeyDown(KB_KEY_RCTRL)) {
if (!ImGui::GetIO().KeyShift && !ImGui::GetIO().KeyCtrl) {
for (auto& [_name, _bm] : _this->tasks) {
if (name == _name) { continue; }
_bm.selected = false;

View File

@ -3,7 +3,6 @@
#include <imgui.h>
#include <gui/style.h>
#include <sched_action.h>
#include <keybinds.h>
class Task {
public:
@ -78,8 +77,7 @@ public:
if (ImGui::Selectable((act->getName() + "##scheduler_task_actions_entry").c_str(), &act->selected, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_SelectOnClick)) {
// if shift or control isn't pressed, deselect all others
if (!ImGui::IsKeyDown(KB_KEY_LSHIFT) && !ImGui::IsKeyDown(KB_KEY_RSHIFT) &&
!ImGui::IsKeyDown(KB_KEY_LCTRL) && !ImGui::IsKeyDown(KB_KEY_RCTRL)) {
if (!ImGui::GetIO().KeyShift && !ImGui::GetIO().KeyCtrl) {
int _id = 0;
for (auto& _act : actions) {
if (_id == id) { continue; }