Exemple #1
0
        public GardenGamesPanel(GameChooserMenu parent)
        {
            parentMenu = parent;

            // cursor
            cursor = new GameThumbnailCursor();
            Add(cursor);
            cursor.Motion.Scale     = CURSOR_SCALE_REGULAR;
            cursor.Motion.Position  = CURSOR_INITIAL_POSITION * new Vector2(PANEL_DELTA_GRID_X, PANEL_DELTA_GRID_Y);
            cursor.Motion.TargetPos = CURSOR_INITIAL_POSITION * new Vector2(PANEL_DELTA_GRID_X, PANEL_DELTA_GRID_Y);
            cursor.GridPosition     = CURSOR_INITIAL_POSITION;
            cursor.Motion.Add(new MyFuncyModifier(delegate(float v) { return(v / 10.3f); }, "Rotate"));

            // info box - will be added to parent upon OnNewParent() event
            infoBox = new GameInfoBox();
            infoBox.Motion.Position       = INFOBOX_ALL_HIDDEN_POSITION;
            infoBox.Motion.TargetPos      = INFOBOX_SHOWN_POSITION;
            infoBox.Motion.TargetPosSpeed = INFOBOX_SPEED_MOVE;

            // controls help
            helpTextBitmap = new Spritelet("keymap");
            helpTextBitmap.Motion.Scale          = HELPTEXT_SCALE_DEFAULT;
            helpTextBitmap.Motion.Position       = HELPTEXT_HIDDEN_POSITION;
            helpTextBitmap.Motion.TargetPos      = HELPTEXT_SHOWN_POSITION;
            helpTextBitmap.Motion.TargetPosSpeed = HELPTEXT_SPEED_MOVE;

            // credits
            creditsBitmap = new Spritelet("credits.png");
            creditsBitmap.Motion.Scale          = CREDITS_SCALE_DEFAULT;
            creditsBitmap.Motion.Position       = CREDITS_HIDDEN_POSITION;
            creditsBitmap.Motion.TargetPos      = CREDITS_HIDDEN_POSITION;
            creditsBitmap.Motion.TargetPosSpeed = CREDITS_SPEED_MOVE;

            // default zoom
            Motion.Zoom             = PANEL_ZOOM_DETAILED_VIEW;
            Motion.ZoomTarget       = PANEL_ZOOM_DETAILED_VIEW;
            Motion.ZoomSpeed        = PANEL_ZOOM_SPEED_REGULAR;
            Motion.ZoomCenterTarget = cursor.Motion;
        }
        public GardenGamesPanel(GameChooserMenu parent)
        {
            parentMenu = parent;

            // cursor
            cursor = new GameThumbnailCursor();
            Add(cursor);
            cursor.Motion.Scale = CURSOR_SCALE_REGULAR;
            cursor.Motion.Position = CURSOR_INITIAL_POSITION * new Vector2(PANEL_DELTA_GRID_X, PANEL_DELTA_GRID_Y);
            cursor.Motion.TargetPos = CURSOR_INITIAL_POSITION * new Vector2(PANEL_DELTA_GRID_X, PANEL_DELTA_GRID_Y);
            cursor.GridPosition = CURSOR_INITIAL_POSITION;

            // info box - will be added to parent upon OnNewParent() event
            infoBox = new GameInfoBox();
            infoBox.Motion.Position = INFOBOX_ALL_HIDDEN_POSITION;
            infoBox.Motion.TargetPos = INFOBOX_SHOWN_POSITION;
            infoBox.Motion.TargetPosSpeed = INFOBOX_SPEED_MOVE;

            // controls help
            helpTextBitmap = new Spritelet("keymap");
            helpTextBitmap.Motion.Scale = 0.5f;
            helpTextBitmap.Motion.Position = HELPTEXT_HIDDEN_POSITION;
            helpTextBitmap.Motion.TargetPos = HELPTEXT_SHOWN_POSITION;
            helpTextBitmap.Motion.TargetPosSpeed = HELPTEXT_SPEED_MOVE;

            // credits
            creditsBitmap = new Spritelet("credits.png");
            creditsBitmap.Motion.Scale = CREDITS_SCALE_DEFAULT;
            creditsBitmap.Motion.Position = CREDITS_HIDDEN_POSITION;
            creditsBitmap.Motion.TargetPos = CREDITS_HIDDEN_POSITION;
            creditsBitmap.Motion.TargetPosSpeed = CREDITS_SPEED_MOVE;

            // default zoom
            Motion.Zoom = PANEL_ZOOM_DETAILED_VIEW;
            Motion.ZoomTarget = PANEL_ZOOM_DETAILED_VIEW;
            Motion.ZoomSpeed = PANEL_ZOOM_SPEED_REGULAR;
            Motion.ZoomCenterTarget = cursor.Motion;
        }