mirror of
https://github.com/edo9300/edopro
synced 2026-08-23 22:26:05 -04:00
Revamp the settings window by using the new windowed tab widget, split the various options in subcategories to keep them more organized. Now every config that before was only modifiable my manually editing the config file should be changeable in game as well. Probably will need other cleanups down the line to make things look nicer, but for now it's enough to merge.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#include "settings_window.h"
|
|
#include <IGUIEnvironment.h>
|
|
#include <IGUICheckBox.h>
|
|
#include <IGUIScrollBar.h>
|
|
#include <IGUIStaticText.h>
|
|
#include "ResizeablePanel/ResizeablePanel.h"
|
|
#include "CGUIWindowedTabControl/CGUIWindowedTabControl.h"
|
|
|
|
namespace ygo {
|
|
|
|
void SettingsPane::DisableAudio() {
|
|
chkEnableSound->setVisible(false);
|
|
stSoundVolume->setVisible(false);
|
|
scrSoundVolume->setVisible(false);
|
|
chkEnableMusic->setVisible(false);
|
|
stMusicVolume->setVisible(false);
|
|
scrMusicVolume->setVisible(false);
|
|
stNoAudioBackend->setVisible(true);
|
|
}
|
|
|
|
void SettingsWindow::DisableAudio() {
|
|
chkEnableSound->setVisible(false);
|
|
stSoundVolume->setVisible(false);
|
|
scrSoundVolume->setVisible(false);
|
|
chkEnableMusic->setVisible(false);
|
|
stMusicVolume->setVisible(false);
|
|
scrMusicVolume->setVisible(false);
|
|
chkLoopMusic->setVisible(false);
|
|
stNoAudioBackend->setVisible(true);
|
|
}
|
|
|
|
void SettingsWindow::SettingsTab::construct(irr::gui::IGUIEnvironment* env, irr::gui::CGUIWindowedTabControl* tabControl, const wchar_t* name) {
|
|
tab = tabControl->addTab(name);
|
|
panel = irr::gui::Panel::addPanel(env, tab, -1, tabControl->getClientRect(), true, false);
|
|
}
|
|
}
|