From 91e38360af300772b6b6c774f757283cf6a04a6b Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Fri, 4 Oct 2002 01:39:18 +0000 Subject: [PATCH] dr anal strikes again! --- panda/src/pgui/pgButton.cxx | 8 ++++---- panda/src/pgui/pgFrameStyle.I | 4 ++-- panda/src/pgui/pgItem.cxx | 14 +++++++------- panda/src/pgui/pgWaitBar.cxx | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/panda/src/pgui/pgButton.cxx b/panda/src/pgui/pgButton.cxx index 1981fb4ad9..2471c00b0f 100644 --- a/panda/src/pgui/pgButton.cxx +++ b/panda/src/pgui/pgButton.cxx @@ -197,21 +197,21 @@ setup(const string &label) { inactive->add_child(geom); 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_type(PGFrameStyle::T_bevel_out); 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); 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); 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); depressed->set_transform(TransformState::make_pos(LVector3f(0.05f, 0.0f, -0.05f))); } diff --git a/panda/src/pgui/pgFrameStyle.I b/panda/src/pgui/pgFrameStyle.I index f51fa658dd..c15fdcb01a 100644 --- a/panda/src/pgui/pgFrameStyle.I +++ b/panda/src/pgui/pgFrameStyle.I @@ -25,8 +25,8 @@ INLINE PGFrameStyle:: PGFrameStyle() { _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); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgui/pgItem.cxx b/panda/src/pgui/pgItem.cxx index 7e64e8663b..bcda896641 100644 --- a/panda/src/pgui/pgItem.cxx +++ b/panda/src/pgui/pgItem.cxx @@ -111,8 +111,8 @@ make_copy() const { void PGItem:: xform(const LMatrix4f &mat) { // 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; ur = ur * mat; _frame.set(ll[0], ur[0], ll[2], ur[2]); @@ -282,10 +282,10 @@ void PGItem:: activate_region(const LMatrix4f &transform, int sort) { // Transform all four vertices, and get the new bounding box. This // 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; lr = lr * transform; ul = ul * transform; @@ -780,7 +780,7 @@ get_text_node() { if (_text_node == (TextNode *)NULL) { _text_node = new TextNode("pguiText"); _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 // convenience of PGEntry. diff --git a/panda/src/pgui/pgWaitBar.cxx b/panda/src/pgui/pgWaitBar.cxx index 9054adf694..a2d4d9b272 100644 --- a/panda/src/pgui/pgWaitBar.cxx +++ b/panda/src/pgui/pgWaitBar.cxx @@ -122,16 +122,16 @@ setup(float width, float height, float range) { set_state(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; - 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); 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); set_bar_style(style); } @@ -156,7 +156,7 @@ update() { _bar.remove_node(); // 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); nassertv(!root.is_empty());