2016-05-04 19:24:41 +02:00
|
|
|
/*****************************************************************************
|
2024-01-01 05:52:28 -06:00
|
|
|
* Copyright (c) 2014-2024 OpenRCT2 developers
|
2016-05-04 19:24:41 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2016-05-04 19:24:41 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2016-05-04 19:24:41 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2018-03-11 18:15:44 +00:00
|
|
|
#pragma once
|
2015-05-19 03:53:37 +01:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
#include "../localisation/FormatCodes.h"
|
|
|
|
|
|
2024-07-12 23:24:33 +02:00
|
|
|
#include <cstdint>
|
2018-03-11 18:15:44 +00:00
|
|
|
#include <string>
|
2015-05-19 03:53:37 +01:00
|
|
|
|
2023-01-19 08:16:44 +00:00
|
|
|
struct DrawPixelInfo;
|
2018-03-11 21:12:22 +00:00
|
|
|
struct TextInputSession;
|
2018-03-13 13:14:02 +01:00
|
|
|
|
2020-10-01 03:31:03 -06:00
|
|
|
enum class ConsoleInput : uint8_t
|
2017-06-10 16:10:23 +01:00
|
|
|
{
|
2020-10-01 03:31:03 -06:00
|
|
|
None,
|
|
|
|
|
LineClear,
|
|
|
|
|
LineExecute,
|
|
|
|
|
HistoryPrevious,
|
|
|
|
|
HistoryNext,
|
|
|
|
|
ScrollPrevious,
|
|
|
|
|
ScrollNext,
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2017-06-10 16:10:23 +01:00
|
|
|
|
2018-03-11 19:46:03 +00:00
|
|
|
class InteractiveConsole
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-06-22 22:59:46 +02:00
|
|
|
virtual ~InteractiveConsole()
|
|
|
|
|
{
|
|
|
|
|
}
|
2018-03-11 19:46:03 +00:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
void Execute(const std::string& s);
|
|
|
|
|
void WriteLine(const std::string& s);
|
|
|
|
|
void WriteLineError(const std::string& s);
|
|
|
|
|
void WriteLineWarning(const std::string& s);
|
|
|
|
|
void WriteFormatLine(const char* format, ...);
|
2018-03-11 19:46:03 +00:00
|
|
|
|
2024-07-09 15:17:07 +02:00
|
|
|
virtual void Clear() = 0;
|
|
|
|
|
virtual void Close() = 0;
|
|
|
|
|
virtual void Hide() = 0;
|
|
|
|
|
virtual void WriteLine(const std::string& s, FormatToken colourFormat) = 0;
|
2018-03-11 19:46:03 +00:00
|
|
|
};
|