mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	reset tutorial button
This commit is contained in:
		| @@ -33,6 +33,7 @@ namespace Helper | ||||
| void loadSettings() | ||||
| { | ||||
| 	settings.init("config/settings.json", "vcmi:settings"); | ||||
| 	persistentStorage.init("config/persistentStorage.json", ""); | ||||
| } | ||||
|  | ||||
| void enableScrollBySwiping(QObject * scrollTarget) | ||||
|   | ||||
| @@ -90,6 +90,12 @@ void CSettingsView::loadSettings() | ||||
| #ifdef VCMI_MOBILE | ||||
| 	ui->comboBoxFullScreen->hide(); | ||||
| 	ui->labelFullScreen->hide(); | ||||
|  | ||||
| 	if(!persistentStorage["gui"]["tutorialCompleted0"].Bool() && !persistentStorage["gui"]["tutorialCompleted1"].Bool()) | ||||
| 	{ | ||||
| 		ui->labelResetTutorialTouchscreen->hide(); | ||||
| 		ui->pushButtonResetTutorialTouchscreen->hide();		 | ||||
| 	} | ||||
| #else | ||||
| 	ui->labelReservedArea->hide(); | ||||
| 	ui->sliderReservedArea->hide(); | ||||
| @@ -99,6 +105,8 @@ void CSettingsView::loadSettings() | ||||
| 	ui->labelRelativeCursorSpeed->hide(); | ||||
| 	ui->buttonHapticFeedback->hide(); | ||||
| 	ui->labelHapticFeedback->hide(); | ||||
| 	ui->labelResetTutorialTouchscreen->hide(); | ||||
| 	ui->pushButtonResetTutorialTouchscreen->hide(); | ||||
| 	if (settings["video"]["realFullscreen"].Bool()) | ||||
| 		ui->comboBoxFullScreen->setCurrentIndex(2); | ||||
| 	else | ||||
| @@ -525,6 +533,16 @@ void CSettingsView::on_pushButtonTranslation_clicked() | ||||
| 	} | ||||
| } | ||||
|  | ||||
| void CSettingsView::on_pushButtonResetTutorialTouchscreen_clicked() | ||||
| { | ||||
| 	Settings node0 = persistentStorage.write["gui"]["tutorialCompleted0"]; | ||||
| 	node0->Bool() = false; | ||||
| 	Settings node1 = persistentStorage.write["gui"]["tutorialCompleted1"]; | ||||
| 	node1->Bool() = false; | ||||
|  | ||||
| 	ui->pushButtonResetTutorialTouchscreen->hide(); | ||||
| } | ||||
|  | ||||
| void CSettingsView::on_buttonRepositoryDefault_toggled(bool value) | ||||
| { | ||||
| 	Settings node = settings.write["launcher"]["defaultRepositoryEnabled"]; | ||||
|   | ||||
| @@ -49,6 +49,7 @@ private slots: | ||||
| 	void on_comboBoxLanguage_currentIndexChanged(int index); | ||||
| 	void on_buttonCursorType_toggled(bool value); | ||||
| 	void on_pushButtonTranslation_clicked(); | ||||
| 	void on_pushButtonResetTutorialTouchscreen_clicked(); | ||||
| 	void on_buttonRepositoryDefault_toggled(bool value); | ||||
| 	void on_buttonRepositoryExtra_toggled(bool value); | ||||
| 	void on_lineEditRepositoryExtra_textEdited(const QString &arg1); | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user