Browse Source

dr anal strikes again!

cxgeorge 23 years ago
parent
commit
91e38360af

+ 4 - 4
panda/src/pgui/pgButton.cxx

@@ -197,21 +197,21 @@ setup(const string &label) {
   inactive->add_child(geom);
   inactive->add_child(geom);
 
 
   PGFrameStyle style;
   PGFrameStyle style;
-  style.set_color(0.8f, 0.8f, 0.8f, 1.0);
+  style.set_color(0.8f, 0.8f, 0.8f, 1.0f);
   style.set_width(0.1f, 0.1f);
   style.set_width(0.1f, 0.1f);
 
 
   style.set_type(PGFrameStyle::T_bevel_out);
   style.set_type(PGFrameStyle::T_bevel_out);
   set_frame_style(S_ready, style);
   set_frame_style(S_ready, style);
 
 
-  style.set_color(0.9f, 0.9f, 0.9f, 1.0);
+  style.set_color(0.9f, 0.9f, 0.9f, 1.0f);
   set_frame_style(S_rollover, style);
   set_frame_style(S_rollover, style);
 
 
   inactive->set_attrib(ColorAttrib::make_flat(Colorf(0.8f, 0.8f, 0.8f, 1.0f)));
   inactive->set_attrib(ColorAttrib::make_flat(Colorf(0.8f, 0.8f, 0.8f, 1.0f)));
-  style.set_color(0.6f, 0.6f, 0.6f, 1.0);
+  style.set_color(0.6f, 0.6f, 0.6f, 1.0f);
   set_frame_style(S_inactive, style);
   set_frame_style(S_inactive, style);
 
 
   style.set_type(PGFrameStyle::T_bevel_in);
   style.set_type(PGFrameStyle::T_bevel_in);
-  style.set_color(0.8f, 0.8f, 0.8f, 1.0);
+  style.set_color(0.8f, 0.8f, 0.8f, 1.0f);
   set_frame_style(S_depressed, style);
   set_frame_style(S_depressed, style);
   depressed->set_transform(TransformState::make_pos(LVector3f(0.05f, 0.0f, -0.05f)));
   depressed->set_transform(TransformState::make_pos(LVector3f(0.05f, 0.0f, -0.05f)));
 }
 }

+ 2 - 2
panda/src/pgui/pgFrameStyle.I

@@ -25,8 +25,8 @@
 INLINE PGFrameStyle::
 INLINE PGFrameStyle::
 PGFrameStyle() {
 PGFrameStyle() {
   _type = T_none;
   _type = T_none;
-  _color.set(1.0, 1.0, 1.0, 1.0);
-  _width.set(0.1, 0.1);
+  _color.set(1.0f, 1.0f, 1.0f, 1.0f);
+  _width.set(0.1f, 0.1f);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 7 - 7
panda/src/pgui/pgItem.cxx

@@ -111,8 +111,8 @@ make_copy() const {
 void PGItem::
 void PGItem::
 xform(const LMatrix4f &mat) {
 xform(const LMatrix4f &mat) {
   // Transform the frame.
   // Transform the frame.
-  LPoint3f ll(_frame[0], 0.0, _frame[2]);
-  LPoint3f ur(_frame[1], 0.0, _frame[3]);
+  LPoint3f ll(_frame[0], 0.0f, _frame[2]);
+  LPoint3f ur(_frame[1], 0.0f, _frame[3]);
   ll = ll * mat;
   ll = ll * mat;
   ur = ur * mat;
   ur = ur * mat;
   _frame.set(ll[0], ur[0], ll[2], ur[2]);
   _frame.set(ll[0], ur[0], ll[2], ur[2]);
@@ -282,10 +282,10 @@ void PGItem::
 activate_region(const LMatrix4f &transform, int sort) {
 activate_region(const LMatrix4f &transform, int sort) {
   // Transform all four vertices, and get the new bounding box.  This
   // Transform all four vertices, and get the new bounding box.  This
   // way the region works (mostly) even if has been rotated.
   // way the region works (mostly) even if has been rotated.
-  LPoint3f ll(_frame[0], 0.0, _frame[2]);
-  LPoint3f lr(_frame[1], 0.0, _frame[2]);
-  LPoint3f ul(_frame[0], 0.0, _frame[3]);
-  LPoint3f ur(_frame[1], 0.0, _frame[3]);
+  LPoint3f ll(_frame[0], 0.0f, _frame[2]);
+  LPoint3f lr(_frame[1], 0.0f, _frame[2]);
+  LPoint3f ul(_frame[0], 0.0f, _frame[3]);
+  LPoint3f ur(_frame[1], 0.0f, _frame[3]);
   ll = ll * transform;
   ll = ll * transform;
   lr = lr * transform;
   lr = lr * transform;
   ul = ul * transform;
   ul = ul * transform;
@@ -780,7 +780,7 @@ get_text_node() {
   if (_text_node == (TextNode *)NULL) {
   if (_text_node == (TextNode *)NULL) {
     _text_node = new TextNode("pguiText");
     _text_node = new TextNode("pguiText");
     _text_node->freeze();
     _text_node->freeze();
-    _text_node->set_text_color(0.0, 0.0, 0.0, 1.0);
+    _text_node->set_text_color(0.0f, 0.0f, 0.0f, 1.0f);
 
 
     // The default TextNode is aligned to the left, for the
     // The default TextNode is aligned to the left, for the
     // convenience of PGEntry.
     // convenience of PGEntry.

+ 5 - 5
panda/src/pgui/pgWaitBar.cxx

@@ -122,16 +122,16 @@ setup(float width, float height, float range) {
   set_state(0);
   set_state(0);
   clear_state_def(0);
   clear_state_def(0);
 
 
-  set_frame(-0.5 * width, 0.5 * width, -0.5 * height, 0.5 * height);
+  set_frame(-0.5f * width, 0.5f * width, -0.5f * height, 0.5f * height);
 
 
   PGFrameStyle style;
   PGFrameStyle style;
-  style.set_width(0.05, 0.05);
+  style.set_width(0.05f, 0.05f);
 
 
-  style.set_color(0.6, 0.6, 0.6, 1.0);
+  style.set_color(0.6f, 0.6f, 0.6f, 1.0f);
   style.set_type(PGFrameStyle::T_bevel_in);
   style.set_type(PGFrameStyle::T_bevel_in);
   set_frame_style(0, style);
   set_frame_style(0, style);
 
 
-  style.set_color(0.8, 0.8, 0.8, 1.0);
+  style.set_color(0.8f, 0.8f, 0.8f, 1.0f);
   style.set_type(PGFrameStyle::T_bevel_out);
   style.set_type(PGFrameStyle::T_bevel_out);
   set_bar_style(style);
   set_bar_style(style);
 }
 }
@@ -156,7 +156,7 @@ update() {
   _bar.remove_node();
   _bar.remove_node();
 
 
   // Now create new bar geometry.
   // Now create new bar geometry.
-  if (_value != 0.0 && _range != 0.0) {
+  if ((_value != 0.0f) && (_range != 0.0f)) {
     NodePath &root = get_state_def(state);
     NodePath &root = get_state_def(state);
     nassertv(!root.is_empty());
     nassertv(!root.is_empty());