21 static bool AutoScroll;
22 static std::shared_ptr<spdlog::logger> s_MesaCoreLogger;
23 static std::shared_ptr<spdlog::logger> s_MesaClientLogger;
24 static std::shared_ptr<spdlog::pattern_formatter> s_MesaLogFormatter;
36 LineOffsets.push_back(0);
39 static void AddLog(
const char* fmt, ...)
41 int cacheSize = TextBuffer.size();
44 TextBuffer.appendfv(fmt, args);
47 for (
int newSize = TextBuffer.size(); cacheSize < newSize; cacheSize++)
49 if (TextBuffer[cacheSize] ==
'\n')
51 LineOffsets.push_back(cacheSize + 1);
56 static void Draw(
const char* title,
bool* pOpen =
nullptr)
58 if (!KarmaGui::Begin(title, pOpen))
65 if (KarmaGui::BeginPopup(
"Options"))
67 KarmaGui::Checkbox(
"Auto-scroll", &AutoScroll);
72 if (KarmaGui::Button(
"Options"))
74 KarmaGui::OpenPopup(
"Options");
78 bool clear = KarmaGui::Button(
"Clear");
80 bool copy = KarmaGui::Button(
"Copy");
83 TextFilter.Draw(
"Filter", -100.0f);
85 KarmaGui::Separator();
86 KarmaGui::BeginChild(
"scrolling",
KGVec2(0, 0),
false, KGGuiWindowFlags_HorizontalScrollbar);
94 KarmaGui::LogToClipboard();
97 KarmaGui::PushStyleVar(KGGuiStyleVar_ItemSpacing,
KGVec2(0, 0));
99 const char* buAlpha = TextBuffer.begin();
100 const char* buOmega = TextBuffer.end();
102 if (TextFilter.IsActive())
108 for (
int lineNumber = 0; lineNumber < LineOffsets.Size; lineNumber++)
110 const char* lineStart = buAlpha + LineOffsets[lineNumber];
111 const char* lineEnd = (lineNumber + 1 < LineOffsets.Size) ? (buAlpha + LineOffsets[lineNumber + 1] - 1) : buOmega;
112 if (TextFilter.PassFilter(lineStart, lineEnd))
114 KarmaGui::TextUnformatted(lineStart, lineEnd);
134 clipper.Begin(LineOffsets.Size);
136 while (clipper.Step())
138 for (
int lineNumber = clipper.DisplayStart; lineNumber < clipper.DisplayEnd; lineNumber++)
140 const char* lineStart = buAlpha + LineOffsets[lineNumber];
141 const char* lineEnd = (lineNumber + 1 < LineOffsets.Size) ? (buAlpha + LineOffsets[lineNumber + 1] - 1) : buOmega;
142 KarmaGui::TextUnformatted(lineStart, lineEnd);
147 KarmaGui::PopStyleVar();
149 if (AutoScroll && KarmaGui::GetScrollY() >= KarmaGui::GetScrollMaxY())
151 KarmaGui::SetScrollHereY(1.0f);
154 KarmaGui::EndChild();
179 std::string biosVendorName;
180 std::string biosVersion;
181 std::string biosReleaseDate;
182 std::string biosCharacteristics;
183 std::string biosROMSize;
184 std::string biosCurrentSetLanguage;
185 std::string biosRestOfTheSupportedLanguages;
188 uint32_t numberOfMemoryDevices;
192 std::string estimatedCapacity;
193 std::string supportingArea;
197 std::string formFactor;
201 std::string bankLocator;
202 std::string manufacturer;
204 std::string serialNumber;
205 std::string partNumber;
206 std::string assetTag;
208 std::string memorySpeed;
209 std::string configuredMemorySpeed;
211 std::string operatingVoltage;
219 std::vector<uint32_t> ramSoftSlots;
221 uint32_t totalRamSize;
222 std::string ramSizeDimensions;
226 std::string cpuDesignation;
228 std::string cpuProcessingfamily;
229 std::string cpuManufacturer;
230 std::string cpuFlags;
232 std::string cpuVersion;
234 std::string cpuOperatingVoltage;
235 std::string cpuExternalClock;
236 std::string cpuMaximumSpeed;
237 std::string cpuCurrentSpeed;
240 std::string cpuSerialNumber;
241 std::string cpuPartNumber;
242 std::string cpuAssettag;
244 std::string cpuCorescount;
245 std::string cpuEnabledCoresCount;
246 std::string cpuThreadCount;
247 std::string cpuTheCharacterstics;
251 std::string cpuSignature;
255 std::string gpuVendor;
256 std::string gpuModelIdentification;
257 std::string gpuVMemory;
262 numberOfMemoryDevices = 0;
263 ramInformation =
nullptr;
269 static void GaugeSystemMemoryDevices(random_access_memory* ramCluster);
272 static void FindRealCapacityOfRam();
275 static bool IsPhysicalRamPresent(
const random_access_memory& ramScam);
278 static void FillTheSystemRamStructure(SystemRAM& destinationStructure, random_access_memory& sourceStructure);
317 static void RevealMainFrame(KGGuiID mainMesaDockID, std::shared_ptr<Scene> scene,
const CallbacksFromEditor& editorCallbacks);
318 static void DrawKarmaMainMenuBarMesa();
319 static void DrawMainMenuFileListMesa();
320 static void DrawKarmaLogMesa(KGGuiID mainMesaDockID);
321 static void DrawKarmaSceneHierarchyPanelMesa();
322 static void Draw3DModelExhibitorMesa(std::shared_ptr<Scene> scene);
323 static void DrawContentBrowser(
const std::function<
void(std::string) >& openSceneCallback);
324 static void DrawMemoryExhibitor();
327 static void ShowAboutKarmaMesa(
bool* pbOpen);
330 static void MesaShutDownRoutine();
339 static void SetElectronicsRamInformationToNull();
342 static int ImStrlenW(
const KGWchar* str);
343 static void QueryForTuringMachineElectronics();
344 static uint32_t ChernUint32FromString(
const std::string& ramString);
345 static std::string ChernDimensionsFromString(
const std::string& ramString);
346 static double HexStringToDecimal(
const std::string& hexString);
349 static void DumpUObjectStatistics(
void* InObject,
const std::string& InName,
size_t InSize,
size_t InAlignment,
class UClass* InClass);
352 static std::string notAvailableText;
359 static bool m_EditorInitialized;
360 static bool m_RefreshRenderingResources;
363 static std::filesystem::path m_CurrentDirectory;
366 static uint32_t m_DirectoryIcon;
367 static uint32_t m_FileIcon;
373 static bool m_ViewportFocused;
374 static bool m_ViewportHovered;
Definition KarmaGui.h:2236
Definition KarmaGui.h:2209