54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#define SECTION_START() __noop();
|
|
#define SECTION_END() __nop();
|
|
#define SECTION_INIT(NAME) float section_push = 0.0f; \
|
|
const float section_start_x = position.x + 5.0f, section_start_y = position.y + 55.0f + yaw_push; \
|
|
static float section_height = 0.0f; \
|
|
ui::section({ section_start_x, section_start_y }, { (dimension.w / 2.f) - 10.f, section_height + 10.0f }, { 65, 65, 65 }, _XS(NAME)); \
|
|
const float section_rstart_x = section_start_x + 5.0f, \
|
|
section_rstart_y = section_start_y + 10.0f; \
|
|
|
|
#define SECTION_INIT_EX(NAME, WIDTH) float section_push = 0.0f; \
|
|
const float section_start_x = start_x, section_start_y = start_y + yaw_push; \
|
|
static float section_height = 0.0f; \
|
|
ui::section({ section_start_x, section_start_y }, { WIDTH, section_height + 10.0f }, { 65, 65, 65 }, _XS(NAME)); \
|
|
const float section_rstart_x = section_start_x + 5.0f, \
|
|
section_rstart_y = section_start_y + 10.0f; \
|
|
|
|
#define MENU_TAB_ARGS const math::position_t<int>& position, const math::dimension_t<int>& dimension, const float& start_x, const float& start_y, float& yaw_push
|
|
|
|
namespace window
|
|
{
|
|
namespace menu::tabs
|
|
{
|
|
extern void other_left(MENU_TAB_ARGS);
|
|
extern void other_right(MENU_TAB_ARGS);
|
|
|
|
extern void config_left(MENU_TAB_ARGS);
|
|
extern void config_right(MENU_TAB_ARGS);
|
|
|
|
extern void aim_left(MENU_TAB_ARGS);
|
|
extern void aim_right(MENU_TAB_ARGS);
|
|
|
|
extern void visual_left(MENU_TAB_ARGS);
|
|
extern void visual_right(MENU_TAB_ARGS);
|
|
}
|
|
|
|
class c_menu : public c_base
|
|
{
|
|
public:
|
|
void paint() override;
|
|
|
|
void draw_base();
|
|
|
|
void draw_tab_selection();
|
|
void draw_tab_right();
|
|
|
|
void render();
|
|
private:
|
|
int m_tab;
|
|
bool m_visible;
|
|
};
|
|
}
|