iw4x-client/src/Components/Modules/Console.hpp

64 lines
1.4 KiB
C++
Raw Normal View History

2016-01-17 06:31:56 -05:00
#define OUTPUT_HEIGHT 250
#define OUTPUT_MAX_TOP (OUTPUT_HEIGHT - (Console::Height - 2))
2015-12-23 08:45:53 -05:00
namespace Components
{
class Console : public Component
{
public:
Console();
2016-08-15 10:40:30 -04:00
~Console();
#ifdef DEBUG
2015-12-23 08:45:53 -05:00
const char* GetName() { return "Console"; };
2016-08-15 10:40:30 -04:00
#endif
2015-12-23 08:45:53 -05:00
private:
static void ToggleConsole();
2015-12-27 08:05:08 -05:00
static char** GetAutoCompleteFileList(const char *path, const char *extension, Game::FsListBehavior_e behavior, int *numfiles, int allocTrackType);
2016-01-17 06:31:56 -05:00
private:
// Text-based console stuff
static WINDOW* OutputWindow;
static WINDOW* InputWindow;
static WINDOW* InfoWindow;
static int Width;
static int Height;
static int OutputTop;
static int OutBuffer;
static int LastRefresh;
static char LineBuffer[1024];
static char LineBuffer2[1024];
static int LineBufferIndex;
static bool HasConsole;
2016-03-10 06:41:02 -05:00
static std::thread ConsoleThread;
2016-06-15 06:04:54 -04:00
static Game::SafeArea OriginalSafeArea;
2016-01-17 06:31:56 -05:00
static void ShowPrompt();
static void RefreshStatus();
static void RefreshOutput();
static void ScrollOutput(int amount);
static const char* Input();
static void Print(const char* message);
static void Error(const char* format, ...);
static void Create();
static void Destroy();
2016-03-10 06:41:02 -05:00
2016-03-10 15:15:58 -05:00
static void StdOutPrint(const char* message);
static void StdOutError(const char* format, ...);
2016-03-10 06:41:02 -05:00
static void ConsoleRunner();
2016-06-15 06:04:54 -04:00
static void DrawSolidConsoleStub();
static void StoreSafeArea();
static void RestoreSafeArea();
2015-12-23 08:45:53 -05:00
};
}