2018-05-22 12:00:30 +00:00
|
|
|
#ifndef GALAXY_MENU_H
|
|
|
|
#define GALAXY_MENU_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "galaxy.h"
|
|
|
|
|
2018-05-23 11:46:02 +00:00
|
|
|
#include "include/Engine.h"
|
|
|
|
|
|
|
|
#include <boost/property_tree/json_parser.hpp>
|
|
|
|
#include <math.h>
|
|
|
|
|
2018-05-22 12:00:30 +00:00
|
|
|
class GalaxyMenu {
|
|
|
|
public:
|
|
|
|
|
|
|
|
GalaxyMenu();
|
|
|
|
~GalaxyMenu();
|
|
|
|
|
|
|
|
// ======== All objects =========
|
|
|
|
std::vector<Galaxy> galaxies;
|
|
|
|
// ======== All objects =========
|
|
|
|
|
|
|
|
|
|
|
|
// ======== Main Methods ========
|
2018-05-23 11:46:02 +00:00
|
|
|
bool InitGalaxyMenu(std::string config_json, float scale = 1.f);
|
2018-05-22 12:00:30 +00:00
|
|
|
void DrawGalaxyMenu();
|
|
|
|
void UpdateGalaxyMenu();
|
|
|
|
// ======== Main Methods ========
|
|
|
|
|
|
|
|
void InteractWithGalaxy(/*..Vector/Vector/Int..*/); // Prototype for mouse/tap events
|
|
|
|
|
2018-05-23 11:46:02 +00:00
|
|
|
// ::#Params#::
|
|
|
|
Eigen::Vector2f menuPosition = Eigen::Vector2f(0.f, 0.f); // relative to the screen center(0.f,0.f means center) (not const!!)
|
|
|
|
float menuScale = 1.f; // (not const!!)
|
|
|
|
float xDimension;
|
|
|
|
float yDimension;
|
2018-05-22 12:00:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void readSaveData(); // inner init method
|
|
|
|
|
2018-05-23 11:46:02 +00:00
|
|
|
Eigen::Vector2f textureSizeNormalize(Eigen::Vector2f texVec, int t_type = 0/*0-galaxy, 1-stars*/);
|
|
|
|
float val_clamp(float v, float min, float max);
|
2018-05-22 12:00:30 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|