private void openGLControl_MouseScroller(object sender, MouseEventArgs e)
        {
            if (e.Delta > 0)
            {
                GraphicalOverlap.GO_interface_item_choice++;
            }
            else
            {
                GraphicalOverlap.GO_interface_item_choice--;
            }

            GraphicalOverlap.Graphical_OverLap_Logic(GraphicalOverlap.GO_interface_item_choice);
        }
        public void openGL_Draw_Wrapped()
        {
            if (this.ActiveControl.Focused)
            {
                if ((Control.ModifierKeys & Keys.Shift) != 0)
                {
                    Keyboard.DoSpecificAction('z');
                }

                if ((Control.ModifierKeys & Keys.Control) != 0)
                {
                    Keyboard.Ctrl_is_pressed = true;
                }
                else
                {
                    Keyboard.Ctrl_is_pressed = false;
                }

                if ((Control.ModifierKeys & Keys.Alt) != 0)
                {
                }
                else
                {
                    Keyboard.Alt_is_pressed = false;
                }

                Keyboard.DoAction();

                if (Mouse.MouseIsActive && (StaticAccess.FMOS != null && !StaticAccess.FMOS.table_Menu_main.Visible))
                {
                    Mouse.DoMouse(Control.MousePosition, Control.MouseButtons.ToString());
                    Cursor.Position = Mouse.ReturnToCenter();
                }

                Scene.SS.env.player.coords.Player_recalculate_extra_positions();
            }
            //  Draw the scene.
            scene.Draw(openGLControl.OpenGL);

            //if (StaticSettings.S.GhostCubeBool)
            for (int i = GraphicalOverlap.Start_Shift; i <= GraphicalOverlap.End_Max; i++)
            {
                GraphicalOverlap.draw_GO_square(openGLControl, 20 + i * 30, 20, 20, GeneralProgrammingStuff.ColorSwitch(i - GraphicalOverlap.Start_Shift));
            }

            CF.Ultimate_DrawText(20 + GraphicalOverlap.GO_interface_item_choice * 30, 50, System.Drawing.Color.White, 14, GraphicalOverlap.GO_interface_item_choice.ToString(), 3.0f);

            CF.Ultimate_DrawText(openGLControl.Width / 2 - FontSizeTargetPointer / 4, openGLControl.Height / 2 - FontSizeTargetPointer / 2, System.Drawing.Color.White, FontSizeTargetPointer, "+", 4.0f);

            if (StaticSettings.S.HelpInfoForPlayer)
            {
                int place = 1;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * 1, System.Drawing.Color.Gold, 10, "|F| - Fly Mod: " + StaticSettings.S.FlyMod, 2.0f);
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Gold, 10, "|M| - Music: " + Music.wmp_player.PlayerTime() + " " + Music.wmp_player.PlayerSongName(), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Cyan, 10, "|N| - Next Song: ", 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.LimeGreen, 10, "|P| - Phantom Mod: " + StaticSettings.S.PhantomMod, 2.0f);  place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Yellow, 10, "|Y| - Sun Disabled: " + StaticSettings.S.SunStatus.x, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.WhiteSmoke, 10, "|T| - Time Speed: " + Time.time.Time_Speed, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.SandyBrown, 10, "|F| - Falling Cube: " + StaticSettings.S.FallingCube, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Red, 10, "|E| - Exploding Mod: " + StaticSettings.S.ExplosionMod, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Purple, 10, "|J| - Rotational Mod: " + Projectile.jp.RotatingStartingVelocity, 2.0f); place++;

                if (StaticSettings.S.ShowPlayerPosition)
                {
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "PrecisePosition:" + Scene.SS.env.player.coords.Player_precise_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "ChunkPosition:" + Scene.SS.env.player.coords.Player_chunk_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "CubicalPosition:" + Scene.SS.env.player.coords.Player_cubical_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "PreciseLook:" + Scene.SS.env.player.coords.Player_precise_lookforcube.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "ChunkLook:" + Scene.SS.env.player.coords.Player_chunk_lookforcube.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "CubicalLook:" + Scene.SS.env.player.coords.Player_cubical_lookforcube.ToString(), 2.0f); place++;
                }

                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "Range of View: " + StaticSettings.S.RangeOfView, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time: " + Time.time.GetDayTime(), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Starting Velocity: " + vec3things.ToString(Projectile.jp.sd.Get_Starting_velocity()), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Velocity: " + Projectile.jp.sd.StartingVelocity.ToString("G2"), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "LPFM: " + vec3things.ToString(Projectile.jp.LastPositionForMeasurements), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Range: " + Projectile.jp.TotalRangeZXForMeasurements, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Arc Range: " + Projectile.jp.TotalFlyingDistanceInAnArcWay, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "X: " + StaticCompass.C.Xangle.ToString("G2"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + StaticCompass.C.Zangle.ToString("G2"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + (StaticCompass.C.Xangle / Math.PI * 180.0f).ToString("G3"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + (StaticCompass.C.Zangle / Math.PI * 180.0f).ToString("G3"), 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Ctrl: " + Keyboard.Ctrl_is_pressed, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Alt: " + Keyboard.Alt_is_pressed, 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "-------------------", 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Position Old: " + vec3things.ToString(Projectile.jp.Coordinates()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Position New: " + vec3things.ToString(Projectile.jp.Coordinates(true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Velocity Old: " + vec3things.ToString(Projectile.jp.Velocity()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Velocity New: " + vec3things.ToString(Projectile.jp.Velocity(true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.AbsoluteLocationAtTime(1.0f)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.AbsoluteLocationAtTime(1.0f,true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.CoordinatesAtTimeAtHighPart(1.0f)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.CoordinatesAtTimeAtHighPart(1.0f, true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.AbsoluteEstimatedLocation()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.AbsoluteEstimatedLocation(true)), 2.0f); place++;


                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time.time.GetGameTotalSeconds: " + Time.time.GetGameTotalSeconds(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "starting velocity: " + Projectile.jp.GetStringedVec3(Projectile.jp.sd.starting_velocity), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Projectile.jp.Coordinates() " + Projectile.jp.GetStringedVec3(Projectile.jp.Coordinates()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Projectile.jp.Coordinates() " + Projectile.jp.GetStringedVec3(Projectile.jp.center), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Bomb Location " + Explosion.exp.Bomb_precise_position.ToString(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Rocket Angle: " + Projectile.jp.AngleBetweenStartingAndCurrentVelocity(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Average Rebuilding Main Time: " + Time.time.AverageRebuildingTime, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "TimeWhenSecondZero: " + Projectile.jp.TimeWhenSecondZero(), 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Explosion.exp.StartingTime: " + Explosion.exp.StartingTime, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Explosion.exp.StartingShift: " + Explosion.exp.StartingShiftForLoeading, 2.0f); place++;
                //
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time: " + Time.time.GetTotalSeconds(), 2.0f); place++;
            }
        }
Exemple #3
0
        public static void Wrapped_KeyPressed_Reaction(char key)
        {
            switch (key)
            {
            case 'w':
                step_vector.x = 0; step_vector.y = 0; step_vector.z = step; DoStep(step_vector); break;

            case 's':
                step_vector.x = 0; step_vector.y = 0; step_vector.z = -step; DoStep(step_vector); break;

            case 'a':
                step_vector.x = step; step_vector.y = 0; step_vector.z = 0; DoStep(step_vector); break;

            case 'd':
                step_vector.x = -step; step_vector.y = 0; step_vector.z = 0; DoStep(step_vector); break;

            case 'z':
                step_vector.x = 0; step_vector.y = step * 1.3f; step_vector.z = 0; DoStep(step_vector); break;

            //case 'x':
            //    step_vector.x = 0; step_vector.y = step * 0.1f; step_vector.z = 0; DoStep(step_vector); break;
            case ' ':
                if (StaticSettings.S.FlyMod)
                {
                    step_vector.x = 0; step_vector.y = -step * 1.3f; step_vector.z = 0; DoStep(step_vector);
                }
                break;

            //case 'l':
            //    Scene.SS.env.player.coords.Player_rotational_view.x += rotational_step; break;
            //case 'j':
            //    Scene.SS.env.player.coords.Player_rotational_view.x -= rotational_step; break;
            //case 'i':
            //    Scene.SS.env.player.coords.Player_rotational_view.y += rotational_step; break;
            //case 'k':
            //    Scene.SS.env.player.coords.Player_rotational_view.y -= rotational_step; break;

            case (char)188:    //','
                step_multiplier += 1; break;

            case (char)190:    //'.'
                if (step_multiplier - 1 > 1)
                {
                    step_multiplier -= 1;
                }
                break;

            default: break;
            }

            if (key >= '0' && key <= '9')
            {
                try
                {
                    int Number = key - '0' + GraphicalOverlap.Start_Shift - 1;
                    GraphicalOverlap.Graphical_OverLap_Logic(Number);
                }
                catch (Exception Error)
                {
                    Console.WriteLine(Error.Message);
                }
            }
        }