]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/sgVec3Slider.cxx
replace depreciated plib symbols with their new forms
[flightgear.git] / src / GUI / sgVec3Slider.cxx
index e4a98bcaa968f7ab3e6eab3e6e8f2bb4d7953f88..3e2b40db00d347d36fd5ad9e7d82fcd423859749 100644 (file)
 #include <Main/fg_props.hxx>
 #include <simgear/sg_inlines.h>
 
+static void
+setPilotXOffset (float value)
+{
+       PilotOffsetSet(0, value);
+}
+
+static float
+getPilotXOffset ()
+{
+       return( PilotOffsetGetSetting(0) );
+}
+
+
+static void
+setPilotYOffset (float value)
+{
+       PilotOffsetSet(1, value);
+}
+
+static float
+getPilotYOffset ()
+{
+       return( PilotOffsetGetSetting(1) );
+}
+
+
+static void
+setPilotZOffset (float value)
+{
+       PilotOffsetSet(2, value);
+}
+
+static float
+getPilotZOffset ()
+{
+       return( PilotOffsetGetSetting(2) );
+}
+
+
 class FloatSlider : public puSlider
 {
 
@@ -90,9 +129,9 @@ FloatSlider::FloatSlider ( int x, int y, int sz, float f, const char *title,
        setCBMode   ( PUSLIDER_DELTA ) ;
        strcpy      ( _title, title);
        setLabel    ( _title );
-       setLabelPlace ( PUPLACE_LEFT );
+       setLabelPlace ( PUPLACE_LOWER_LEFT );
        setLegend(_text);
-       // setLegendPlace( PUPLACE_RIGHT );
+       // setLegendPlace( PUPLACE_LOWER_RIGHT );
 }
 
 
@@ -172,9 +211,9 @@ FloatDial::FloatDial ( int x, int y, int sz, float f, const char *title,
        setCBMode   ( PUSLIDER_DELTA ) ;
        strcpy      ( _title, title);
        setLabel    ( _title );
-       setLabelPlace ( PUPLACE_LEFT  );
+       setLabelPlace ( PUPLACE_LOWER_LEFT  );
        setLegend(_text);
-       // setLegendPlace( PUPLACE_RIGHT );
+       // setLegendPlace( PUPLACE_LOWER_RIGHT );
 }
 
 
@@ -290,7 +329,7 @@ sgVec3Slider::sgVec3Slider ( int x, int y, sgVec3 cart, const char *title,
 
        new puFrame ( 0, 0, DialogWidth, DialogHeight );
 
-       setLabelPlace( PUPLACE_DEFAULT /*PUPLACE_CENTERED*/ );
+       setLabelPlace( PUPLACE_DEFAULT /*PUPLACE_CENTERED_CENTERED*/ );
        setLabel( Label );
 
         /* heading */
@@ -484,9 +523,9 @@ sgVec3 *PilotOffsetGet()
 // external function used to tie to FG properties
 float PilotOffsetGetSetting(int opt)
 {
-       float setting;
+       float setting = 0.0;
        if( PO_vec == 0 ) {
-               PilotOffsetInit();
+            PilotOffsetInit();
        }
        sgVec3Slider *me = (sgVec3Slider *)PO_vec -> getUserData();
         sgVec3 vec;