mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Qt: Implement graphics window and controls
This commit is contained in:
28
Source/Core/DolphinQt2/Config/Graphics/GraphicsChoice.cpp
Normal file
28
Source/Core/DolphinQt2/Config/Graphics/GraphicsChoice.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "DolphinQt2/Config/Graphics/GraphicsChoice.h"
|
||||
|
||||
#include "Core/Config/Config.h"
|
||||
|
||||
GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigInfo<int>& setting)
|
||||
: m_setting(setting)
|
||||
{
|
||||
addItems(options);
|
||||
connect(this, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&GraphicsChoice::Update);
|
||||
setCurrentIndex(Config::Get(m_setting));
|
||||
|
||||
if (Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base)
|
||||
{
|
||||
QFont bf = font();
|
||||
bf.setBold(true);
|
||||
setFont(bf);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsChoice::Update(int choice)
|
||||
{
|
||||
Config::SetBaseOrCurrent(m_setting, choice);
|
||||
}
|
Reference in New Issue
Block a user