mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt: Move Free Look out of Graphics/Hotkey and into its own configuration window. Launched from a new menu option - "Free Look Settings". The HotKeyScheduler still calls the Free Look functionality to reduce the total number of threads
This commit is contained in:
48
Source/Core/DolphinQt/Config/Mapping/FreeLookGeneral.cpp
Normal file
48
Source/Core/DolphinQt/Config/Mapping/FreeLookGeneral.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright 2020 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "DolphinQt/Config/Mapping/FreeLookGeneral.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
|
||||
#include "Core/FreeLookManager.h"
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
FreeLookGeneral::FreeLookGeneral(MappingWindow* window) : MappingWidget(window)
|
||||
{
|
||||
CreateMainLayout();
|
||||
}
|
||||
|
||||
void FreeLookGeneral::CreateMainLayout()
|
||||
{
|
||||
auto* layout = new QGridLayout;
|
||||
|
||||
layout->addWidget(
|
||||
CreateGroupBox(tr("Move"), FreeLook::GetInputGroup(GetPort(), FreeLookGroup::Move)), 0, 0);
|
||||
layout->addWidget(
|
||||
CreateGroupBox(tr("Speed"), FreeLook::GetInputGroup(GetPort(), FreeLookGroup::Speed)), 0, 1);
|
||||
layout->addWidget(CreateGroupBox(tr("Field of View"),
|
||||
FreeLook::GetInputGroup(GetPort(), FreeLookGroup::FieldOfView)),
|
||||
0, 2);
|
||||
layout->addWidget(
|
||||
CreateGroupBox(tr("Other"), FreeLook::GetInputGroup(GetPort(), FreeLookGroup::Other)), 0, 3);
|
||||
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void FreeLookGeneral::LoadSettings()
|
||||
{
|
||||
FreeLook::LoadInputConfig();
|
||||
}
|
||||
|
||||
void FreeLookGeneral::SaveSettings()
|
||||
{
|
||||
FreeLook::GetInputConfig()->SaveConfig();
|
||||
}
|
||||
|
||||
InputConfig* FreeLookGeneral::GetConfig()
|
||||
{
|
||||
return FreeLook::GetInputConfig();
|
||||
}
|
Reference in New Issue
Block a user