Finish drag and drop mod installation, disable mod refresh button and code mod toggle when game starts

This commit is contained in:
Mr-Wiseguy
2025-04-06 03:57:50 -04:00
parent 75c3669961
commit 11c84659cf
14 changed files with 474 additions and 144 deletions
+6
View File
@@ -1,5 +1,6 @@
#include "RmlUi/Core/StringUtilities.h"
#include "recomp_ui.h"
#include "ui_element.h"
#include "../core/ui_context.h"
@@ -134,6 +135,7 @@ void Element::handle_event(const Event& event) {
}
void Element::ProcessEvent(Rml::Event &event) {
ContextId prev_context = recompui::try_close_current_context();
ContextId context = ContextId::null();
Rml::ElementDocument* doc = event.GetTargetElement()->GetOwnerDocument();
if (doc != nullptr) {
@@ -198,6 +200,10 @@ void Element::ProcessEvent(Rml::Event &event) {
if (context != ContextId::null() && did_open) {
context.close();
}
if (prev_context != ContextId::null()) {
prev_context.open();
}
}
void Element::set_attribute(const Rml::String &attribute_key, const Rml::String &attribute_value) {