From f18eac2ac2e5760a4cb81784ad2f23f91b6643d6 Mon Sep 17 00:00:00 2001 From: bd Date: Fri, 18 Apr 2025 23:33:12 -0400 Subject: Ensure program is cleared upon load. --- gui/messages.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gui/messages.h (limited to 'gui/messages.h') diff --git a/gui/messages.h b/gui/messages.h new file mode 100644 index 0000000..84b8318 --- /dev/null +++ b/gui/messages.h @@ -0,0 +1,33 @@ +#ifndef MESSAGES_H +#define MESSAGES_H +#include +#include + +/** + * Humorous computer speak. + */ +#define RANDOM_MESSAGE(v) (v[std::rand() % v.size()]) + +const std::vector waiting = { + "WAITING FOR USER", "FRIENDS MISSING", "BORED", "SLEEPING"}; +const std::vector bad_file = { + "BAD FILE", "TRY AGAIN", "SEEKING NEW READING MATERIAL"}; +const std::vector load_file = { + "FILE LOADED", "FINISHED READING DATA. EAGERLY WAITING"}; + +/** + * @return a random waiting message + */ +std::string get_waiting() { return RANDOM_MESSAGE(waiting); } + +/** + * @return a complaint about a bad file name + */ +std::string get_bad_file() { return RANDOM_MESSAGE(bad_file); } + +/** + * @return confirmation of file upload + */ +std::string get_load_file() { return RANDOM_MESSAGE(load_file); } + +#endif // MESSAGES_H -- cgit v1.2.3