1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-21 13:29:29 +08:00

fix: ingame ui penetration

This commit is contained in:
0O0o0oOoO00
2025-09-08 19:35:50 +08:00
parent 409cddd6fc
commit 9861246fd8
2 changed files with 100 additions and 7 deletions

View File

@@ -11,6 +11,9 @@
#include "font.hpp"
#include "skincache.hpp"
ImVec2 g_window_pos = ImVec2(0, 0);
ImVec2 g_window_size = ImVec2(0, 0);
CrackerUI::CrackerUI() {}
void CrackerUI::init(EGLint width, EGLint height) {
@@ -42,12 +45,17 @@ void CrackerUI::init(EGLint width, EGLint height) {
#define SHIP_PROPERTY(n) m_cracker_config.globle_ship_properties.n
#define FILL_SHIP_PROPERTY(n) m_cracker_config.globle_ship_properties.n = m_all_ship_properties
extern bool g_need_ui_penetration;
void CrackerUI::draw_menu() {
ImGui::Begin("AzurLane Crack");
ImVec2 window_pos = ImGui::GetWindowPos();
ImVec2 window_size = ImGui::GetWindowSize();
g_window_pos = window_pos;
g_window_size = window_size;
ImVec2 new_pos = window_pos;
new_pos.x = ImClamp(new_pos.x, m_constrain_min.x, m_constrain_max.x - window_size.x);
new_pos.y = ImClamp(new_pos.y, m_constrain_min.y, m_constrain_max.y - window_size.y);
@@ -190,6 +198,7 @@ void CrackerUI::draw_menu() {
if (ImGui::Button("清空全皮肤设置")) {
SkinCache::get_instance().clear();
}
ImGui::Checkbox("UI穿透", &g_need_ui_penetration);
ImGui::EndTabItem();
}
ImGui::EndTabBar();