V-Gears 0
Free Final Fantasy VII engine.
CameraManagerCommands.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreStringConverter.h>
19#include "CameraManager.h"
20#include "ConfigCmdHandler.h"
21#include "Console.h"
22
23void CommandCameraFree(const Ogre::StringVector& params){
24 if (params.size() < 1){
25 Console::getSingleton().AddTextToOutput("Usage: /camera_free <enable>");
26 return;
27 }
28 CameraManager::getSingleton().SetCameraFree(
29 Ogre::StringConverter::parseBool(params[1])
30 );
31}
32
33void CommandCameraFreeCompletition( Ogre::StringVector& complete_params ){
34 complete_params.push_back( "true" );
35 complete_params.push_back( "false" );
36}
37
39 ConfigCmdHandler::getSingleton().AddCommand(
40 "camera_free", "Enable or disable free camera", "",
42 );
43}
void CommandCameraFree(const Ogre::StringVector &params)
Definition: CameraManagerCommands.h:23
void CommandCameraFreeCompletition(Ogre::StringVector &complete_params)
Definition: CameraManagerCommands.h:33
void InitCommands()
Initializes the camera parameters.
Definition: CameraManagerCommands.h:38