mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Define touchscreen mode at first launch
This commit is contained in:
parent
52b53ab307
commit
3e6a656e4c
@ -102,6 +102,7 @@ void FirstLaunchView::on_comboBoxLanguage_currentIndexChanged(int index)
|
||||
|
||||
void FirstLaunchView::enterSetup()
|
||||
{
|
||||
setupPlatformSettings();
|
||||
Languages::fillLanguages(ui->listWidgetLanguage, false);
|
||||
}
|
||||
|
||||
@ -158,6 +159,19 @@ void FirstLaunchView::exitSetup()
|
||||
mainWindow->exitSetup();
|
||||
}
|
||||
|
||||
// Initial platform-dependend settings
|
||||
void FirstLaunchView::setupPlatformSettings()
|
||||
{
|
||||
#if defined(VCMI_MOBILE)
|
||||
bool touchscreenMode = true;
|
||||
#else
|
||||
bool touchscreenMode = false
|
||||
#endif
|
||||
|
||||
Settings node = settings.write["battle"]["touchscreenMode"];
|
||||
node->Bool() = touchscreenMode;
|
||||
}
|
||||
|
||||
// Tab Language
|
||||
void FirstLaunchView::languageSelected(const QString & selectedLanguage)
|
||||
{
|
||||
|
@ -37,6 +37,9 @@ class FirstLaunchView : public QWidget
|
||||
void activateTabHeroesData();
|
||||
void activateTabModPreset();
|
||||
void exitSetup();
|
||||
|
||||
// Initial platform-dependend settings
|
||||
void setupPlatformSettings();
|
||||
|
||||
// Tab Language
|
||||
void languageSelected(const QString & languageCode);
|
||||
|
Loading…
Reference in New Issue
Block a user