Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/modelview.h')
-rwxr-xr-xsrc/ui/modelview.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/ui/modelview.h b/src/ui/modelview.h
index f63dfa8..5596271 100755
--- a/src/ui/modelview.h
+++ b/src/ui/modelview.h
@@ -16,13 +16,19 @@ namespace ui
class ModelView : public Widget
{
public:
- ModelView(Widget *parent, const char *modelname = 0);
+ ModelView(Widget *parent);
~ModelView();
+
+ enum Mode { Model = 0, Globe = 1 };
inline std::string const &modelname() const {
return modelview_modelname;
}
+ inline Mode mode() const {
+ return modelview_mode;
+ }
+
inline float zoom() const {
return modelview_zoom;
}
@@ -31,11 +37,9 @@ public:
return modelview_radius;
}
- void set_modelname(const char *modelname);
-
- inline void set_modelname(const std::string & modelname) {
- set_modelname(modelname.c_str());
- }
+ void set_globetexturename(const std::string & texturename, const bool bright, const std::string & coronaname);
+
+ void set_modelname(const std::string & modelname);
void set_colors(const math::Color & color_primary, const math::Color & color_secondary);
@@ -53,6 +57,10 @@ public:
inline void set_radius(const float radius) {
modelview_radius = radius;
}
+
+ inline void set_mode(const Mode mode) {
+ modelview_mode = mode;
+ }
protected:
/// draw the widget
@@ -76,9 +84,20 @@ protected:
virtual void on_mousemove(const math::Vector2f &cursor);
private:
+ void draw_model();
+
+ void draw_globe();
+
+ Mode modelview_mode;
+
std::string modelview_modelname;
+ std::string modelview_globetexturename;
+ std::string modelview_globecoronaname;
+ bool modelview_globebright;
+
math::Color modelview_color_primary;
math::Color modelview_color_secondary;
+
float modelview_zoom;
float modelview_radius;