mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
Note: there's some bug in the menu render code that doesn't like state strings that are longer than 4 characters + NULL. So, the current code will clip any state string that is longer than 4 characters. We need to look into this 5 character limit. It's a bug.
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
//
|
||
// MenuColumn.h
|
||
// hifi
|
||
//
|
||
// Created by Dominque Vincent on 4/10/13.
|
||
//
|
||
//
|
||
|
||
#ifndef __hifi__MenuColumn__
|
||
#define __hifi__MenuColumn__
|
||
|
||
#include <vector>
|
||
|
||
class MenuColumn {
|
||
public:
|
||
MenuColumn();
|
||
MenuColumn(const char* columnName);
|
||
~MenuColumn();
|
||
void mouseClickRow(int iColumnIndex);
|
||
bool mouseClick(int x, int y, int xLeft, int menuHeight, int lineHeight);
|
||
void setMouseOver(int xLeft, int xRight, int yTop, int yBottom);
|
||
bool mouseOver(int x, int y, int xLeft, int menuHeight, int lineHeight);
|
||
char* getName();
|
||
int getWidth(float scale, int mono, int leftPosition);
|
||
int getWidth();
|
||
int getLeftPosition();
|
||
void render(int yOffset, int menuHeight, int lineHeight);
|
||
void renderMouseOver(int yOffset);
|
||
int addRow(const char* rowName, MenuRowCallback callback);
|
||
int addRow(const char* rowName, MenuRowCallback callback, MenuStateNameCallback stateNameCallback);
|
||
int getMaxRowWidth();
|
||
private:
|
||
char columnName[MAX_COLUMN_NAME];
|
||
int columnWidth;
|
||
int leftPosition;
|
||
std::vector<MenuRow> rows;
|
||
int leftMouseOver;
|
||
int rightMouseOver;
|
||
int topMouseOver;
|
||
int bottomMouseOver;
|
||
};
|
||
|
||
#endif /* defined(__hifi__MenuColumn__) */
|
||
|