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