Match more .stkgui and .cpp file names.

This commit is contained in:
hiker 2015-10-07 16:33:01 +11:00
parent a49fdca521
commit d391727879
10 changed files with 60 additions and 58 deletions

View File

@ -1,5 +1,5 @@
# Modify this file to change the last-modified date when you add/remove a file.
# This will then trigger a new cmake run automatically.
# This will then trigger a new cmake run automatically.
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")

View File

@ -39,7 +39,7 @@
#include "replay/replay_recorder.hpp"
#include "states_screens/kart_selection.hpp"
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/options_screen_input2.hpp"
#include "states_screens/options_screen_device.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
@ -425,7 +425,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
sensed_input.m_device_id = deviceID;
sensed_input.m_button_id = button;
sensed_input.m_character = deviceID;
OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input);
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
return;
}
break;
@ -437,7 +437,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
sensed_input.m_device_id = deviceID;
sensed_input.m_button_id = button;
sensed_input.m_character = deviceID;
OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input);
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
return;
}
break;
@ -472,7 +472,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
: Input::AD_NEGATIVE;
sensed_input.m_axis_range = Input::AR_FULL;
sensed_input.m_character = deviceID;
OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input);
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
}
else m_sensed_input_high_gamepad.insert(input_id);
@ -494,7 +494,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
sensed_input.m_axis_range = id_was_zero ? Input::AR_HALF
: Input::AR_FULL;
sensed_input.m_character = deviceID;
OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input);
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
}
else if( inverse_id_was_high )
{
@ -510,7 +510,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
sensed_input.m_axis_range = id_was_zero ? Input::AR_HALF
: Input::AR_FULL;
sensed_input.m_character = deviceID;
OptionsScreenInput2::getInstance()->gotSensedInput(sensed_input);
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
}
else
{

View File

@ -20,7 +20,7 @@
#include "input/input.hpp"
#include "input/input_manager.hpp"
#include "states_screens/dialogs/press_a_key_dialog.hpp"
#include "states_screens/options_screen_input2.hpp"
#include "states_screens/options_screen_device.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;
@ -47,13 +47,13 @@ GUIEngine::EventPropagation PressAKeyDialog::processEvent(const std::string& eve
else if (eventSource == "assignNone")
{
Input simulatedInput;
OptionsScreenInput2::getInstance()->gotSensedInput(simulatedInput);
OptionsScreenDevice::getInstance()->gotSensedInput(simulatedInput);
return GUIEngine::EVENT_BLOCK;
}
else if (eventSource == "assignEsc")
{
Input simulatedInput(Input::IT_KEYBOARD, 0 /* deviceID */, KEY_ESCAPE);
OptionsScreenInput2::getInstance()->gotSensedInput(simulatedInput);
OptionsScreenDevice::getInstance()->gotSensedInput(simulatedInput);
return GUIEngine::EVENT_BLOCK;
}

View File

@ -72,7 +72,7 @@ bool MainMenuScreen::m_enable_online = false;
// ----------------------------------------------------------------------------
MainMenuScreen::MainMenuScreen() : Screen("main.stkgui")
MainMenuScreen::MainMenuScreen() : Screen("main_menu.stkgui")
{
} // MainMenuScreen

View File

@ -45,7 +45,7 @@ DEFINE_SCREEN_SINGLETON( NetworkingLobby );
// ----------------------------------------------------------------------------
NetworkingLobby::NetworkingLobby() : Screen("online/lobby.stkgui")
NetworkingLobby::NetworkingLobby() : Screen("online/network_lobby.stkgui")
{
m_server = NULL;
} // NetworkingLobby

View File

@ -15,7 +15,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "states_screens/options_screen_input2.hpp"
#include "states_screens/options_screen_device.hpp"
#include "config/user_config.hpp"
#include "guiengine/CGUISpriteBank.hpp"
@ -45,24 +45,24 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( OptionsScreenInput2 );
DEFINE_SCREEN_SINGLETON( OptionsScreenDevice );
// ----------------------------------------------------------------------------
OptionsScreenInput2::OptionsScreenInput2() : Screen("options_device.stkgui")
OptionsScreenDevice::OptionsScreenDevice() : Screen("options_device.stkgui")
{
m_config = NULL;
} // OptionsScreenInput2
} // OptionsScreenDevice
// ----------------------------------------------------------------------------
void OptionsScreenInput2::loadedFromFile()
void OptionsScreenDevice::loadedFromFile()
{
} // loadedFromFile
// ----------------------------------------------------------------------------
void OptionsScreenInput2::beforeAddingWidget()
void OptionsScreenDevice::beforeAddingWidget()
{
GUIEngine::ListWidget* w_list =
getWidget<GUIEngine::ListWidget>("actions");
@ -75,7 +75,7 @@ void OptionsScreenInput2::beforeAddingWidget()
// ----------------------------------------------------------------------------
void OptionsScreenInput2::init()
void OptionsScreenDevice::init()
{
Screen::init();
RibbonWidget* tabBar = getWidget<RibbonWidget>("options_choice");
@ -165,9 +165,9 @@ void OptionsScreenInput2::init()
// -----------------------------------------------------------------------------
void OptionsScreenInput2::addListItemSubheader(GUIEngine::ListWidget* actions,
const char* id,
const core::stringw& text)
void OptionsScreenDevice::addListItemSubheader(GUIEngine::ListWidget* actions,
const char* id,
const core::stringw& text)
{
std::vector<GUIEngine::ListWidget::ListCell> row;
row.push_back(GUIEngine::ListWidget::ListCell(text, -1, 1, false));
@ -177,8 +177,8 @@ void OptionsScreenInput2::addListItemSubheader(GUIEngine::ListWidget* actions,
// -----------------------------------------------------------------------------
void OptionsScreenInput2::addListItem(GUIEngine::ListWidget* actions,
PlayerAction pa)
void OptionsScreenDevice::addListItem(GUIEngine::ListWidget* actions,
PlayerAction pa)
{
std::vector<GUIEngine::ListWidget::ListCell> row;
core::stringw s(KartActionStrings[pa].c_str());
@ -189,10 +189,10 @@ void OptionsScreenInput2::addListItem(GUIEngine::ListWidget* actions,
// -----------------------------------------------------------------------------
void OptionsScreenInput2::renameRow(GUIEngine::ListWidget* actions,
int idRow,
const irr::core::stringw &translatedName,
PlayerAction action) const
void OptionsScreenDevice::renameRow(GUIEngine::ListWidget* actions,
int idRow,
const irr::core::stringw &translatedName,
PlayerAction action) const
{
actions->renameCell(idRow, 0, core::stringw(" ") + translatedName);
actions->renameCell(idRow, 1, m_config->getBindingAsString(action));
@ -201,7 +201,7 @@ void OptionsScreenInput2::renameRow(GUIEngine::ListWidget* actions,
// -----------------------------------------------------------------------------
void OptionsScreenInput2::updateInputButtons()
void OptionsScreenDevice::updateInputButtons()
{
assert(m_config != NULL);
@ -372,7 +372,7 @@ void OptionsScreenInput2::updateInputButtons()
static PlayerAction binding_to_set;
static std::string binding_to_set_button;
void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
void OptionsScreenDevice::gotSensedInput(const Input& sensed_input)
{
const bool keyboard = (m_config->isKeyboard() &&
sensed_input.m_type == Input::IT_KEYBOARD);
@ -384,7 +384,7 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
{
if (UserConfigParams::logMisc())
{
Log::info("OptionsScreenInput2", "Binding %s: setting to keyboard key %d",
Log::info("OptionsScreenDevice", "Binding %s: setting to keyboard key %d",
KartActionStrings[binding_to_set].c_str(), sensed_input.m_button_id);
}
@ -401,21 +401,21 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
{
if (UserConfigParams::logMisc())
{
Log::info("OptionsScreenInput2", "Binding %s: setting to gamepad #%d",
Log::info("OptionsScreenDevice", "Binding %s: setting to gamepad #%d",
KartActionStrings[binding_to_set].c_str(), sensed_input.m_device_id);
if (sensed_input.m_type == Input::IT_STICKMOTION)
{
Log::info("OptionsScreenInput2", "Axis %d; direction %s", sensed_input.m_button_id,
Log::info("OptionsScreenDevice", "Axis %d; direction %s", sensed_input.m_button_id,
sensed_input.m_axis_direction == Input::AD_NEGATIVE ? "-" : "+");
}
else if (sensed_input.m_type == Input::IT_STICKBUTTON)
{
Log::info("OptionsScreenInput2", "Button %d", sensed_input.m_button_id);
Log::info("OptionsScreenDevice", "Button %d", sensed_input.m_button_id);
}
else
{
Log::info("OptionsScreenInput2", "Sensed unknown gamepad event type??");
Log::info("OptionsScreenDevice", "Sensed unknown gamepad event type??");
}
}
@ -439,7 +439,7 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
{
if (UserConfigParams::logMisc())
{
Log::info("OptionsScreenInput2", "Binding %s: setting to keyboard key NONE",
Log::info("OptionsScreenDevice", "Binding %s: setting to keyboard key NONE",
KartActionStrings[binding_to_set].c_str());
}
@ -481,9 +481,9 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
// ----------------------------------------------------------------------------
void OptionsScreenInput2::eventCallback(Widget* widget,
const std::string& name,
const int playerID)
void OptionsScreenDevice::eventCallback(Widget* widget,
const std::string& name,
const int playerID)
{
//const std::string& screen_name = getName();
@ -529,7 +529,7 @@ void OptionsScreenInput2::eventCallback(Widget* widget,
// we found which one. show the "press a key" dialog.
if (UserConfigParams::logMisc())
{
Log::info("OptionsScreenInput2", "Entering sensing mode for %s",
Log::info("OptionsScreenDevice", "Entering sensing mode for %s",
m_config->getName().c_str());
}
@ -547,7 +547,7 @@ void OptionsScreenInput2::eventCallback(Widget* widget,
}
else
{
Log::error("OptionsScreenInput2", "Unknown selection device in options: %s",
Log::error("OptionsScreenDevice", "Unknown selection device in options: %s",
m_config->getName().c_str());
}
break;
@ -583,13 +583,13 @@ void OptionsScreenInput2::eventCallback(Widget* widget,
// -----------------------------------------------------------------------------
void OptionsScreenInput2::unloaded()
void OptionsScreenDevice::unloaded()
{
} // unloaded
// -----------------------------------------------------------------------------
bool OptionsScreenInput2::onEscapePressed()
bool OptionsScreenDevice::onEscapePressed()
{
StateManager::get()
->replaceTopMostScreen(OptionsScreenInput::getInstance());
@ -599,13 +599,13 @@ bool OptionsScreenInput2::onEscapePressed()
// -----------------------------------------------------------------------------
void OptionsScreenInput2::onConfirm()
void OptionsScreenDevice::onConfirm()
{
const bool success =
input_manager->getDeviceManager()->deleteConfig(m_config);
assert(success);
if (!success)
Log::error("OptionsScreenInput2", "Failed to delete config!");
Log::error("OptionsScreenDevice", "Failed to delete config!");
m_config = NULL;
input_manager->getDeviceManager()->save();
@ -617,8 +617,9 @@ void OptionsScreenInput2::onConfirm()
// -----------------------------------------------------------------------------
bool OptionsScreenInput2::conflictsBetweenKbdConfig(PlayerAction action,
PlayerAction from, PlayerAction to)
bool OptionsScreenDevice::conflictsBetweenKbdConfig(PlayerAction action,
PlayerAction from,
PlayerAction to)
{
KeyboardConfig* other_kbd_config;
int id = m_config->getBinding(action).getId();

View File

@ -16,8 +16,8 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef __HEADER_OPTIONS_SCREEN_INPUT2_HPP__
#define __HEADER_OPTIONS_SCREEN_INPUT2_HPP__
#ifndef HEADER_OPTIONS_SCREEN_DEVICE_HPP
#define HEADER_OPTIONS_SCREEN_DEVICE_HPP
#include <string>
#include <irrString.h>
@ -37,11 +37,11 @@ struct Input;
* \brief Input options screen
* \ingroup states_screens
*/
class OptionsScreenInput2 : public GUIEngine::Screen,
public GUIEngine::ScreenSingleton<OptionsScreenInput2>,
class OptionsScreenDevice : public GUIEngine::Screen,
public GUIEngine::ScreenSingleton<OptionsScreenDevice>,
public MessageDialog::IConfirmDialogListener
{
OptionsScreenInput2();
OptionsScreenDevice();
void updateInputButtons();
@ -62,7 +62,7 @@ class OptionsScreenInput2 : public GUIEngine::Screen,
const core::stringw& text);
public:
friend class GUIEngine::ScreenSingleton<OptionsScreenInput2>;
friend class GUIEngine::ScreenSingleton<OptionsScreenDevice>;
/** Sets the configuration to be used. */
void setDevice(DeviceConfig* config) { m_config = config; }

View File

@ -28,7 +28,7 @@
#include "input/gamepad_device.hpp"
#include "input/input_manager.hpp"
#include "io/file_manager.hpp"
#include "states_screens/options_screen_input2.hpp"
#include "states_screens/options_screen_device.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/options_screen_ui.hpp"
@ -225,8 +225,8 @@ void OptionsScreenInput::eventCallback(Widget* widget, const std::string& name,
read = sscanf( selection.c_str(), "gamepad%i", &i );
if (read == 1 && i != -1)
{
OptionsScreenInput2::getInstance()->setDevice( input_manager->getDeviceManager()->getGamepadConfig(i) );
StateManager::get()->replaceTopMostScreen(OptionsScreenInput2::getInstance());
OptionsScreenDevice::getInstance()->setDevice( input_manager->getDeviceManager()->getGamepadConfig(i) );
StateManager::get()->replaceTopMostScreen(OptionsScreenDevice::getInstance());
//updateInputButtons( input_manager->getDeviceList()->getGamepadConfig(i) );
}
else
@ -242,8 +242,9 @@ void OptionsScreenInput::eventCallback(Widget* widget, const std::string& name,
if (read == 1 && i != -1)
{
// updateInputButtons( input_manager->getDeviceList()->getKeyboardConfig(i) );
OptionsScreenInput2::getInstance()->setDevice( input_manager->getDeviceManager()->getKeyboardConfig(i) );
StateManager::get()->replaceTopMostScreen(OptionsScreenInput2::getInstance());
OptionsScreenDevice::getInstance()
->setDevice( input_manager->getDeviceManager()->getKeyboardConfig(i) );
StateManager::get()->replaceTopMostScreen(OptionsScreenDevice::getInstance());
}
else
{