2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2022-02-21 03:33:57 -05:00
|
|
|
#include "pch.h"
|
2022-08-20 15:30:13 -04:00
|
|
|
#include "interface/ifeature.hpp"
|
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
|
|
|
*/
|
2022-08-20 15:30:13 -04:00
|
|
|
class CheatMenuMgr : public IFeature<CheatMenuMgr>
|
2020-12-02 16:19:16 -05:00
|
|
|
{
|
|
|
|
private:
|
2022-08-20 15:30:13 -04:00
|
|
|
ImVec2 m_fSize;
|
|
|
|
bool m_bVisible; // should the menu be drawn
|
|
|
|
bool m_bSizeUpdated; // Was menu size change requested
|
|
|
|
bool m_bIsOnline; // SAMP & VCMP flag
|
|
|
|
|
|
|
|
friend class IFeature;
|
|
|
|
CheatMenuMgr();
|
|
|
|
CheatMenuMgr(const CheatMenuMgr&);
|
2021-10-21 18:23:02 -04:00
|
|
|
|
2022-06-12 14:01:43 -04:00
|
|
|
// Applies imgui theme to the menu
|
2022-08-20 15:30:13 -04:00
|
|
|
void ApplyStyle();
|
2022-06-12 14:01:43 -04:00
|
|
|
|
|
|
|
// Draws the window ui each frame
|
2022-08-20 15:30:13 -04:00
|
|
|
void Draw();
|
2022-06-12 14:01:43 -04:00
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
public:
|
2022-08-05 14:49:09 -04:00
|
|
|
// Returns true if the menu is being shown
|
2022-08-20 15:30:13 -04:00
|
|
|
bool IsVisible();
|
2022-08-05 14:49:09 -04:00
|
|
|
|
|
|
|
// Resets the menu height & width to default
|
2022-08-20 15:30:13 -04:00
|
|
|
void ResetSize();
|
2020-12-02 16:19:16 -05:00
|
|
|
};
|
2022-08-20 15:30:13 -04:00
|
|
|
|
|
|
|
extern CheatMenuMgr& CheatMenu;
|