move ui_rand to cDialog

This commit is contained in:
2024-08-08 12:31:18 -05:00
committed by Celtic Minstrel
parent fc12092a1b
commit f01fdb7e2a
4 changed files with 3 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ const short cDialog::BG_DARK = 5, cDialog::BG_LIGHT = 16;
short cDialog::defaultBackground = cDialog::BG_DARK;
cDialog* cDialog::topWindow = nullptr;
void (*cDialog::redraw_everything)() = nullptr;
std::mt19937 cDialog::ui_rand;
std::string cDialog::generateRandomString(){
// Not bothering to seed, because it doesn't actually matter if it's truly random.

View File

@@ -20,6 +20,7 @@
#include <exception>
#include <functional>
#include <deque>
#include <random>
#include "ticpp.h"
#include "dialogxml/keycodes.hpp"
@@ -70,6 +71,7 @@ class cDialog {
std::vector<std::pair<std::string,cTextField*>> tabOrder;
static cDialog* topWindow; // Tracks the frontmost dialog.
static bool initCalled;
static std::mt19937 ui_rand;
public:
static void (*redraw_everything)();
/// Performs essential startup initialization. Generally should not be called directly.