Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 54 lines (50 sloc) 1.585 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
#ifndef _SYSTEMINFOVIEW_H
#define _SYSTEMINFOVIEW_H

#include "libs.h"
#include "gui/Gui.h"
#include "View.h"
#include "View.h"
#include <vector>

class StarSystem;
class SystemBody;
namespace Graphics { class Renderer; }

class SystemInfoView: public View {
public:
SystemInfoView();
virtual void Update();
virtual void Draw3D();
virtual void OnSwitchTo();
void NextPage();
private:
class BodyIcon : public Gui::ImageRadioButton {
public:
BodyIcon(const char* img);
virtual void Draw();
virtual void OnActivate();
void SetRenderer(Graphics::Renderer *r) { m_renderer = r; }
bool HasStarport() { return m_hasStarport; }
void SetHasStarport() { m_hasStarport = true; }
private:
Graphics::Renderer *m_renderer;
bool m_hasStarport;
};
void SystemChanged(const SystemPath &path);
void UpdateEconomyTab();
void OnBodyViewed(SystemBody *b);
void OnBodySelected(SystemBody *b);
void OnClickBackground(Gui::MouseButtonEvent *e);
void PutBodies(SystemBody *body, Gui::Fixed *container, int dir, float pos[2], int &majorBodies, int &starports, int &onSurface, float &prevSize);
void UpdateIconSelections();
Gui::VBox *m_infoBox;
Gui::Label *m_econInfo;
Gui::Label *m_econMajImport, *m_econMinImport;
Gui::Label *m_econMajExport, *m_econMinExport;
Gui::Label *m_econIllegal;
Gui::Fixed *m_sbodyInfoTab, *m_econInfoTab;
Gui::Tabbed *m_tabs;
RefCountedPtr<StarSystem> m_system;
bool m_refresh;
//map is not enough to associate icons as each tab has their own
std::vector<std::pair<std::string, BodyIcon*> > m_bodyIcons;
};

#endif /* _SYSTEMINFOVIEW_H */
Something went wrong with that request. Please try again.