1 /* 2 * This file is part of the Colobot: Gold Edition source code 3 * Copyright (C) 2001-2020, Daniel Roux, EPSITEC SA & TerranovaTeam 4 * http://epsitec.ch; http://colobot.info; http://github.com/colobot 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see http://gnu.org/licenses 18 */ 19 20 /** 21 * \file common/restext.h 22 * \brief Translation and string resource utilities 23 */ 24 25 #pragma once 26 27 28 #include <string> 29 30 31 /** 32 * \enum ResType 33 * \brief Types of text resources 34 */ 35 enum ResType 36 { 37 RES_TEXT = 0, //! < RT_* 38 RES_EVENT = 1, //! < EVENT_* (EventMsg) 39 RES_OBJECT = 2, //! < OBJECT_* (ObjectType) 40 RES_ERR = 3, //! < ERR_* (Error) 41 RES_KEY = 4, //! < KEY() (keys) 42 RES_CBOT = 5, //! < TX_* (CBot) 43 }; 44 45 /** 46 * \enum ResTextType 47 * \brief Text resources available for translation 48 */ 49 enum ResTextType 50 { 51 RT_WINDOW_MAXIMIZED = 3, 52 RT_WINDOW_MINIMIZED = 4, 53 RT_WINDOW_STANDARD = 5, 54 RT_WINDOW_CLOSE = 6, 55 56 RT_STUDIO_TITLE = 10, 57 RT_SCRIPT_NEW = 20, 58 RT_NAME_DEFAULT = 21, 59 RT_IO_NEW = 22, 60 RT_KEY_OR = 23, 61 62 RT_TITLE_APPNAME = 40, 63 RT_TITLE_TRAINER = 42, 64 RT_TITLE_DEFI = 43, 65 RT_TITLE_MISSION = 44, 66 RT_TITLE_FREE = 45, 67 RT_TITLE_CODE_BATTLES = 46, 68 RT_TITLE_SETUP = 47, 69 RT_TITLE_NAME = 48, 70 RT_TITLE_PERSO = 49, 71 RT_TITLE_WRITE = 50, 72 RT_TITLE_READ = 51, 73 RT_TITLE_USER = 52, 74 RT_TITLE_PLUS = 53, 75 RT_TITLE_MODS = 54, 76 77 RT_PLAY_CHAP_CHAPTERS = 60, 78 RT_PLAY_CHAP_PLANETS = 61, 79 RT_PLAY_CHAP_USERLVL = 62, 80 RT_PLAY_LIST_LEVELS = 63, 81 RT_PLAY_LIST_EXERCISES = 64, 82 RT_PLAY_LIST_CHALLENGES = 65, 83 RT_PLAY_LIST_MISSIONS = 66, 84 RT_PLAY_LIST_FREEGAME = 67, 85 RT_PLAY_RESUME = 68, 86 87 RT_SETUP_MODE = 81, 88 RT_SETUP_KEY1 = 82, 89 RT_SETUP_KEY2 = 83, 90 91 RT_PERSO_FACE = 90, 92 RT_PERSO_GLASSES = 91, 93 RT_PERSO_HAIR = 92, 94 RT_PERSO_COMBI = 93, 95 RT_PERSO_BAND = 94, 96 97 RT_DIALOG_ABORT = 103, 98 RT_DIALOG_CONTINUE = 104, 99 RT_DIALOG_DELOBJ = 105, 100 RT_DIALOG_DELGAME = 106, 101 RT_DIALOG_YES = 107, 102 RT_DIALOG_NO = 108, 103 RT_DIALOG_LOADING = 109, 104 RT_DIALOG_OK = 110, 105 RT_DIALOG_NOUSRLVL_TITLE = 111, 106 RT_DIALOG_NOUSRLVL_TEXT = 112, 107 RT_DIALOG_OPEN_PATH_FAILED_TITLE = 113, 108 RT_DIALOG_OPEN_PATH_FAILED_TEXT = 114, 109 RT_DIALOG_OPEN_WEBSITE_FAILED_TITLE = 115, 110 RT_DIALOG_OPEN_WEBSITE_FAILED_TEXT = 116, 111 RT_DIALOG_CHANGES_QUESTION = 117, 112 113 RT_STUDIO_LISTTT = 120, 114 RT_STUDIO_COMPOK = 121, 115 RT_STUDIO_PROGSTOP = 122, 116 RT_STUDIO_CLONED = 123, 117 118 RT_PROGRAM_READONLY = 130, 119 RT_PROGRAM_EXAMPLE = 131, 120 121 RT_IO_OPEN = 150, 122 RT_IO_SAVE = 151, 123 RT_IO_LIST = 152, 124 RT_IO_NAME = 153, 125 RT_IO_DIR = 154, 126 RT_IO_PRIVATE = 155, 127 RT_IO_PUBLIC = 156, 128 RT_IO_REPLACE = 157, 129 RT_IO_SELECT_DIR = 158, 130 131 RT_GENERIC_DEV1 = 170, 132 RT_GENERIC_DEV2 = 171, 133 RT_GENERIC_EDIT1 = 172, 134 RT_GENERIC_EDIT2 = 173, 135 136 RT_INTERFACE_REC = 180, 137 138 RT_LOADING_INIT = 210, 139 RT_LOADING_PROCESSING = 211, 140 RT_LOADING_LEVEL_SETTINGS = 212, 141 RT_LOADING_MUSIC = 213, 142 RT_LOADING_TERRAIN = 214, 143 RT_LOADING_OBJECTS = 215, 144 RT_LOADING_OBJECTS_SAVED = 216, 145 RT_LOADING_CBOT_SAVE = 218, 146 RT_LOADING_FINISHED = 219, 147 RT_LOADING_TERRAIN_RELIEF = 220, 148 RT_LOADING_TERRAIN_RES = 221, 149 RT_LOADING_TERRAIN_TEX = 222, 150 RT_LOADING_TERRAIN_GEN = 223, 151 152 RT_SCOREBOARD_RESULTS = 230, 153 RT_SCOREBOARD_RESULTS_TEXT= 231, 154 RT_SCOREBOARD_RESULTS_TIME= 232, 155 RT_SCOREBOARD_RESULTS_LINE= 233, 156 157 RT_MOD_LIST = 234, 158 RT_MOD_DETAILS = 235, 159 RT_MOD_SUMMARY = 236, 160 RT_MOD_ENABLE = 237, 161 RT_MOD_DISABLE = 238, 162 RT_MOD_UNKNOWN_AUTHOR = 239, 163 RT_MOD_AUTHOR_FIELD_NAME = 240, 164 RT_MOD_VERSION_FIELD_NAME = 241, 165 RT_MOD_WEBSITE_FIELD_NAME = 242, 166 RT_MOD_CHANGES_FIELD_NAME = 243, 167 RT_MOD_NO_SUMMARY = 244, 168 RT_MOD_NO_CHANGES = 245, 169 170 RT_MAX //! < number of values 171 }; 172 173 174 // TODO: move to CRobotMain 175 176 void InitializeRestext(); 177 178 void SetGlobalGamerName(std::string name); 179 bool GetResource(ResType type, unsigned int num, std::string& text); 180