CheatMenuSA/src/cheatmenu.h

34 lines
871 B
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
#include "pch.h"
2021-08-01 21:41:48 -04:00
2022-06-12 14:01:43 -04:00
/*
* Main CheatMenu Class
2022-08-17 21:12:21 -04:00
* Handles rendering, resizing, page drawing etc.
2022-06-12 14:01:43 -04:00
*/
class CheatMenu
2020-12-02 16:19:16 -05:00
{
private:
2021-10-24 18:08:00 -04:00
static inline ImVec2 m_fMenuSize = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
2022-08-15 21:55:33 -04:00
static inline bool m_bShowMenu = false; // should the menu be drawn
static inline bool m_bSizeChangedExternal = false; // Was menu size change requested
2021-10-21 18:23:02 -04:00
2022-06-12 14:01:43 -04:00
// Applies imgui theme to the menu
2021-10-24 18:08:00 -04:00
static void ApplyStyle();
2022-06-12 14:01:43 -04:00
// Draws the window ui each frame
2021-10-24 18:08:00 -04:00
static void DrawWindow();
2022-06-12 14:01:43 -04:00
2020-12-02 16:19:16 -05:00
public:
CheatMenu() = delete;
CheatMenu(const CheatMenu&) = delete;
2021-12-16 15:17:49 -05:00
// Initilizes the menu, page, hooks etc
static void Init();
// Returns true if the menu is being shown
2022-08-15 21:55:33 -04:00
static bool IsBeingDrawn();
// Resets the menu height & width to default
2022-08-15 21:55:33 -04:00
static void ResetSize();
2020-12-02 16:19:16 -05:00
};