refactor: Renderer (#694)
* Simplified SwapCHain, Device and DeviceContext pointers * Added DX and WndProc callback registration * Cleaned up GUI code * Optimised Mouse Toggle
This commit is contained in:
@ -300,7 +300,7 @@ namespace big
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_gui.m_opened)
|
||||
if (g_gui->is_open())
|
||||
{
|
||||
script::get_current()->yield();
|
||||
continue;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include "hotkey_functions.hpp"
|
||||
#include "renderer.hpp"
|
||||
|
||||
#include "network/ChatData.hpp"
|
||||
#include "pointers.hpp"
|
||||
@ -14,6 +15,11 @@ namespace big
|
||||
register_hotkey("objective", g->settings.hotkeys.teleport_objective, teleport::to_objective);
|
||||
register_hotkey("noclip", g->settings.hotkeys.noclip, hotkey_funcs::toggle_noclip);
|
||||
|
||||
g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
wndproc(static_cast<eKeyState>(msg), wparam);
|
||||
});
|
||||
|
||||
g_hotkey_service = this;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ namespace big
|
||||
m_loop_running = true;
|
||||
|
||||
while (
|
||||
g_running && m_running && g_gui.m_opened &&
|
||||
g_running && m_running && g_gui->is_open() &&
|
||||
(m_ped_model_hash|| m_veh_model_hash)
|
||||
) {
|
||||
Vector3 location;
|
||||
|
@ -1,9 +1,12 @@
|
||||
#include "notification_service.hpp"
|
||||
#include "widgets/imgui_hotkey.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
notification_service::notification_service()
|
||||
{
|
||||
push("Welcome", std::format("Loaded YimMenu. Press {} to open", ImGui::key_names[g->settings.hotkeys.menu_toggle]));
|
||||
|
||||
g_notification_service = this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user