Advertisement
Koridev

Untitled

Jan 7th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #pragma once
  2. #ifndef H_GLOBALS
  3. #define H_GLOABLS
  4. #include <stdio.h>
  5. #include <iostream>
  6. #include <string>
  7. #include <chrono>
  8. #include <thread>
  9. #include "ConfigFile.h"
  10. enum
  11. {
  12.     LANG,
  13.     SELECT
  14. };
  15. class SleepTime {
  16.     public:
  17.         SleepTime iSleep(int time) {
  18.             std::this_thread::sleep_for(std::chrono::seconds(time));
  19.         }
  20. };
  21.  
  22. class SelectLang {
  23. public:
  24.  
  25.     SelectLang() {
  26.         ConfigFile cf("config.txt");
  27.     std::string slang;
  28.     slang = (const std::string)cf.Value("Main_Setting", "LANG");
  29.         _Lang[LANG] = slang;
  30.  
  31.  
  32.     }
  33.     ~SelectLang() = default;
  34.  
  35.     const std::string& IsLang() const { return _Lang[LANG]; }
  36. private:
  37.     std::array<std::string, SELECT> _Lang;
  38. };
  39.  
  40. // Test
  41. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement