mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:40:04 +00:00 
			
		
		
		
	Add audio settings
This commit is contained in:
		
							parent
							
								
									9486d2364a
								
							
						
					
					
						commit
						ec97231bca
					
				
					 6 changed files with 206 additions and 3 deletions
				
			
		
							
								
								
									
										20
									
								
								scwx-qt/source/scwx/qt/settings/settings_definitions.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								scwx-qt/source/scwx/qt/settings/settings_definitions.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #define SCWX_SETTINGS_ENUM_VALIDATOR(Type, Iterator, ToName)                   \ | ||||
|    [](const std::string& value)                                                \ | ||||
|    {                                                                           \ | ||||
|       for (Type enumValue : Iterator)                                          \ | ||||
|       {                                                                        \ | ||||
|          /* If the value is equal to a lower case name */                      \ | ||||
|          std::string enumName = ToName(enumValue);                             \ | ||||
|          boost::to_lower(enumName);                                            \ | ||||
|          if (value == enumName)                                                \ | ||||
|          {                                                                     \ | ||||
|             /* Regard as a match, valid */                                     \ | ||||
|             return true;                                                       \ | ||||
|          }                                                                     \ | ||||
|       }                                                                        \ | ||||
|                                                                                \ | ||||
|       /* No match found, invalid */                                            \ | ||||
|       return false;                                                            \ | ||||
|    } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat