Rise
The Vieneo Province
Loading...
Searching...
No Matches
ConfigurationDialog.cpp
Go to the documentation of this file.
2
3#include <algorithm>
4#include <bass.h>
5#include <bass_fx.h>
6
7#include "../gui.h"
8#include "../Networking.h"
11#include "../GameClass.h"
13#include "RakNetStatistics.h"
14#include "GetTime.h"
15#include "InformationDialog.h"
16
18{
19 logger->AddToCallStack("ConfigurationDialog::ctor");
20 usesHUD = true;
21 HUD.Init(&gui->g_DialogResourceManager, true, L"Textures\\GUI\\dxutcontrols.png");
24
25 RECT rect; rect.left = rect.right = 0; rect.top = rect.bottom = -1;
26 gui->g_pFont->DrawTextW(gui->g_pTextSprite, L"汉", 1, &rect, DT_CALCRECT, 0L);
27 char msg[99];
28 sprintf_s(msg, sizeof msg, "East Asian Support Text: %i", rect.right);
29 logger->Log(msg);
30 //if (rect.right == 12)
31 gui->eastasian = true;
32 //else
33 // gui->eastasian = false;
34
35 normalinterlace = false;
37 defaultwidth = 640;
39
40 tabs = 7; // this gets saved
48
49 icon = 14;
51 allowresize = false;
52 allowscroll = false;
53}
54
56{
57 logger->AddToCallStack("ConfigurationDialog::UpdateMenu");
58
60 {
61 logger->Log("ConfigurationDialog::UpdateMenu activetab was out-of-bounds", Logger::Level::Debug);
62 activetab = 0;
63 }
64
67
68 logger->AddToCallStack("ConfigurationDialog::UpdateMenu DONE");
69}
70
72{
73 auto* host = Rendering::ClientHost();
74 if (!host) return;
75 const auto check = [&](int id, bool value) {
76 if (auto* radio = HUD.GetRadioButton(id)) radio->SetChecked(value, false);
77 };
78 check(DXUTSETTINGSDLG_WINDOWED, !host->Fullscreen());
79 check(DXUTSETTINGSDLG_FULLSCREEN, host->Fullscreen());
80 const unsigned samples = host->Device().Depth().Description().SampleDesc.Count;
81 for (unsigned i = 0; i < 4; ++i)
82 {
83 if (auto* radio = HUD.GetRadioButton(IDC_VIDEO_MSAA_OFF + i))
84 {
85 radio->SetEnabled(host->Device().SupportsSamples(1u << i));
86 radio->SetChecked(samples == (1u << i), false);
87 }
88 }
89 check(IDC_VIDEO_VSYNC_ON, host->VSync());
90 check(IDC_VIDEO_VSYNC_OFF, !host->VSync());
91 if (auto* status = HUD.GetStatic(IDC_VIDEO_STATUS))
92 status->SetText(videoStatus.empty() ? L"Changes apply immediately and are saved for next time." : videoStatus.c_str());
93}
94
95void ConfigurationDialog::ShowStatus(InputConfig* input_config, int y, RiseMath::Vector3* tracked, bool engine) const
96{
97 RECT rect;
98 rect.top = static_cast<LONG>(y + tracked->y);
99 rect.left = static_cast<LONG>(500.0f + tracked->x);
100 rect.bottom = rect.right = 0;
101
102 if (input_config->IsFreeTrack())
103 {
104 const auto& tracker = *gui->game->viewscreen->ptrFreeTrack;
105 if (tracker.input.Tracking(GetTickCount64()))
106 {
107 const bool lateral = input_config == &gui->game->config.inputConfigLookLateral;
108 const float angle = (lateral ? tracker.input.yaw : tracker.input.pitch) * (input_config->invert ? -1.0f : 1.0f);
109 WCHAR str[16];
110 _snwprintf_s(str, _countof(str), _TRUNCATE, gui->strings[L_CONFIG_FREETRACK_ANGLE].c_str(), RiseMath::ToDegree(angle));
111 gui->g_pFont->DrawTextW(gui->g_pTextSprite, str, -1, &rect, DT_NOCLIP, 0xFF00FF00);
112 }
113 else
114 gui->g_pFont->DrawTextW(gui->g_pTextSprite, gui->strings[L_CONFIG_FAIL].c_str(), -1, &rect, DT_NOCLIP, 0xFFFFFF00);
115 return;
116 }
117
118 if (input_config->guid == MYGUID_NULL)
119 {
120 gui->g_pFont->DrawTextW(gui->g_pTextSprite, gui->strings[L_CONFIG_OK].c_str(), -1, &rect, DT_NOCLIP, 0xFF00FF00);
121 return;
122 }
123
124 long value = 99999;
125 WCHAR str[6];
126 // ReSharper disable once CppExpressionWithoutSideEffects
127 gui->game->viewscreen->ptrJoystick->Poll(input_config, &value);
128 if (value != 99999)
129 {
130 const int nullzone = gui->game->viewscreen->ptrJoystick->nullzone;
131 if (!engine)
132 {
133 swprintf_s(str, 6, L"%+i", value);
134 gui->g_pFont->DrawTextW(gui->g_pTextSprite, str, -1, &rect, DT_NOCLIP, abs(value) > nullzone ? 0xFFFFFF00 : 0xFF00FF00);
135 }
136 else
137 {
138 value = (-value + 1000) / 2;
139 if (value != 500)
140 {
141 swprintf_s(str, 6, L"%+i", value);
142 gui->g_pFont->DrawTextW(gui->g_pTextSprite, str, -1, &rect, DT_NOCLIP, value > nullzone ? 0xFFFFFF00 : 0xFF00FF00);
143 }
144 else
145 {
146 gui->g_pFont->DrawTextW(gui->g_pTextSprite, gui->strings[L_CONFIG_MOVE].c_str(), -1, &rect, DT_NOCLIP, 0xFFFFFF00);
147 }
148 }
149 }
150 else
151 {
152 gui->g_pFont->DrawTextW(gui->g_pTextSprite, gui->strings[L_CONFIG_FAIL].c_str(), -1, &rect, DT_NOCLIP, 0xFFFF0000);
153 }
154}
155
157{
158 logger->AddToCallStack("ConfigurationDialog::Update");
159
160 // Apply outside the mouse callback: resetting targets rebuilds dialog
161 // controls, including the radio button that delivered that callback.
163 {
164 const unsigned requested = pendingVideoSamples;
166 auto* host = Rendering::ClientHost();
167 if (host && SUCCEEDED(host->SetSamples(requested)))
168 {
169 gui->game->config.videoSamples = static_cast<unsigned char>(requested);
170 gui->game->config.Save();
171 videoStatus.clear();
172 }
173 else videoStatus = L"Could not change MSAA. The previous setting has been restored.";
175 }
176 if (pendingFullscreen >= 0)
177 {
178 const bool fullscreen = pendingFullscreen != 0;
180 gui->game->ToggleFullScreen(fullscreen);
182 gui->game->config.Save();
184 }
185
186 if (redraw)
187 {
188 ActiveTab();
189 redraw = false;
190 }
191
192 msgbarcolor = 0; // black
193 msgbartext[0] = 0;
194
196 {
198 //if (!gui->eastasian)
199 //{
200 // msgbarcolor = 2; // amber
201 // wcscpy_s(msgbartext, HELP_SIZE, gui->strings[L_MESSAGE_EASTASIANSUPPORT].c_str());
202 //}
203 //else
204 //{
205 // msgbarcolor = 0;
206 // msgbartext[0] = 0;
207 //}
208
209 }
211 {
212 const auto& tracker = *gui->game->viewscreen->ptrFreeTrack;
214 const std::wstring version = tracker.Version().empty() ? gui->strings[L_CONFIG_FREETRACK_UNKNOWN] :
215 std::wstring(tracker.Version().begin(), tracker.Version().end());
216 if (enabled && tracker.Available() && tracker.input.Tracking(GetTickCount64()))
217 {
218 swprintf_s(msgbartext, HELP_SIZE, gui->strings[L_MESSAGE_FREETRACK_LIVE].c_str(), version.c_str(), tracker.input.rate);
219 msgbarcolor = 1;
220 }
221 else
222 {
223 const auto status = !enabled ? L_MESSAGE_FREETRACK_DISABLED :
225 swprintf_s(msgbartext, HELP_SIZE, gui->strings[L_MESSAGE_FREETRACK_STATUS].c_str(), version.c_str(), gui->strings[status].c_str());
226 msgbarcolor = !enabled ? 0 : tracker.Available() ? 2 : 3;
227 }
228 }
230 {
231 const float cpu = BASS_GetCPU();
232 swprintf_s(msgbartext, HELP_SIZE, gui->strings[L_MESSAGE_SOUNDUTILIZATION].c_str(), cpu, gui->strings[L_LIST_PERCENT].c_str(), BASS_GetVersion(), BASS_FX_GetVersion());
233 if (cpu > 3.0f)
234 msgbarcolor = 3; // red
235 else if (cpu > 2.0f)
236 msgbarcolor = 2; // yellow
237 else
238 msgbarcolor = 1; // green
239 }
241 {
242 const int pingtime = gui->networking->GetPingTime();
243 if (pingtime > 250)
244 msgbarcolor = 3; // red
245 else if (pingtime > 100)
246 msgbarcolor = 2; // yellow
247 else
248 msgbarcolor = 1; // green
249 swprintf_s(msgbartext, HELP_SIZE, gui->strings[L_MESSAGE_NETWORKLAG].c_str(), pingtime);
250 }
252 {
253 const float fps = Rendering::ClientFPS();
254 if (fps < 24.0f)
255 msgbarcolor = 3; // red
256 else if (fps < 42.0f)
257 msgbarcolor = 2; // yellow
258 else
259 msgbarcolor = 1; // green
260 swprintf_s(msgbartext, HELP_SIZE, L"%s", Rendering::ClientFrameStats());
261 }
263 {
264 int control = IDC_BINDING_DEVICE1;
265
266 g_bTextInput = 1;
267
268 if (keyScanCode)
269 {
271 {
272 HUD.GetStatic(control)->SetText(gui->strings[L_CONFIG_KEYBOARD].c_str());
273 HUD.GetStatic(control)->SetVisible(true);
274 WCHAR msg[100];
276 swprintf_s(msg, 100, L"\x21e7 + %S", gui->game->viewscreen->ptrKeyboard->Translate(keyScanCode).c_str());
277 else
278 swprintf_s(msg, 100, L"%S", gui->game->viewscreen->ptrKeyboard->Translate(keyScanCode).c_str());
279 HUD.GetStatic(control + 1)->SetText(msg);
280 HUD.GetStatic(control + 1)->SetVisible(true);
282 for (size_t i = 0; i < gui->game->config.keyBindings.size(); i++)
283 {
284 auto binding = gui->game->config.keyBindings.at(i);
285 if (allowedUsage[binding.function] & profile && binding.scancode == keyScanCode && binding.shift == gui->game->viewscreen->ptrKeyboard->g_bShift)
286 {
287 alreadyBound = binding.function;
288 break;
289 }
290 }
291 FillBindingDropdown(control + 2, alreadyBound);
292 HUD.GetComboBox(control + 2)->SetSelectedByData(reinterpret_cast<void*>(alreadyBound));
293 HUD.GetComboBox(control + 2)->SetVisible(true);
294 }
295
296 control += 3;
297 }
298
300 {
301 oldButtonCount = 0; // reset subsequent sections
302 oldPovCount = 0; // reset subsequent sections
303 }
304
307
308 if (!buttonGuids.empty())
309 {
310 for (size_t j = 0; j < buttonGuids.size(); j++)
311 {
312 if (buttonGuids.size() != oldButtonCount)
313 {
314 WCHAR msg[99];
315 swprintf_s(msg, sizeof msg, L"%S", buttonFriendly.at(j).c_str());
316 HUD.GetStatic(control)->SetText(msg);
317 HUD.GetStatic(control)->SetVisible(true);
318 swprintf_s(msg, sizeof msg, L"Button %i", buttonIndices.at(j) + 1);
319 HUD.GetStatic(control + 1)->SetText(msg);
320 HUD.GetStatic(control + 1)->SetVisible(true);
322 for (size_t i = 0; i < gui->game->config.buttonBindings.size(); i++)
323 {
324 auto binding = gui->game->config.buttonBindings.at(i);
325 if (allowedUsage[binding.function] & profile && binding.guid == buttonGuids.at(j) && binding.index == buttonIndices.at(j))
326 {
327 alreadyBound = binding.function;
328 break;
329 }
330 }
331 FillBindingDropdown(control + 2, alreadyBound);
332 HUD.GetComboBox(control + 2)->SetSelectedByData(reinterpret_cast<void*>(alreadyBound));
333 HUD.GetComboBox(control + 2)->SetVisible(true);
334 }
335
336 control += 3;
337 if (control > IDC_BINDING_BOUND3)
338 break;
339 }
340 }
341
342 if (oldButtonCount != buttonGuids.size())
343 oldPovCount = 0; // reset subsequent sections
344
346
347 if (!povGuids.empty())
348 {
349 for (size_t j = 0; j < povGuids.size(); j++)
350 {
351 if (povGuids.size() != oldPovCount)
352 {
353 WCHAR msg[99];
354 swprintf_s(msg, sizeof msg, L"%S", povFriendly.at(j).c_str());
355 HUD.GetStatic(control)->SetText(msg);
356 HUD.GetStatic(control)->SetVisible(true);
357 swprintf_s(msg, sizeof msg, L"POV%i %i", povIndices.at(j) + 1, povValues.at(j) / 100);
358 HUD.GetStatic(control + 1)->SetText(msg);
359 HUD.GetStatic(control + 1)->SetVisible(true);
361 for (size_t i = 0; i < gui->game->config.povBindings.size(); i++)
362 {
363 auto binding = gui->game->config.povBindings.at(i);
364 if (allowedUsage[binding.function] & profile && binding.guid == povGuids.at(j) && binding.index == povIndices.at(j) && binding.Test(povValues.at(j)))
365 {
366 alreadyBound = binding.function;
367 break;
368 }
369 }
370 FillBindingDropdown(control + 2, alreadyBound);
371 HUD.GetComboBox(control + 2)->SetSelectedByData(reinterpret_cast<void*>(alreadyBound));
372 HUD.GetComboBox(control + 2)->SetVisible(true);
373 }
374
375 control += 3;
376 if (control > IDC_BINDING_BOUND3)
377 break;
378 }
379 }
380
381 oldPovCount = povGuids.size();
382
383 while (control < IDC_BINDING_DEFAULTS)
384 {
385 HUD.GetStatic(control)->SetVisible(false);
386 HUD.GetStatic(control + 1)->SetVisible(false);
387 HUD.GetComboBox(control + 2)->SetVisible(false);
388
389 control += 3;
390 }
391 }
392}
393
395{
396 // Transport statistics occupy at most 230 pixels. Ten telemetry rows at
397 // 14 pixels fit below them inside the 384-pixel Network tab.
398 RECT rect = {};
399 rect.left = static_cast<LONG>(tracked->x) + 5;
400 rect.top = static_cast<LONG>(tracked->y) + 240;
401 const auto DrawLine = [&](const WCHAR* text, Rendering::PackedColor color)
402 {
403 gui->g_pFont->DrawTextW(gui->g_pTextSprite, text, -1, &rect, DT_NOCLIP, color);
404 rect.top += 14;
405 };
406
407 WCHAR str[160];
408 const double now = Telemetry::MonotonicSeconds();
409 const Bus* bus = gui->game->bus.get();
410
411 const Telemetry::UploadMetrics upload =
413 swprintf_s(str, _countof(str), L"TX %.1fHz INT%.2f AGE%.2f #%llu", upload.packetsPerSecond,
415 static_cast<unsigned long long>(upload.totalPackets));
416 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
417
418 if (bus->targetC >= 0 && bus->targetC < MAX_SCAN && bus->scanslot[bus->targetC] > 0 && bus->scanslot[bus->targetC] < MAX_SCAN)
419 {
420 const int slot = bus->scanslot[bus->targetC];
421 const Telemetry::ChannelMetrics telemetry =
423 swprintf_s(str, _countof(str), L"TEL S%i ID%i REF%i P%i SEQ%u GAP%u", slot, telemetry.identity,
424 telemetry.reference, telemetry.parentSlot, telemetry.lastAcceptedSequence, telemetry.sequenceGaps);
425 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
426 swprintf_s(str, _countof(str), L"RX %.1fHz HINT%.2f EWMA%.3f JIT%.3f", telemetry.incomingPacketsPerSecond,
427 telemetry.expectedIntervalSeconds, telemetry.measuredIntervalSeconds, telemetry.jitterSeconds);
428 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
429 swprintf_s(str, _countof(str), L"BUF%zu AGE%.2f DLY%.2f EXT%.2f", telemetry.snapshotDepth,
431 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
432 swprintf_s(str, _countof(str), L"DUP%u OLD%u BAD%u ERR%.3f CORR%.3f", telemetry.duplicateCount,
433 telemetry.outOfOrderCount, telemetry.invalidCount, telemetry.predictionErrorKm,
434 telemetry.correctionMagnitudeKm);
435 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
436 swprintf_s(str, _countof(str), L"STIME%u SREV%u SDT%ums DSEQ%u", telemetry.lastSampleTimeMs,
437 telemetry.lastSourceRevision, telemetry.lastSourceDeltaMs, telemetry.lastDeliverySequenceDelta);
438 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
439 swprintf_s(str, _countof(str), L"SDROP%u SRDUP%u %s", telemetry.coalescedSourceRevisions,
441 telemetry.sourceTimed ? L"SOURCE-TIMED" : L"RECEIPT-FALLBACK");
442 DrawLine(str, Rendering::ColorARGB(255, 128, 255, 255));
443 }
444 else
445 {
446 DrawLine(L"Vehicle telemetry: select a vehicle in the scanner.", Rendering::ColorARGB(255, 128, 255, 255));
447 }
448
449 rect.top += 14;
450
451 const int closestWeapon = Telemetry::gSnapshotSystem.ClosestWeaponSlot(
454 if (closestWeapon >= 0)
455 {
457 closestWeapon, now);
458 swprintf_s(str, _countof(str), L"W%i WRX%.1f WSEQ%u WGAP%u WAGE%.2f", closestWeapon,
459 weapon.incomingPacketsPerSecond, weapon.lastAcceptedSequence, weapon.sequenceGaps,
460 weapon.newestSnapshotAgeSeconds);
461 DrawLine(str, Rendering::ColorARGB(255, 255, 192, 128));
462 swprintf_s(str, _countof(str), L"WDLY%.2f WEXT%.2f WERR%.3f WCORR%.3f", weapon.interpolationDelaySeconds,
463 weapon.extrapolationSeconds, weapon.predictionErrorKm, weapon.correctionMagnitudeKm);
464 DrawLine(str, Rendering::ColorARGB(255, 255, 192, 128));
465 swprintf_s(str, _countof(str), L"WSTIME%u WDT%ums %s", weapon.lastSampleTimeMs, weapon.lastSourceDeltaMs,
466 weapon.sourceTimed ? L"SOURCE-TIMED" : L"RECEIPT-FALLBACK");
467 DrawLine(str, Rendering::ColorARGB(255, 255, 192, 128));
468 }
469 else
470 {
471 DrawLine(L"Weapon telemetry: no active weapon.", Rendering::ColorARGB(255, 255, 192, 128));
472 }
473}
474
476{
477 logger->AddToCallStack("ConfigurationDialog::Draw");
478
480 {
481 RECT rect;
482 rect.top = static_cast<long>(tracked->y) + 2;
483 rect.left = static_cast<long>(tracked->x) + 5;
484 rect.bottom = 0;
485 rect.right = 0;
486
487 char msg[99];
488 RakNet::RakNetStatistics* s = gui->networking->GetStatistics();
489
490 DrawNetworkTelemetry(tracked);
491 if (s == nullptr)
492 {
493 gui->g_pFont->DrawTextW(gui->g_pTextSprite, L"Connection statistics unavailable (not connected).",
494 -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
495 return;
496 }
497
498 sprintf_s(msg, sizeof msg, "Actual bytes per second sent %llu", s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT]);
499 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
500 rect.top += 10;
501
502 sprintf_s(msg, sizeof msg, "Actual bytes per second received %llu", s->valueOverLastSecond[RakNet::ACTUAL_BYTES_RECEIVED]);
503 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
504 rect.top += 10;
505
506 sprintf_s(msg, sizeof msg, "Message bytes per second sent %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_SENT]);
507 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
508 rect.top += 10;
509
510 sprintf_s(msg, sizeof msg, "Message bytes per second resent %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RESENT]);
511 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
512 rect.top += 10;
513
514 sprintf_s(msg, sizeof msg, "Message bytes per second pushed %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_PUSHED]);
515 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
516 rect.top += 10;
517
518 sprintf_s(msg, sizeof msg, "Message bytes per second returned %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RECEIVED_PROCESSED]);
519 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
520 rect.top += 10;
521
522 sprintf_s(msg, sizeof msg, "Message bytes per second ignored %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RECEIVED_IGNORED]);
523 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
524 rect.top += 10;
525
526 sprintf_s(msg, sizeof msg, "Total bytes sent %llu", s->runningTotal[RakNet::ACTUAL_BYTES_SENT]);
527 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
528 rect.top += 10;
529
530 sprintf_s(msg, sizeof msg, "Total bytes received %llu", s->runningTotal[RakNet::ACTUAL_BYTES_RECEIVED]);
531 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
532 rect.top += 10;
533
534 sprintf_s(msg, sizeof msg, "Total message bytes sent %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_SENT]);
535 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
536 rect.top += 10;
537
538 sprintf_s(msg, sizeof msg, "Total message bytes resent %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RESENT]);
539 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
540 rect.top += 10;
541
542 sprintf_s(msg, sizeof msg, "Total message bytes pushed %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_PUSHED]);
543 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
544 rect.top += 10;
545
546 sprintf_s(msg, sizeof msg, "Total message bytes returned %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RECEIVED_PROCESSED]);
547 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
548 rect.top += 10;
549
550 sprintf_s(msg, sizeof msg, "Total message bytes ignored %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RECEIVED_IGNORED]);
551 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
552 rect.top += 10;
553
554 sprintf_s(msg, sizeof msg, "Messages in send buffer, by priority %i,%i,%i,%i", s->messageInSendBuffer[IMMEDIATE_PRIORITY], s->messageInSendBuffer[HIGH_PRIORITY], s->messageInSendBuffer[MEDIUM_PRIORITY], s->messageInSendBuffer[LOW_PRIORITY]);
555 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
556 rect.top += 10;
557
558 sprintf_s(msg, sizeof msg, "Bytes in send buffer, by priority %.0f,%.0f,%.0f,%.0f", s->bytesInSendBuffer[IMMEDIATE_PRIORITY], s->bytesInSendBuffer[HIGH_PRIORITY], s->bytesInSendBuffer[MEDIUM_PRIORITY], s->bytesInSendBuffer[LOW_PRIORITY]);
559 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
560 rect.top += 10;
561
562 sprintf_s(msg, sizeof msg, "Messages in resend buffer %i", s->messagesInResendBuffer);
563 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
564 rect.top += 10;
565
566 sprintf_s(msg, sizeof msg, "Bytes in resend buffer %llu", s->bytesInResendBuffer);
567 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
568 rect.top += 10;
569
570 sprintf_s(msg, sizeof msg, "Current packet loss %.1f%%", s->packetlossLastSecond * 100.0f);
571 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
572 rect.top += 10;
573
574 sprintf_s(msg, sizeof msg, "Average packet loss %.1f%%", s->packetlossTotal * 100.0f);
575 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
576 rect.top += 10;
577
578 sprintf_s(msg, sizeof msg, "Elapsed connection time in seconds %llu", (RakNet::GetTimeUS() - s->connectionStartTime) / 1000000);
579 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
580 rect.top += 10;
581
582 if (s->BPSLimitByCongestionControl != 0)
583 {
584 sprintf_s(msg, sizeof msg, "Send capacity %llu bytes per second (%.0f%%)", s->BPSLimitByCongestionControl, 100.0f * s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT] / s->BPSLimitByCongestionControl);
585 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
586 rect.top += 10;
587 }
588
589 if (s->BPSLimitByOutgoingBandwidthLimit != 0)
590 {
591 sprintf_s(msg, sizeof msg, "Send limit %llu (%.0f%%)", s->BPSLimitByOutgoingBandwidthLimit, 100.0f * s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT] / s->BPSLimitByOutgoingBandwidthLimit);
592 gui->g_pFont->DrawTextA(gui->g_pTextSprite, msg, -1, &rect, DT_NOCLIP, 0xFFFFFFFF);
593 rect.top += 10;
594 }
595 }
597 {
598 int y = 6;
599 ShowStatus(&gui->game->config.inputConfigLookLateral, y += 32, tracked, false);
600 ShowStatus(&gui->game->config.inputConfigLookVertical, y += 32, tracked, false);
601 ShowStatus(&gui->game->config.inputConfigWalkLateral, y += 32, tracked, false);
602 ShowStatus(&gui->game->config.inputConfigWalkVertical, y += 32, tracked, false);
603 ShowStatus(&gui->game->config.inputConfigSteer, y += 32, tracked, false);
604 ShowStatus(&gui->game->config.inputConfigGas, y += 32, tracked, true);
605 ShowStatus(&gui->game->config.inputConfigBrake, y += 32, tracked, true);
606 ShowStatus(&gui->game->config.inputConfigPitch, y += 32, tracked, false);
607 ShowStatus(&gui->game->config.inputConfigPitchTrim, y += 32, tracked, false);
608 ShowStatus(&gui->game->config.inputConfigRoll, y += 32, tracked, false);
609 ShowStatus(&gui->game->config.inputConfigYaw, y += 32, tracked, false);
610 ShowStatus(&gui->game->config.inputConfigThrustLeft, y += 32, tracked, true);
611 ShowStatus(&gui->game->config.inputConfigThrustRight, y += 32, tracked, true);
612 ShowStatus(&gui->game->config.inputConfigLeftToeBrake, y += 32, tracked, true);
613 ShowStatus(&gui->game->config.inputConfigRightToeBrake, y += 32, tracked, true);
614 }
616 {
617 RECT rect;
618 rect.top = rect.left = 0;
619 rect.right = 640;
620 rect.bottom = 512;
621 gui->g_pTextSprite->Draw(gui->m_pddsBindings, &rect, nullptr, tracked, 0xFFFFFFFF);
622
623 HRESULT hr;
624 rect.top = static_cast<long>((100.0f + tracked->y));
625 rect.left = static_cast<long>((16.0f + tracked->x));
626 rect.right = static_cast<long>((608.0f + tracked->x));
627 rect.bottom = static_cast<long>((412.0f + tracked->y));
628 V(gui->g_pChatFont->DrawTextW(gui->g_pTextSprite, gui->strings[L_DIALOG_BINDING].c_str(), -1, &rect, DT_WORDBREAK, 0xFFFFFFFF));
629 }
630}
631
633{
634 std::wstring verbiage;
635 int index;
637 Hamburger(std::wstring prmVerbiage, int prmIndex)
638 {
639 verbiage = prmVerbiage;
640 index = prmIndex;
641 }
642 friend bool operator< (Hamburger a, Hamburger b)
643 {
644 return a.verbiage < b.verbiage;
645 }
646};
647
649{
650 HUD.GetComboBox(control)->RemoveAllItems();
651
652 HUD.GetComboBox(control)->AddItem(L"", reinterpret_cast<void*>(BindingEnum::ENUMERATION));
653
654 std::vector<Hamburger> list;
655 for (int i = 0; i < BindingEnum::ENUMERATION; i++)
656 {
657 // we filter out admin for non-admins
658 if (!gui->IsAdmin && allowedUsage[i] & ProfileFlags::ADMIN)
659 continue;
660
661 // filter out based on profile selected
662 if (!(allowedUsage[i] & profile))
663 continue;
664
665 // here we can filter out items that are already bound
666 bool alreadyBound = false;
667 for (size_t j = 0; j < gui->game->config.keyBindings.size(); j++)
668 {
669 if (gui->game->config.keyBindings.at(j).function == i)
670 {
671 alreadyBound = true;
672 break;
673 }
674 }
675 if (!alreadyBound)
676 {
677 for (size_t j = 0; j < gui->game->config.buttonBindings.size(); j++)
678 {
679 if (gui->game->config.buttonBindings.at(j).function == i)
680 {
681 alreadyBound = true;
682 break;
683 }
684 }
685 }
686 if (!alreadyBound)
687 {
688 for (size_t j = 0; j < gui->game->config.povBindings.size(); j++)
689 {
690 if (gui->game->config.povBindings.at(j).function == i)
691 {
692 alreadyBound = true;
693 break;
694 }
695 }
696 }
697 if (alreadyBound && i != preserve && HUD.GetCheckBox(IDC_BINDING_UNUSEDONLY)->GetChecked())
698 continue;
699
700 const int langIndex = L_BIND_ENGINE1_CYCLE + i * 2;
701 if (langIndex >= L_ENUMERATION)
702 throw std::exception("Binding verbiage not lining up in language file!");
703 std::wstring langItem = gui->strings[langIndex];
704 list.emplace_back(Hamburger(langItem, i));
705 }
706
707 std::sort(list.begin(), list.end());
708
709 for (size_t i = 0; i < list.size(); i++)
710 {
711 HUD.GetComboBox(control)->AddItem(list.at(i).verbiage.c_str(), reinterpret_cast<void*>(static_cast<INT_PTR>(list.at(i).index)));
712 }
713}
714
716{
717 HUD.AddComboBox(control, static_cast<int>(384.0f * gui->game->displayscale), y, static_cast<int>(104.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale));
718 HUD.GetComboBox(control)->SetDropHeight(static_cast<int>(124.0f * gui->game->displayscale), static_cast<int>(14.0f * gui->game->displayscale));
719 if (config->IsFreeTrack())
720 {
722 HUD.GetComboBox(control)->SetEnabled(false);
723 return;
724 }
725 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_X].c_str(), nullptr); // 0
726 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_Y].c_str(), nullptr); // 1
727 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_Z].c_str(), nullptr); // 2
728 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_RX].c_str(), nullptr); // 3
729 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_RY].c_str(), nullptr); // 4
730 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_RZ].c_str(), nullptr); // 5
731 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_S1].c_str(), nullptr); // 6
732 HUD.GetComboBox(control)->AddItem(gui->strings[L_CONFIG_AXIS_S2].c_str(), nullptr); // 7
733 HUD.GetComboBox(control)->SetSelectedByIndex(config->axis);
734 HUD.GetComboBox(control)->SetEnabled(config->g_pJoystick);
735}
736
738{
739 logger->AddToCallStack("ConfigurationDialog::UpdateInput");
740
741 gui->game->config.Save();
742
744
745 logger->AddToCallStack("ConfigurationDialog::UpdateInput DONE");
746}
747
748void CALLBACK ConfigurationDialog::DialogCallback(UINT nEvent, int nControlID, RiseControl* pControl, void* pUserContext)
749{
750 logger->AddToCallStack("ConfigurationDialog::DialogCallback");
751
752 ConfigurationDialog* cfd = static_cast<ConfigurationDialog*>(pUserContext);
753
754 switch (nControlID)
755 {
756#pragma region Interface
757
758 case IDC_PLAYERPORTAL:
759 ShellExecuteW(nullptr, nullptr, L"https://portal.risetvp.com", nullptr, nullptr, SW_SHOW);
760 break;
761
762 case IDC_LANGUAGE:
764 {
765 const unsigned char oldlang = gui->game->config.language;
766 gui->game->config.language = static_cast<unsigned char>(cfd->HUD.GetComboBox(IDC_LANGUAGE)->GetSelectedIndex());
767
768 if (!gui->eastasian)
769 {
770 if (gui->game->config.language >= 1)
772 if (gui->game->config.language >= 7)
773 gui->game->config.language += 2;
774 }
775
776 if (oldlang != gui->game->config.language)
777 {
778 gui->LoadLanguage(); // do this first so if it fails it doesn't save it
779 gui->game->config.Save();
780 cfd->ActiveTab();
781
783 gui->networking->RequestVerbiage(0); // just changing language... same as ActiveHelp::MessageOfTheDay
784 }
785 }
786 break;
787
788 case IDC_SCALEMAGNIFY:
789 {
790 float maxScale = 1.5f * gui->game->dpiscale;
791 const float xScale = gui->game->displayWidth / designedWidthC; // canary 2.3
792 const float yScale = gui->game->displayHeight / designedHeightC; // canary 2.1
793 if (maxScale > xScale * 1.5f)
794 maxScale = xScale * 1.5f; // dpi now 2.3x
795 if (maxScale > yScale * 1.5f)
796 maxScale = yScale * 1.5f; // dpi now 2.1x
797 if ((gui->game->config.scale + 0.1f) > maxScale) break;
798 const float oldScale = gui->game->config.scale;
799 gui->game->config.scale += 0.1f;
800 gui->game->displayscale *= gui->game->config.scale / oldScale;
802 gui->game->config.Save();
803 }
804 break;
805
806 case IDC_SCALEMINIFY:
807 {
808 const float minScale = RiseMath::Max(1, 0.5f * gui->game->dpiscale);
809 if ((gui->game->config.scale - 0.1f) < minScale)
810 break;
811 const float oldScale = gui->game->config.scale;
812 gui->game->config.scale -= 0.1f;
813 gui->game->displayscale *= gui->game->config.scale / oldScale;
815 gui->game->config.Save();
816 }
817 break;
818
821 gui->game->config.Save(); // save first in case it bombs!
822 break;
823
826 break;
827
829 for (int i = 1; i < ActiveHelp::ActiveHelpEnum; i++)
830 {
831 if (gui->game->vphelp[i]) // seen
832 {
833 gui->game->vphelp[i] = false;
834 SClientPacket outpacket = SClientPacket();
835 // 41=HelpVerbiageControl, x=helpId, y=(0=remindme,1=understood,2=reset,3=disable,4=import), z=, w=
836 outpacket.type = 41;
837 outpacket.f_x = static_cast<float>(i);
838 outpacket.f_y = 2.0f;
839 outpacket.f_z = 0.0f;
840 outpacket.f_w = 0.0f;
841 gui->game->networking->SendToServer(&outpacket, sizeof(SClientPacket), true);
842 }
843 }
845 break;
846
848 for (int i = 1; i < ActiveHelp::ActiveHelpEnum; i++)
849 {
850 if (!gui->game->vphelp[i]) // not seen
851 {
852 gui->game->vphelp[i] = true;
853 SClientPacket outpacket = SClientPacket();
854 // 41=HelpVerbiageControl, x=helpId, y=(0=remindme,1=understood,2=reset,3=disable,4=import), z=, w=
855 outpacket.type = 41;
856 outpacket.f_x = static_cast<float>(i);
857 outpacket.f_y = 3.0f;
858 outpacket.f_z = 0.0f;
859 outpacket.f_w = 0.0f;
860 gui->game->networking->SendToServer(&outpacket, sizeof(SClientPacket), true);
861 }
862 }
864 break;
865
866#pragma endregion
867
868#pragma region Input
884 {
885 void* pData = cfd->HUD.GetComboBox(nControlID)->GetSelectedItem()->pData;
886 InputConfig* inputConfig = static_cast<InputConfig*>(pData);
887 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
888 const bool viewChannel = nControlID == IDC_INPUTDEVICELOOKLATERAL || nControlID == IDC_INPUTDEVICELOOKVERTICAL;
889 const bool freeTrack = viewChannel && selectedIndex == static_cast<int>(cfd->HUD.GetComboBox(nControlID)->GetNumItems()) - 1;
890 if (freeTrack)
891 inputConfig->guid = MYGUID_FREETRACK;
892 else if (selectedIndex > 0)
893 inputConfig->guid = gui->game->viewscreen->ptrJoystick->deviceList.at(selectedIndex - 1).guidInstance;
894 else
895 inputConfig->guid = MYGUID_NULL;
896 if (viewChannel)
897 {
898 if (selectedIndex == 0) // mouse
899 {
900 inputConfig->axis = nControlID == IDC_INPUTDEVICELOOKLATERAL ? 0 : 1; // X vs. Y axis
904 }
905 else if (!freeTrack)
906 {
910 }
911 }
912 cfd->UpdateInput(inputConfig);
913 if (viewChannel)
914 {
915 // Clear retained roll/translation immediately; rebuild the fixed
916 // yaw/pitch label outside this callback, after its control is released.
918 cfd->redraw = true;
919 }
920
921 logger->AddToCallStack("ConfigurationDialog::DialogCallback AxisDisable1");
922 cfd->HUD.GetComboBox(nControlID + 1)->SetEnabled(selectedIndex > 0 && !freeTrack); // Axis is always next door
923 logger->AddToCallStack("ConfigurationDialog::DialogCallback SplitDisable");
924 RiseCheckBox* splitCheckbox = cfd->HUD.GetCheckBox(nControlID + 3);
925 if (splitCheckbox)
926 {
927 cfd->HUD.GetCheckBox(nControlID + 2)->SetEnabled(selectedIndex > 0); // Invert is always right down the street
928 splitCheckbox->SetEnabled(selectedIndex > 0); // Split is always right down the street
929 }
930 logger->AddToCallStack("ConfigurationDialog::DialogCallback DisableDone");
931 }
932 break;
934 {
935 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
936 gui->game->config.inputConfigLookLateral.axis = selectedIndex;
938 }
939 break;
941 {
942 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
943 gui->game->config.inputConfigLookVertical.axis = selectedIndex;
945 }
946 break;
948 {
949 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
950 gui->game->config.inputConfigWalkLateral.axis = selectedIndex;
952 }
953 break;
955 {
956 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
957 gui->game->config.inputConfigWalkVertical.axis = selectedIndex;
959 }
960 break;
962 {
963 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
964 gui->game->config.inputConfigSteer.axis = selectedIndex;
966 }
967 break;
968 case IDC_INPUTAXISGAS:
969 {
970 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
971 gui->game->config.inputConfigGas.axis = selectedIndex;
973 }
974 break;
976 {
977 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
978 gui->game->config.inputConfigBrake.axis = selectedIndex;
980 }
981 break;
983 {
984 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
985 gui->game->config.inputConfigPitch.axis = selectedIndex;
987 }
988 break;
990 {
991 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
992 gui->game->config.inputConfigPitchTrim.axis = selectedIndex;
994 }
995 break;
997 {
998 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
999 gui->game->config.inputConfigRoll.axis = selectedIndex;
1001 }
1002 break;
1003 case IDC_INPUTAXISYAW:
1004 {
1005 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
1006 gui->game->config.inputConfigYaw.axis = selectedIndex;
1008 }
1009 break;
1011 {
1012 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
1013 gui->game->config.inputConfigThrustLeft.axis = selectedIndex;
1015 }
1016 break;
1018 {
1019 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
1020 gui->game->config.inputConfigThrustRight.axis = selectedIndex;
1022 }
1023 break;
1025 {
1026 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
1027 gui->game->config.inputConfigLeftToeBrake.axis = selectedIndex;
1029 }
1030 break;
1032 {
1033 const int selectedIndex = cfd->HUD.GetComboBox(nControlID)->GetSelectedIndex();
1034 gui->game->config.inputConfigRightToeBrake.axis = selectedIndex;
1036 }
1037 break;
1039 {
1042 }
1043 break;
1045 {
1048 }
1049 break;
1051 {
1054 }
1055 break;
1057 {
1060 }
1061 break;
1063 {
1066 }
1067 break;
1068 case IDC_INPUTINVGAS:
1069 {
1070 gui->game->config.inputConfigGas.invert = cfd->HUD.GetCheckBox(nControlID)->GetChecked();
1072 }
1073 break;
1074 case IDC_INPUTINVBRAKE:
1075 {
1078 }
1079 break;
1080 case IDC_INPUTINVPITCH:
1081 {
1084 }
1085 break;
1087 {
1090 }
1091 break;
1092 case IDC_INPUTINVROLL:
1093 {
1096 }
1097 break;
1098 case IDC_INPUTINVYAW:
1099 {
1100 gui->game->config.inputConfigYaw.invert = cfd->HUD.GetCheckBox(nControlID)->GetChecked();
1102 }
1103 break;
1104 case IDC_INPUTSPLITYAW:
1105 {
1106 gui->game->config.inputConfigYaw.split = cfd->HUD.GetCheckBox(nControlID)->GetChecked();
1108 }
1109 break;
1111 {
1114 }
1115 break;
1117 {
1120 }
1121 break;
1123 {
1126 }
1127 break;
1129 {
1132 }
1133 break;
1135 {
1138 }
1139 break;
1141 {
1144 }
1145 break;
1147 {
1150 }
1151 break;
1153 {
1156 }
1157 break;
1158 case IDC_INPUTSPLITGAS:
1159 {
1160 gui->game->config.inputConfigGas.split = cfd->HUD.GetCheckBox(nControlID)->GetChecked();
1162 }
1163 break;
1165 {
1168 }
1169 break;
1170
1171#pragma endregion
1172
1173#pragma region Bindings
1174
1175 case IDC_BINDING_BOUND1:
1176 case IDC_BINDING_BOUND2:
1177 case IDC_BINDING_BOUND3:
1178 {
1180 {
1181 RiseComboBox* cdxut_combo_box = cfd->HUD.GetComboBox(nControlID);
1182 auto data = static_cast<int>(reinterpret_cast<INT_PTR>(cdxut_combo_box->GetSelectedItem()->pData));
1183 auto function = static_cast<BindingEnum>(data);
1184 int nextControl = IDC_BINDING_BOUND1;
1185 if (cfd->keyScanCode)
1186 {
1187 if (nControlID == nextControl)
1188 {
1189 for (size_t i = 0; i < gui->game->config.keyBindings.size(); i++)
1190 {
1191 auto binding = gui->game->config.keyBindings.at(i);
1192 if (binding.scancode == cfd->keyScanCode && binding.shift == gui->game->viewscreen->ptrKeyboard->g_bShift)
1193 {
1194 if (function == BindingEnum::ENUMERATION) // remove binding
1195 {
1196 // Delete
1197 gui->game->config.keyBindings.erase(gui->game->config.keyBindings.begin() + i);
1198 }
1199 else
1200 {
1201 // Update
1202 binding.function = function;
1203 // so if it is on a different profile we add this one? or if it is global then we remove gv and interior and airspace?
1204 gui->game->config.keyBindings.at(i) = binding;
1205 }
1206 return;
1207 }
1208 }
1209 // Add
1210 gui->game->config.keyBindings.emplace_back(function, cfd->keyScanCode, gui->game->viewscreen->ptrKeyboard->g_bShift);
1211 gui->game->config.Save();
1212 return;
1213 }
1214 nextControl += 3;
1215 }
1216 if (!cfd->buttonGuids.empty())
1217 {
1218 for (size_t j = 0; j < cfd->buttonGuids.size(); j++)
1219 {
1220 if (nControlID == nextControl)
1221 {
1222 for (size_t i = 0; i < gui->game->config.buttonBindings.size(); i++)
1223 {
1224 auto binding = gui->game->config.buttonBindings.at(i);
1225 if (binding.guid == cfd->buttonGuids.at(j) && binding.index == cfd->buttonIndices.at(j))
1226 {
1227 if (function == BindingEnum::ENUMERATION) // remove binding
1228 {
1229 // Delete
1230 gui->game->config.buttonBindings.erase(gui->game->config.buttonBindings.begin() + i);
1231 }
1232 else
1233 {
1234 // Update
1235 binding.function = function;
1236 gui->game->config.buttonBindings.at(i) = binding;
1237 }
1238 return;
1239 }
1240 }
1241 // Add
1242 gui->game->config.buttonBindings.emplace_back(function, cfd->buttonGuids.at(j), cfd->buttonIndices.at(j));
1243 gui->game->config.Save();
1244 return;
1245 }
1246 nextControl += 3;
1247 }
1248 }
1249 if (!cfd->povGuids.empty())
1250 {
1251 for (size_t j = 0; j < cfd->povGuids.size(); j++)
1252 {
1253 if (nControlID == nextControl)
1254 {
1255 for (size_t i = 0; i < gui->game->config.povBindings.size(); i++)
1256 {
1257 auto binding = gui->game->config.povBindings.at(i);
1258 if (binding.guid == cfd->povGuids.at(j) && binding.index == cfd->povIndices.at(j) && binding.Test(cfd->povValues.at(j)))
1259 {
1260 if (function == BindingEnum::ENUMERATION) // remove binding
1261 {
1262 // Delete
1263 gui->game->config.povBindings.erase(gui->game->config.povBindings.begin() + i);
1264 }
1265 else
1266 {
1267 // Update
1268 binding.function = function;
1269 gui->game->config.povBindings.at(i) = binding;
1270 }
1271 return;
1272 }
1273 }
1274 // Add
1275 gui->game->config.povBindings.emplace_back(function, cfd->povGuids.at(j), cfd->povIndices.at(j), cfd->povValues.at(j));
1276 gui->game->config.Save();
1277 return;
1278 }
1279 nextControl += 3;
1280 }
1281 }
1282 }
1283 }
1284 break;
1285
1287 cfd->oldButtonCount = 0;
1288 cfd->oldKeyScanCode = 0;
1289 cfd->oldPovCount = 0;
1290 break;
1291
1293 {
1294 RiseComboBox* cdxut_combo_box = cfd->HUD.GetComboBox(nControlID);
1295 auto data = static_cast<int>(reinterpret_cast<INT_PTR>(cdxut_combo_box->GetSelectedItem()->pData));
1296 cfd->profile = data | ProfileFlags::GLOBAL;
1297 cfd->oldButtonCount = 0;
1298 cfd->oldKeyScanCode = 0;
1299 cfd->oldPovCount = 0;
1300 }
1301 break;
1302
1303 case IDC_BINDING_CLEAR:
1304 gui->game->config.keyBindings.clear();
1305 gui->game->config.buttonBindings.clear();
1306 gui->game->config.povBindings.clear();
1307 cfd->oldButtonCount = 0;
1308 cfd->oldKeyScanCode = 0;
1309 cfd->oldPovCount = 0;
1310 break;
1311
1314 cfd->oldButtonCount = 0;
1315 cfd->oldKeyScanCode = 0;
1316 cfd->oldPovCount = 0;
1317 break;
1318
1319#pragma endregion
1320
1321#pragma region Video
1324 cfd->pendingFullscreen = nControlID == DXUTSETTINGSDLG_FULLSCREEN ? 1 : 0;
1325 break;
1326 case IDC_VIDEO_MSAA_OFF:
1327 case IDC_VIDEO_MSAA_2:
1328 case IDC_VIDEO_MSAA_4:
1329 case IDC_VIDEO_MSAA_8:
1330 cfd->pendingVideoSamples = 1u << (nControlID - IDC_VIDEO_MSAA_OFF);
1331 break;
1332 case IDC_VIDEO_VSYNC_ON:
1334 if (auto* host = Rendering::ClientHost())
1335 {
1336 host->SetVSync(nControlID == IDC_VIDEO_VSYNC_ON);
1337 gui->game->config.videoVSync = host->VSync();
1338 gui->game->config.Save();
1339 cfd->UpdateVideoControls();
1340 }
1341 break;
1342#pragma endregion
1343
1344#pragma region Sound
1349 {
1351 {
1352 RiseComboBox* cdxut_combo_box = cfd->HUD.GetComboBox(nControlID);
1353 SoundConfig* modifyConfig = static_cast<SoundConfig*>(cdxut_combo_box->GetSelectedItem()->pData);
1354
1355 const int selected_index = cdxut_combo_box->GetSelectedIndex();
1356 modifyConfig->guid = gui->game->sound->deviceGuids.at(selected_index);
1357
1358 gui->game->sound->InitDevice(modifyConfig);
1359
1360 if (nControlID != IDC_SOUNDDEVICERADIO)
1361 {
1362 for (short i = 0; i < SOUND_ENUMERATION; i++)
1363 gui->game->sound->LoadSounds(i);
1364 gui->game->sound->ChangeCockpit(false);
1366 }
1367 else
1368 {
1369 for (short i = SOUND_STATIONIDLL; i <= SOUND_STATIONIDCK; i++)
1370 gui->game->sound->LoadSounds(i);
1372 }
1373
1374 gui->game->config.Save();
1375
1376 cfd->redraw = true;
1377 }
1378 }
1379 break;
1380
1381 case IDC_SOUNDPLAYINTRO:
1383 gui->game->config.Save();
1384
1386 BASS_ChannelStop(gui->game->sound->g_pSoundIntro);
1387 break;
1388
1390 gui->game->sound->PlayEx(SOUND_TEST, false, 1.0f, 1.0f, -1.0f, true, false, false);
1391 break;
1393 gui->game->sound->PlayEx(SOUND_TEST, false, 1.0f, 1.0f, +1.0f, true, false, false);
1394 break;
1395
1397 gui->game->config.soundConfigLegacy.volume = 0.01f * static_cast<float>(cfd->HUD.GetSlider(nControlID)->GetValue());
1399 gui->game->config.Save();
1400 break;
1402 gui->game->config.soundConfigComputer.volume = 0.01f * static_cast<float>(cfd->HUD.GetSlider(nControlID)->GetValue());
1404 gui->game->config.Save();
1405 break;
1407 gui->game->config.soundConfigComms.volume = 0.01f * static_cast<float>(cfd->HUD.GetSlider(nControlID)->GetValue());
1409 gui->game->config.Save();
1410 break;
1412 gui->game->config.soundConfigRadio.volume = 0.01f * static_cast<float>(cfd->HUD.GetSlider(nControlID)->GetValue());
1414 gui->game->config.Save();
1415 break;
1416#pragma endregion
1417
1418#pragma region Account
1419 case IDC_REMEMBERLOGIN:
1421 gui->game->config.Save();
1422 break;
1423#pragma endregion
1424 }
1425}
1426
1428{
1429 logger->AddToCallStack("ConfigurationDialog::ActiveTab");
1430
1431 HUD.SetFont(0, L"DejaVu Sans Mono", static_cast<long>(12.0f * gui->game->displayscale), FW_THIN);
1432
1433 //DialogBase::ActiveTab();
1434
1435 msgbarcolor = 0; // normal
1436 msgbartext[0] = 0;
1437
1438#pragma region Interface
1448#pragma endregion
1449
1450#pragma region Input
1457 //HUD.RemoveControl(IDC_INPUTHEADERFEEDBACK);
1462 //HUD.RemoveControl(IDC_INPUTFEEDBACKLOOKLATERAL);
1467 //HUD.RemoveControl(IDC_INPUTFEEDBACKLOOKVERTICAL);
1472 //HUD.RemoveControl(IDC_INPUTFEEDBACKWALKLATERAL);
1477 //HUD.RemoveControl(IDC_INPUTFEEDBACKWALKVERTICAL);
1482 //HUD.RemoveControl(IDC_INPUTFEEDBACKSTEERING);
1488 //HUD.RemoveControl(IDC_INPUTFEEDBACKGAS);
1494 //HUD.RemoveControl(IDC_INPUTFEEDBACKBRAKE);
1499 //HUD.RemoveControl(IDC_INPUTFEEDBACKPITCH);
1504 //HUD.RemoveControl(IDC_INPUTFEEDBACKPITCHTRIM);
1509 //HUD.RemoveControl(IDC_INPUTFEEDBACKROLL);
1515 //HUD.RemoveControl(IDC_INPUTFEEDBACKYAW);
1521 //HUD.RemoveControl(IDC_INPUTFEEDBACKTHRUSTLEFT);
1527 //HUD.RemoveControl(IDC_INPUTFEEDBACKTHRUSTRIGHT);
1533 //HUD.RemoveControl(IDC_INPUTFEEDBACKLEFTTOEBRAKE);
1539 //HUD.RemoveControl(IDC_INPUTFEEDBACKRIGHTTOEBRAKE);
1540#pragma endregion
1541
1542#pragma region Bindings
1559#pragma endregion
1560
1561#pragma region Sound
1577#pragma endregion
1578
1579#pragma region Account
1582#pragma endregion
1583
1584#pragma region Video
1590 for (int id = IDC_VIDEO_MSAA_LABEL; id <= IDC_VIDEO_STATUS; ++id)
1591 HUD.RemoveControl(id);
1592#pragma endregion
1593
1594 int xLabel = static_cast<int>(16.0f * gui->game->displayscale);
1595 const int lineHeight = static_cast<int>(24.0f * gui->game->displayscale);
1596 if (g_bTextInput == 1)
1597 g_bTextInput = 0;
1598
1599 // ReSharper disable once CppDefaultCaseNotHandledInSwitchStatement
1601 {
1602 case L_TAB_INTERFACE:
1603 {
1604 float yy = 24.0f;
1605 HUD.AddStatic(IDC_LANGUAGELABEL, gui->strings[L_CONFIG_LANGUAGE].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale));
1606 yy += 24.0f;
1607
1608 HUD.AddComboBox(IDC_LANGUAGE, static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale));
1610 yy += 32.0f;
1611
1612 HUD.AddCheckBox(DXUTSETTINGSDLG_CLOSEDCAPTIONING, gui->strings[L_CONFIG_CLOSEDCAPTIONING].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), (int)(300.0f * gui->game->displayscale), (int)(16.0f * gui->game->displayscale), gui->game->config.g_bClosedCaptioning);
1613 yy += 48.0f;
1614
1615 HUD.AddButton(IDC_RESTOREDEFAULTS, gui->strings[L_BUTTON_RESTOREDEFAULTS].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), 0, false);
1616 yy += 48.0f;
1617
1618 HUD.AddStatic(IDC_GAMEHELPLABEL, gui->strings[L_CONFIG_GAMEHELP].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale));
1619 yy += 24.0f;
1620 HUD.AddButton(IDC_GAMEHELPRESET, gui->strings[L_CONFIG_RESET].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), 0, false);
1621 yy += 24.0f;
1622 HUD.AddButton(IDC_GAMEHELPDISABLE, gui->strings[L_CONFIG_DISABLE].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), 0, false);
1623 yy += 48.0f;
1624 HUD.AddStatic(IDC_SCALELABEL, gui->strings[L_CONFIG_FONTANDSCALE].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale));
1625 yy += 24.0f;
1626 HUD.AddButton(IDC_SCALEMINIFY, gui->strings[L_CONFIG_MINIFY].c_str(), static_cast<int>(16.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(92.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), 0, false);
1627 HUD.AddButton(IDC_SCALEMAGNIFY, gui->strings[L_CONFIG_MAGNIFY].c_str(), static_cast<int>(112.0f * gui->game->displayscale), static_cast<int>(yy * gui->game->displayscale), static_cast<int>(92.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), 0, false);
1628
1629 }
1630 break;
1631
1632 case L_TAB_INPUT:
1633 {
1634 const int xDevice = static_cast<int>(94.0f * gui->game->displayscale);
1635 const int widthDevice = static_cast<int>(286.0f * gui->game->displayscale);
1636 const int xInv = static_cast<int>(550.0f * gui->game->displayscale);
1637 const int xSplit = static_cast<int>(600.0f * gui->game->displayscale);
1638 const int widthCheckboxes = static_cast<int>(50.0f * gui->game->displayscale);
1639 float y = 8.0f * gui->game->displayscale;
1640 xLabel = static_cast<int>(10.0f * gui->game->displayscale);
1641 const float labelOffsetY = 4.0f * gui->game->displayscale;
1642
1643 HUD.AddStatic(IDC_INPUTHEADERCHANNEL, gui->strings[L_CONFIG_CHANNEL].c_str(), xLabel, static_cast<int>(y), widthDevice, lineHeight);
1645 HUD.AddStatic(IDC_INPUTHEADERDEVICE, gui->strings[L_CONFIG_DEVICE].c_str(), xDevice, static_cast<int>(y), widthDevice, lineHeight);
1647 HUD.AddStatic(IDC_INPUTHEADERAXIS, gui->strings[L_CONFIG_AXIS].c_str(), static_cast<int>(384.0f * gui->game->displayscale), static_cast<int>(y), widthDevice, lineHeight);
1649 HUD.AddStatic(IDC_INPUTHEADERVALUE, gui->strings[L_CONFIG_VALUE].c_str(), static_cast<int>(500.0f * gui->game->displayscale), static_cast<int>(y), widthDevice, lineHeight);
1651 HUD.AddStatic(IDC_INPUTHEADERINV, gui->strings[L_CONFIG_INVERT].c_str(), xInv, static_cast<int>(y), widthCheckboxes, lineHeight);
1653 HUD.AddStatic(IDC_INPUTHEADERSPLIT, gui->strings[L_CONFIG_SPLIT].c_str(), xSplit, static_cast<int>(y), widthCheckboxes, lineHeight);
1655 y += 24.0f * gui->game->displayscale;
1656
1657 HUD.AddStatic(IDC_INPUTLABELLOOKLATERAL, gui->strings[L_CONFIG_LOOKLATERAL].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1659 HUD.AddComboBox(IDC_INPUTDEVICELOOKLATERAL, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1661 HUD.AddCheckBox(IDC_INPUTINVLOOKLATERAL, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigLookLateral.invert);
1662 //HUD.GetCheckBox(IDC_INPUTINVLOOKLATERAL)->SetEnabled(gui->game->config.inputConfigLookLateral.g_pJoystick);
1663 y += 32.0f * gui->game->displayscale;
1664
1665 HUD.AddStatic(IDC_INPUTLABELLOOKVERTICAL, gui->strings[L_CONFIG_LOOKVERTICAL].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1667 HUD.AddComboBox(IDC_INPUTDEVICELOOKVERTICAL, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1669 HUD.AddCheckBox(IDC_INPUTINVLOOKVERTICAL, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigLookVertical.invert);
1670 //HUD.GetCheckBox(IDC_INPUTINVLOOKVERTICAL)->SetEnabled(gui->game->config.inputConfigLookVertical.g_pJoystick);
1671 y += 32.0f * gui->game->displayscale;
1672
1673 HUD.AddStatic(IDC_INPUTLABELWALKLATERAL, gui->strings[L_CONFIG_WALKLATERAL].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1675 HUD.AddComboBox(IDC_INPUTDEVICEWALKLATERAL, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1677 HUD.AddCheckBox(IDC_INPUTINVWALKLATERAL, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigWalkLateral.invert);
1679 y += 32.0f * gui->game->displayscale;
1680
1681 HUD.AddStatic(IDC_INPUTLABELWALKVERTICAL, gui->strings[L_CONFIG_WALKVERTICAL].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1683 HUD.AddComboBox(IDC_INPUTDEVICEWALKVERTICAL, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1685 HUD.AddCheckBox(IDC_INPUTINVWALKVERTICAL, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigWalkVertical.invert);
1687 y += 32.0f * gui->game->displayscale;
1688
1689 HUD.AddStatic(IDC_INPUTLABELSTEERING, gui->strings[L_CONFIG_STEERING].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1691 HUD.AddComboBox(IDC_INPUTDEVICESTEERING, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1693 HUD.AddCheckBox(IDC_INPUTINVSTEERING, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigSteer.invert);
1695 y += 32.0f * gui->game->displayscale;
1696
1697 HUD.AddStatic(IDC_INPUTLABELGAS, gui->strings[L_CONFIG_ACCELERATOR].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1699 HUD.AddComboBox(IDC_INPUTDEVICEGAS, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1701 HUD.AddCheckBox(IDC_INPUTINVGAS, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigGas.invert);
1703 HUD.AddCheckBox(IDC_INPUTSPLITGAS, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigGas.split);
1705 y += 32.0f * gui->game->displayscale;
1706
1707 HUD.AddStatic(IDC_INPUTLABELBRAKE, gui->strings[L_CONFIG_BRAKE].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1709 HUD.AddComboBox(IDC_INPUTDEVICEBRAKE, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1711 HUD.AddCheckBox(IDC_INPUTINVBRAKE, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigBrake.invert);
1713 HUD.AddCheckBox(IDC_INPUTSPLITBRAKE, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigBrake.split);
1715 y += 32.0f * gui->game->displayscale;
1716
1717 HUD.AddStatic(IDC_INPUTLABELPITCH, gui->strings[L_CONFIG_PITCH].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1719 HUD.AddComboBox(IDC_INPUTDEVICEPITCH, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1721 HUD.AddCheckBox(IDC_INPUTINVPITCH, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigPitch.invert);
1723 y += 32.0f * gui->game->displayscale;
1724
1725 HUD.AddStatic(IDC_INPUTLABELPITCHTRIM, gui->strings[L_CONFIG_PITCHTRIM].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1727 HUD.AddComboBox(IDC_INPUTDEVICEPITCHTRIM, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1729 HUD.AddCheckBox(IDC_INPUTINVPITCHTRIM, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigPitchTrim.invert);
1731 y += 32.0f * gui->game->displayscale;
1732
1733 HUD.AddStatic(IDC_INPUTLABELROLL, gui->strings[L_CONFIG_ROLL].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1735 HUD.AddComboBox(IDC_INPUTDEVICEROLL, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1737 HUD.AddCheckBox(IDC_INPUTINVROLL, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigRoll.invert);
1739 y += 32.0f * gui->game->displayscale;
1740
1741 HUD.AddStatic(IDC_INPUTLABELYAW, gui->strings[L_CONFIG_YAW].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1743 HUD.AddComboBox(IDC_INPUTDEVICEYAW, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1745 HUD.AddCheckBox(IDC_INPUTINVYAW, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigYaw.invert);
1747 HUD.AddCheckBox(IDC_INPUTSPLITYAW, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigYaw.split);
1749 y += 32.0f * gui->game->displayscale;
1750
1751 HUD.AddStatic(IDC_INPUTLABELTHRUSTLEFT, gui->strings[L_CONFIG_LEFTTHRUST].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1753 HUD.AddComboBox(IDC_INPUTDEVICETHRUSTLEFT, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1755 HUD.AddCheckBox(IDC_INPUTINVTHRUSTLEFT, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigThrustLeft.invert);
1757 HUD.AddCheckBox(IDC_INPUTSPLITTHRUSTLEFT, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigThrustLeft.split);
1759 y += 32.0f * gui->game->displayscale;
1760
1761 HUD.AddStatic(IDC_INPUTLABELTHRUSTRIGHT, gui->strings[L_CONFIG_RIGHTTHRUST].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1763 HUD.AddComboBox(IDC_INPUTDEVICETHRUSTRIGHT, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1765 HUD.AddCheckBox(IDC_INPUTINVTHRUSTRIGHT, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigThrustRight.invert);
1767 HUD.AddCheckBox(IDC_INPUTSPLITTHRUSTRIGHT, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigThrustRight.split);
1769 y += 32.0f * gui->game->displayscale;
1770
1771 HUD.AddStatic(IDC_INPUTLABELLEFTTOEBRAKE, gui->strings[L_CONFIG_LEFTBRAKE].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1773 HUD.AddComboBox(IDC_INPUTDEVICELEFTTOEBRAKE, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1775 HUD.AddCheckBox(IDC_INPUTINVLEFTTOEBRAKE, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigLeftToeBrake.invert);
1777 HUD.AddCheckBox(IDC_INPUTSPLITLEFTTOEBRAKE, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigLeftToeBrake.split);
1779 y += 32.0f * gui->game->displayscale;
1780
1781 HUD.AddStatic(IDC_INPUTLABELRIGHTTOEBRAKE, gui->strings[L_CONFIG_RIGHTBRAKE].c_str(), xLabel, static_cast<int>(y + labelOffsetY), widthDevice, lineHeight);
1783 HUD.AddComboBox(IDC_INPUTDEVICERIGHTTOEBRAKE, xDevice, static_cast<int>(y), widthDevice, lineHeight);
1785 HUD.AddCheckBox(IDC_INPUTINVRIGHTTOEBRAKE, nullptr, xInv, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigRightToeBrake.invert);
1787 HUD.AddCheckBox(IDC_INPUTSPLITRIGHTTOEBRAKE, nullptr, xSplit, static_cast<int>(y), widthCheckboxes, static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.inputConfigRightToeBrake.split);
1789 y += 32.0f * gui->game->displayscale;
1790
1791
1822 for (UINT i = 0; i < gui->game->viewscreen->ptrJoystick->deviceList.size(); i++)
1823 {
1824 const DIDEVICEINSTANCE device = gui->game->viewscreen->ptrJoystick->deviceList.at(i);
1826 if (gui->game->config.inputConfigLookLateral.guid == device.guidInstance)
1829 if (gui->game->config.inputConfigLookVertical.guid == device.guidInstance)
1832 if (gui->game->config.inputConfigWalkLateral.guid == device.guidInstance)
1835 if (gui->game->config.inputConfigWalkVertical.guid == device.guidInstance)
1838 if (gui->game->config.inputConfigSteer.guid == device.guidInstance)
1840 HUD.GetComboBox(IDC_INPUTDEVICEGAS)->AddItem(device.tszInstanceName, &gui->game->config.inputConfigGas);
1841 if (gui->game->config.inputConfigGas.guid == device.guidInstance)
1844 if (gui->game->config.inputConfigBrake.guid == device.guidInstance)
1847 if (gui->game->config.inputConfigPitch.guid == device.guidInstance)
1850 if (gui->game->config.inputConfigPitchTrim.guid == device.guidInstance)
1853 if (gui->game->config.inputConfigRoll.guid == device.guidInstance)
1855 HUD.GetComboBox(IDC_INPUTDEVICEYAW)->AddItem(device.tszInstanceName, &gui->game->config.inputConfigYaw);
1856 if (gui->game->config.inputConfigYaw.guid == device.guidInstance)
1859 if (gui->game->config.inputConfigThrustLeft.guid == device.guidInstance)
1862 if (gui->game->config.inputConfigThrustRight.guid == device.guidInstance)
1865 if (gui->game->config.inputConfigLeftToeBrake.guid == device.guidInstance)
1868 if (gui->game->config.inputConfigRightToeBrake.guid == device.guidInstance)
1870 }
1871 const int freeTrackIndex = static_cast<int>(gui->game->viewscreen->ptrJoystick->deviceList.size()) + 1;
1878 }
1879 break;
1880
1881 case L_TAB_BINDINGS:
1882 {
1883 oldButtonCount = 0;
1884 keyScanCode = 0;
1885
1886 HUD.AddComboBox(IDC_BINDING_PROFILE, xLabel, static_cast<int>(60.0f * gui->game->displayscale), static_cast<int>(100.0f * gui->game->displayscale), lineHeight);
1887 HUD.GetComboBox(IDC_BINDING_PROFILE)->SetDropHeight(5 * 14, static_cast<int>(14.0f * gui->game->displayscale));
1894 {
1897 }
1898 else if (playerships[0].groundvehicle)
1899 {
1902 }
1903 else
1904 {
1907 }
1908
1909 const int col1 = xLabel;
1910 const int col1width = static_cast<int>(100.0f * gui->game->displayscale);
1911 const int col2 = xLabel + col1width;
1912 const int col2width = static_cast<int>(100.0f * gui->game->displayscale);
1913 const int col3 = col2 + col2width;
1914 const int col3width = static_cast<int>(300.0f * gui->game->displayscale);
1915
1916 float y = 164.0f * gui->game->displayscale;
1917
1918 HUD.AddStatic(IDC_BINDING_DEVICEHEADER, gui->strings[L_CONFIG_BINDINGDEVICEHEADER].c_str(), col1, static_cast<int>(y), col1width, lineHeight);
1920 HUD.AddStatic(IDC_BINDING_INPUTHEADER, gui->strings[L_CONFIG_BINDINGDEVICETRIGGER].c_str(), col2, static_cast<int>(y), col2width, lineHeight);
1922 HUD.AddStatic(IDC_BINDING_BOUNDHEADER, gui->strings[L_CONFIG_BINDINGDEVICEFUNCTION].c_str(), col3, static_cast<int>(y), col3width, lineHeight);
1924 y += lineHeight;
1925
1926 HUD.AddStatic(IDC_BINDING_DEVICE1, L"", col1, static_cast<int>(y + 8), col1width, lineHeight);
1928 HUD.AddStatic(IDC_BINDING_INPUT1, L"", col2, static_cast<int>(y + 8), col2width, lineHeight);
1930 HUD.AddComboBox(IDC_BINDING_BOUND1, col3, static_cast<int>(y), col3width, lineHeight);
1931 HUD.GetComboBox(IDC_BINDING_BOUND1)->SetDropHeight(252, static_cast<int>(14.0f * gui->game->displayscale));
1932 y += lineHeight;
1933
1934 HUD.AddStatic(IDC_BINDING_DEVICE2, L"", col1, static_cast<int>(y + 8), col1width, lineHeight);
1936 HUD.AddStatic(IDC_BINDING_INPUT2, L"", col2, static_cast<int>(y + 8), col2width, lineHeight);
1938 HUD.AddComboBox(IDC_BINDING_BOUND2, col3, static_cast<int>(y), col3width, lineHeight);
1939 HUD.GetComboBox(IDC_BINDING_BOUND2)->SetDropHeight(252, static_cast<int>(14.0f * gui->game->displayscale));
1940 y += lineHeight;
1941
1942 HUD.AddStatic(IDC_BINDING_DEVICE3, L"", col1, static_cast<int>(y + 8), col1width, lineHeight);
1944 HUD.AddStatic(IDC_BINDING_INPUT3, L"", col2, static_cast<int>(y + 8), col2width, lineHeight);
1946 HUD.AddComboBox(IDC_BINDING_BOUND3, col3, static_cast<int>(y), col3width, lineHeight);
1947 HUD.GetComboBox(IDC_BINDING_BOUND3)->SetDropHeight(252, static_cast<int>(14.0f * gui->game->displayscale));
1948 //y += lineHeight;
1949
1950 y = 430.0f * gui->game->displayscale;
1951 HUD.AddButton(IDC_BINDING_DEFAULTS, gui->strings[L_CONFIG_BINDINGRESTORE].c_str(), static_cast<int>(142.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(120.0f * gui->game->displayscale), lineHeight);
1952 HUD.AddButton(IDC_BINDING_CLEAR, gui->strings[L_CONFIG_BINDINGCLEAR].c_str(), static_cast<int>(270.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(120.0f * gui->game->displayscale), lineHeight);
1953 HUD.AddCheckBox(IDC_BINDING_UNUSEDONLY, gui->strings[L_CONFIG_BINDINGUNUSED].c_str(), static_cast<int>(398.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(120.0f * gui->game->displayscale), lineHeight);
1954 }
1955 break;
1956
1957 case L_TAB_VIDEO:
1958 {
1959 const auto px = [&](int value) { return static_cast<int>(value * gui->game->displayscale); };
1960 const auto label = [&](int id, const wchar_t* text, int y) {
1961 HUD.AddStatic(id, text, px(16), px(y), px(600), lineHeight);
1962 HUD.GetStatic(id)->GetElement(0)->dwTextFormat = DT_LEFT | DT_VCENTER;
1963 };
1964 const auto radio = [&](int id, int group, const wchar_t* text, int x, int y, int width) {
1965 HUD.AddRadioButton(id, group, text, px(x), px(y), px(width), lineHeight);
1966 };
1968 label(DXUTSETTINGSDLG_STATIC2, L"Display mode", 54);
1971 label(IDC_VIDEO_MSAA_LABEL, L"Anti-aliasing (MSAA)", 134);
1972 radio(IDC_VIDEO_MSAA_OFF, IDC_VIDEO_MSAA_GROUP, L"Off", 24, 162, 90);
1973 radio(IDC_VIDEO_MSAA_2, IDC_VIDEO_MSAA_GROUP, L"2x", 124, 162, 90);
1974 radio(IDC_VIDEO_MSAA_4, IDC_VIDEO_MSAA_GROUP, L"4x", 224, 162, 90);
1975 radio(IDC_VIDEO_MSAA_8, IDC_VIDEO_MSAA_GROUP, L"8x", 324, 162, 90);
1976 label(IDC_VIDEO_MSAA_HELP, L"Higher levels smooth edges but use more GPU time and memory.", 192);
1977 label(IDC_VIDEO_VSYNC_LABEL, L"Vertical sync (VSync)", 244);
1978 radio(IDC_VIDEO_VSYNC_ON, IDC_VIDEO_VSYNC_GROUP, L"On", 24, 272, 90);
1979 radio(IDC_VIDEO_VSYNC_OFF, IDC_VIDEO_VSYNC_GROUP, L"Off", 124, 272, 90);
1980 label(IDC_VIDEO_VSYNC_HELP, L"On prevents screen tearing. Off may improve responsiveness and frame rate.", 302);
1981 label(IDC_VIDEO_STATUS, L"", 362);
1983 }
1984 break;
1985
1986 case L_TAB_SOUND:
1987 {
1988 float y = 12.0f * gui->game->displayscale;
1989
1990 HUD.AddStatic(IDC_SOUNDLEGACYLABEL, gui->strings[L_CONFIG_DEFAULT].c_str(), xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
1992 y += lineHeight;
1993 HUD.AddComboBox(IDC_SOUNDDEVICELEGACY, xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
1994 HUD.AddCheckBox(IDC_SOUNDPLAYINTRO, gui->strings[L_CONFIG_MUSIC].c_str(), static_cast<int>(448.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(150.0f * gui->game->displayscale), lineHeight, gui->game->config.g_bSoundIntroMusic);
1995 y += lineHeight;
1996 HUD.AddSlider(IDC_MASTERVOLUMELEGACY, static_cast<int>(24.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(175.0f * gui->game->displayscale), lineHeight, 0, 100, static_cast<int>(gui->game->config.soundConfigLegacy.volume * 100.0f));
1997 y += 36 * gui->game->displayscale;
1998
1999 HUD.AddStatic(IDC_SOUNDCOMPUTERLABEL, gui->strings[L_CONFIG_AVIONICS].c_str(), xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2001 y += lineHeight;
2002 HUD.AddComboBox(IDC_SOUNDDEVICECOMPUTER, xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2003 HUD.AddButton(IDC_SOUNDPLAYTESTLEFT, gui->strings[L_CONFIG_TESTLEFT].c_str(), static_cast<int>(448.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(150.0f * gui->game->displayscale), lineHeight, gui->game->config.g_bSoundIntroMusic);
2004 y += lineHeight;
2005 HUD.AddSlider(IDC_MASTERVOLUMECOMPUTER, static_cast<int>(24.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(175.0f * gui->game->displayscale), lineHeight, 0, 100, static_cast<int>(gui->game->config.soundConfigComputer.volume * 100.0f));
2006 y += 36 * gui->game->displayscale;
2007
2008 HUD.AddStatic(IDC_SOUNDCOMMSLABEL, gui->strings[L_CONFIG_COMMUNICATIONS].c_str(), xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2010 y += lineHeight;
2011 HUD.AddComboBox(IDC_SOUNDDEVICECOMMS, xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2012 HUD.AddButton(IDC_SOUNDPLAYTESTRIGHT, gui->strings[L_CONFIG_TESTRIGHT].c_str(), static_cast<int>(448.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(150.0f * gui->game->displayscale), lineHeight, gui->game->config.g_bSoundIntroMusic);
2013 y += lineHeight;
2014 HUD.AddSlider(IDC_MASTERVOLUMECOMMS, static_cast<int>(24.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(175.0f * gui->game->displayscale), lineHeight, 0, 100, static_cast<int>(gui->game->config.soundConfigComms.volume * 100.0f));
2015 y += 36 * gui->game->displayscale;
2016
2017 HUD.AddStatic(IDC_SOUNDRADIOLABEL, gui->strings[L_CONFIG_RADIO].c_str(), xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2019 y += lineHeight;
2020 HUD.AddComboBox(IDC_SOUNDDEVICERADIO, xLabel, static_cast<int>(y), static_cast<int>(400.0f * gui->game->displayscale), lineHeight);
2021 y += lineHeight;
2022 HUD.AddSlider(IDC_MASTERVOLUMERADIO, static_cast<int>(24.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(175.0f * gui->game->displayscale), lineHeight, 0, 100, static_cast<int>(gui->game->config.soundConfigRadio.volume * 100.0f));
2023 y += 36 * gui->game->displayscale;
2024
2025 for (size_t i = 0; i < gui->game->sound->deviceNames.size(); i++)
2026 {
2027 WCHAR widever[99];
2028 swprintf_s(widever, 99, L"%S", gui->game->sound->deviceNames.at(i).c_str());
2033 }
2034
2039 }
2040 break;
2041
2042 case L_TAB_ACCOUNT:
2043 {
2044 int x = xLabel;
2045 float y = 12.0f * gui->game->displayscale;
2046
2047 HUD.AddCheckBox(IDC_REMEMBERLOGIN, gui->strings[L_BUTTON_REMEMBERLOGIN].c_str(), static_cast<int>(x + 200.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(24.0f * gui->game->displayscale), gui->game->config.g_bAutoLogin);
2048
2049 y += 32 * gui->game->displayscale;
2050 y += lineHeight;
2051
2052 HUD.AddButton(IDC_PLAYERPORTAL, gui->strings[L_CAPTION_PLAYERPORTAL].c_str(), static_cast<int>(200.0f * gui->game->displayscale), static_cast<int>(y), static_cast<int>(192.0f * gui->game->displayscale), static_cast<int>(32.0f * gui->game->displayscale), 0, false);
2053 }
2054 break;
2055 }
2056}
2057
2059{
2060 active = false;
2061 minimized = minimize;
2063 if (g_bTextInput == 1)
2064 g_bTextInput = 0;
2065}
2066
2068{
2069 buttonGuids.clear();
2070 buttonIndices.clear();
2071 buttonFriendly.clear();
2072}
2073
2075{
2076 povGuids.clear();
2077 povIndices.clear();
2078 povValues.clear();
2079}
2080
2082{
2083 keyScanCode = scancode;
2084}
2085
2086void ConfigurationDialog::SetButton(GUID guid, int index, std::string friendly)
2087{
2088 buttonGuids.emplace_back(guid);
2089 buttonIndices.emplace_back(index);
2090 buttonFriendly.emplace_back(friendly);
2091}
2092
2093void ConfigurationDialog::SetPOV(GUID guid, int index, DWORD value, std::string friendly)
2094{
2095 povGuids.emplace_back(guid);
2096 povIndices.emplace_back(index);
2097 povValues.emplace_back(value);
2098 povFriendly.emplace_back(friendly);
2099}
@ ActiveHelpEnum
Definition ActiveHelp.h:444
@ LookAroundGamepad
Definition ActiveHelp.h:419
@ CenterUp
Definition ActiveHelp.h:385
@ LookAroundMouse
Definition ActiveHelp.h:384
#define V(expression)
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
SCRIPT_CONTROL SCRIPT_STATE const void DWORD
#define EVENT_COMBOBOX_SELECTION_CHANGED
Definition Controls.h:23
#define designedHeightC
Definition GameClass.h:24
#define designedWidthC
Definition GameClass.h:23
const GUID MYGUID_FREETRACK
Definition Guids.h:8
const GUID MYGUID_NULL
Definition Guids.h:3
#define MAX_TAB
#define MAX_SCAN
@ REF_INANOTHER
Definition ServerTypes.h:45
@ SOUND_STATIONIDLL
Definition Sound.h:330
@ SOUND_TEST
Definition Sound.h:146
@ SOUND_STATIONIDCK
Definition Sound.h:332
@ SOUND_ENUMERATION
Definition Sound.h:344
BindingEnum
Definition binding.h:6
@ ENUMERATION
Definition binding.h:106
@ ADMIN
Definition binding.h:115
@ AIRSPACE
Definition binding.h:114
@ GV
Definition binding.h:113
@ INTERIOR
Definition binding.h:112
@ GLOBAL
Definition binding.h:111
Definition Bus.h:20
short targetC
Definition Bus.h:480
short scanslot[MAX_SCAN]
Definition Bus.h:485
SoundConfig soundConfigComms
Definition config.h:50
InputConfig inputConfigSteer
Definition config.h:38
InputConfig inputConfigLeftToeBrake
Definition config.h:41
SoundConfig soundConfigLegacy
Definition config.h:51
SoundConfig soundConfigComputer
Definition config.h:49
bool videoVSync
Definition config.h:28
InputConfig inputConfigGas
Definition config.h:39
InputConfig inputConfigThrustRight
Definition config.h:36
std::vector< KeyBinding > keyBindings
Definition config.h:54
InputConfig inputConfigLookLateral
Definition config.h:43
InputConfig inputConfigBrake
Definition config.h:40
bool g_bSoundIntroMusic
Definition config.h:18
std::vector< ButtonBinding > buttonBindings
Definition config.h:55
unsigned char videoSamples
Definition config.h:27
InputConfig inputConfigWalkLateral
Definition config.h:46
InputConfig inputConfigRoll
Definition config.h:33
InputConfig inputConfigLookVertical
Definition config.h:44
InputConfig inputConfigWalkVertical
Definition config.h:47
unsigned char language
Definition config.h:16
InputConfig inputConfigThrustLeft
Definition config.h:35
std::vector< POVBinding > povBindings
Definition config.h:56
InputConfig inputConfigYaw
Definition config.h:34
bool g_bClosedCaptioning
Definition config.h:30
InputConfig inputConfigRightToeBrake
Definition config.h:42
InputConfig inputConfigPitch
Definition config.h:32
void Save()
Definition config.cpp:648
float scale
Definition config.h:29
void DefaultBindings()
Definition config.cpp:109
bool g_bStartFullscreen
Definition config.h:26
bool g_bAutoLogin
Definition config.h:19
SoundConfig soundConfigRadio
Definition config.h:52
InputConfig inputConfigPitchTrim
Definition config.h:45
void Close(bool minimize) override
void FillBindingDropdown(int control, BindingEnum preserve)
void UpdateMenu(short tab) override
std::vector< std::string > povFriendly
static void UpdateInput(InputConfig *config)
std::vector< DWORD > povValues
void ShowStatus(InputConfig *input_config, int y, RiseMath::Vector3 *tracked, bool engine) const
std::vector< int > buttonIndices
void CreateAxisDropdown(int control, int y, InputConfig *config)
std::vector< std::string > buttonFriendly
std::vector< GUID > povGuids
void SetButton(GUID guid, int index, std::string friendly)
std::vector< int > povIndices
std::vector< GUID > buttonGuids
void SetPOV(GUID guid, int index, DWORD value, std::string friendly)
static void CALLBACK DialogCallback(UINT nEvent, int nControlID, RiseControl *pControl, void *pUserContext)
void SetKey(short scancode)
void DrawNetworkTelemetry(const RiseMath::Vector3 *tracked) const
void Draw(RiseMath::Vector3 *tracked) override
static HMI * gui
Definition DialogBase.h:42
short icon
Definition DialogBase.h:55
bool active
Definition DialogBase.h:73
short activetab
Definition DialogBase.h:64
short text
Definition DialogBase.h:71
static Logger * logger
Definition DialogBase.h:43
short tabs
Definition DialogBase.h:64
short defaultwidth
Definition DialogBase.h:53
static void OnDeviceReset()
bool minimized
Definition DialogBase.h:104
WCHAR msgbartext[HELP_SIZE]
Definition DialogBase.h:84
short tabusedefaultlang[MAX_TAB]
Definition DialogBase.h:52
short width
Definition DialogBase.h:62
RiseMath::Vector3 windowdefaultlocation
Definition DialogBase.h:54
RiseDialog HUD
Definition DialogBase.h:100
bool usesHUD
Definition DialogBase.h:58
bool allowresize
Definition DialogBase.h:47
bool normalinterlace
Definition DialogBase.h:56
bool allowscroll
Definition DialogBase.h:47
DialogBase(short id)
bool enabled
Definition DialogBase.h:73
char msgbarcolor
Definition DialogBase.h:83
short defaultheight
Definition DialogBase.h:53
void Reset()
Definition FreeTrack.cpp:29
std::unique_ptr< Bus > bus
Definition GameClass.h:108
Config config
Definition GameClass.h:100
float dpiscale
Definition GameClass.h:130
std::unique_ptr< Sound > sound
Definition GameClass.h:104
std::unique_ptr< Networking > networking
Definition GameClass.h:103
bool vphelp[vphelpC]
Definition GameClass.h:101
std::unique_ptr< Viewscreen > viewscreen
Definition GameClass.h:107
float displayscale
Definition GameClass.h:130
float displayWidth
Definition GameClass.h:131
float displayHeight
Definition GameClass.h:131
void ToggleFullScreen(bool goFullScreen)
GameClass * game
Definition gui.h:1213
void AddLanguageOptions(UIControlIds controlId, RiseDialog *HUD) const
Definition gui.cpp:1784
SPlayerData player[MAX_ONLINEPLAYERS]
Definition gui.h:1093
Rendering::RenderFont * g_pChatFont
Definition gui.h:1053
void TriggerWelcomeApt2() const
Definition gui.cpp:1281
void LoadPeopleSounds() const
Definition gui.cpp:1215
std::wstring strings[L_ENUMERATION]
Definition gui.h:1076
void LoadLanguage()
Definition gui.cpp:1877
void GetVersionText(WCHAR *, int size) const
Definition gui.cpp:2219
bool eastasian
Definition gui.h:1040
InformationDialog * informationDialog
Definition gui.h:1120
unsigned char ourplayerC
Definition gui.h:1094
static void RestoreDefaults()
Definition gui.cpp:2230
Rendering::RenderFont * g_pFont
Definition gui.h:1052
Rendering::RenderTexture * m_pddsBindings
Definition gui.h:1070
RiseDialogResourceManager g_DialogResourceManager
Definition gui.h:1079
Networking * networking
Definition gui.h:1211
bool IsAdmin
Definition gui.h:1108
Rendering::RenderSprite * g_pTextSprite
Definition gui.h:1051
bool DismissHelp(int helpId, int nControlID=GUI_UNDERSTOOD)
bool PopUpHelp(short helpId, bool allowDismiss=true, bool isLearnMore=false)
void Log(const char *msg, Level level=Info, int errorCode=0)
Definition Logger.cpp:283
void AddToCallStack(const char *msg)
Definition Logger.cpp:355
@ Debug
Definition Logger.h:27
RakNet::RakNetStatistics * GetStatistics() const
void SendToServer(void *pData, DWORD dwSize, bool bGuaranteed, PacketOrdering order=ORDERING_NONE) const
int GetPingTime() const
void RequestVerbiage(int helpId) const
INT DrawTextW(RenderSprite *sprite, const wchar_t *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
INT DrawTextA(RenderSprite *sprite, const char *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
HRESULT Draw(RenderTexture *image, const RECT *rectangle, const RiseMath::Vector3 *center, const RiseMath::Vector3 *position, PackedColor color)
bool GetChecked()
Definition Controls.h:766
HRESULT SetSelectedByIndex(UINT index)
void RemoveAllItems()
UIComboBoxItem * GetSelectedItem()
HRESULT AddItem(const WCHAR *strText, void *pData)
HRESULT SetSelectedByData(void *pData)
void SetDropHeight(UINT nHeight, UINT fHeight)
Definition Controls.h:1029
int GetSelectedIndex() const
Definition Controls.h:1042
RiseElement * GetElement(UINT iElement)
Definition Controls.h:636
virtual void SetVisible(bool bVisible)
Definition Controls.h:583
virtual void SetEnabled(bool bEnabled)
Definition Controls.h:575
void RemoveControl(int ID)
Definition Controls.cpp:226
void Init(RiseDialogResourceManager *pManager, bool bRegisterDialog=true)
Definition Controls.cpp:176
HRESULT AddComboBox(int ID, int x, int y, int width, int height, UINT nHotKey=0, bool bIsDefault=false, RiseComboBox **ppCreated=NULL)
RiseComboBox * GetComboBox(int ID)
Definition Controls.h:188
void EnableKeyboardInput(bool bEnable)
Definition Controls.h:320
HRESULT AddCheckBox(int ID, LPCWSTR strText, int x, int y, int width, int height, bool bChecked=false, UINT nHotkey=0, bool bIsDefault=false, RiseCheckBox **ppCreated=NULL)
RiseRadioButton * GetRadioButton(int ID)
Definition Controls.h:184
HRESULT AddStatic(int ID, LPCWSTR strText, int x, int y, int width, int height, bool bIsDefault=false, RiseStatic **ppCreated=NULL, bool bShadow=true)
RiseStatic * GetStatic(int ID)
Definition Controls.h:172
HRESULT AddRadioButton(int ID, UINT nButtonGroup, LPCWSTR strText, int x, int y, int width, int height, bool bChecked=false, UINT nHotkey=0, bool bIsDefault=false, RiseRadioButton **ppCreated=NULL)
RiseCheckBox * GetCheckBox(int ID)
Definition Controls.h:180
RiseSlider * GetSlider(int ID)
Definition Controls.h:192
HRESULT SetFont(UINT index, LPCWSTR strFaceName, LONG height, LONG weight)
Definition Controls.cpp:709
void SetCallback(UICallback pCallback, void *pUserContext=NULL)
Definition Controls.cpp:212
HRESULT AddButton(int ID, LPCWSTR strText, int x, int y, int width, int height, UINT nHotkey=0, bool bIsDefault=false, RiseButton **ppCreated=NULL)
HRESULT AddSlider(int ID, int x, int y, int width, int height, int min=0, int max=100, int value=50, bool bIsDefault=false, RiseSlider **ppCreated=NULL)
DWORD dwTextFormat
Definition Controls.h:118
HRESULT SetText(LPCWSTR strText)
bool outside
Definition Camera.h:17
void ChangeVolume(SoundConfig *config, float modVolume)
Definition Sound.cpp:551
void LoadSounds(short instage)
Definition Sound.cpp:2159
int GetConfigSelectionIndex(const SoundConfig *deviceConfig) const
Definition Sound.cpp:155
void InitDevice(SoundConfig *deviceConfig)
Definition Sound.cpp:204
std::vector< std::string > deviceNames
Definition Sound.h:705
void FrameMoveAAC()
Definition Sound.cpp:2424
void PlayEx(SOUNDS soundEnum, bool loop, float volume=1.0f, float frequencyMod=1.0f, float pan=0.0f, bool restart=true, bool fromOutside=false, bool partOfHull=false)
Definition Sound.cpp:1006
void ChangeCockpit(bool force)
Definition Sound.cpp:3645
HSTREAM g_pSoundIntro
Definition Sound.h:698
std::vector< GUID > deviceGuids
Definition Sound.h:706
ChannelMetrics VehicleMetrics(std::size_t slot, double nowSeconds) const
int ClosestWeaponSlot(const Vec3 &worldObserverPosition, const Vec3 &dockObserverPosition) const
ChannelMetrics WeaponMetrics(std::size_t slot, double nowSeconds) const
UploadMetrics GetMetrics(double nowSeconds) const
std::unique_ptr< keyboard > ptrKeyboard
Definition Viewscreen.h:429
std::unique_ptr< cockpit > ptrCockpit
Definition Viewscreen.h:435
std::unique_ptr< joystick > ptrJoystick
Definition Viewscreen.h:430
std::unique_ptr< FreeTrack > ptrFreeTrack
Definition Viewscreen.h:431
SCamera * camera
Definition Viewscreen.h:137
void ResetHelp() const
Definition cockpit.cpp:4664
std::vector< DIDEVICEINSTANCE > deviceList
Definition joystick.h:29
void InitializeDevice(InputConfig *config, std::string control) const
Definition joystick.cpp:581
HRESULT Poll(InputConfig *config, long *value)
Definition joystick.cpp:137
const int nullzone
Definition joystick.h:30
std::string Translate(short scancode)
Definition keyboard.cpp:307
bool g_bShift
Definition keyboard.h:31
s_network_objects playerships[MAX_SCAN]
Definition globals.cpp:112
char g_bTextInput
Definition globals.cpp:61
#define MAX_LINES
Definition gui.h:24
@ L_CONFIG_AXIS
Definition gui.h:277
@ L_CONFIG_INVERT
Definition gui.h:279
@ L_ENUMERATION
Definition gui.h:655
@ L_CONFIG_PROFILEAIRSPACE
Definition gui.h:317
@ L_CONFIG_OK
Definition gui.h:266
@ L_CONFIG_DISABLE
Definition gui.h:271
@ L_CONFIG_CHANNEL
Definition gui.h:275
@ L_CONFIG_FREETRACK_UNKNOWN
Definition gui.h:649
@ L_CONFIG_PROFILEGROUND
Definition gui.h:316
@ L_MESSAGE_FREETRACK_DISABLED
Definition gui.h:652
@ L_TAB_INPUT
Definition gui.h:142
@ L_CONFIG_MOUSE
Definition gui.h:300
@ L_CONFIG_PITCH
Definition gui.h:280
@ L_CONFIG_FREETRACK_ANGLE
Definition gui.h:648
@ L_TAB_BINDINGS
Definition gui.h:143
@ L_TAB_NETWORK
Definition gui.h:147
@ L_CONFIG_FREETRACK
Definition gui.h:645
@ L_CONFIG_GAMEHELP
Definition gui.h:269
@ L_CONFIG_WALKVERTICAL
Definition gui.h:305
@ L_CAPTION_PLAYERPORTAL
Definition gui.h:167
@ L_MESSAGE_FREETRACK_LIVE
Definition gui.h:651
@ L_CONFIG_FAIL
Definition gui.h:265
@ L_CONFIG_RIGHTBRAKE
Definition gui.h:286
@ L_CONFIG_STEERING
Definition gui.h:287
@ L_CONFIG_TESTLEFT
Definition gui.h:292
@ L_CONFIG_MOVE
Definition gui.h:264
@ L_CONFIG_ROLL
Definition gui.h:281
@ L_CONFIG_MINIFY
Definition gui.h:273
@ L_CONFIG_BINDINGDEVICEHEADER
Definition gui.h:318
@ L_DIALOG_BINDING
Definition gui.h:78
@ L_CONFIG_MUSIC
Definition gui.h:291
@ L_CONFIG_FONTANDSCALE
Definition gui.h:272
@ L_MESSAGE_FREETRACK_STATUS
Definition gui.h:650
@ L_CONFIG_LANGUAGE
Definition gui.h:267
@ L_CONFIG_CLOSEDCAPTIONING
Definition gui.h:268
@ L_TAB_INTERFACE
Definition gui.h:141
@ L_CONFIG_DEVICE
Definition gui.h:276
@ L_CONFIG_AVIONICS
Definition gui.h:294
@ L_CONFIG_FREETRACK_YAW
Definition gui.h:646
@ L_CONFIG_LEFTTHRUST
Definition gui.h:283
@ L_CONFIG_BINDINGUNUSED
Definition gui.h:323
@ L_CONFIG_AXIS_RX
Definition gui.h:309
@ L_TAB_VIDEO
Definition gui.h:144
@ L_CONFIG_YAW
Definition gui.h:282
@ L_TAB_SOUND
Definition gui.h:145
@ L_CONFIG_KEYBOARD
Definition gui.h:263
@ L_CONFIG_PROFILEINTERIOR
Definition gui.h:315
@ L_CONFIG_RADIO
Definition gui.h:296
@ L_TAB_ACCOUNT
Definition gui.h:146
@ L_BUTTON_RESTOREDEFAULTS
Definition gui.h:155
@ L_CONFIG_TESTRIGHT
Definition gui.h:293
@ L_CONFIG_FREETRACK_PITCH
Definition gui.h:647
@ L_CONFIG_BRAKE
Definition gui.h:289
@ L_CONFIG_AXIS_Z
Definition gui.h:308
@ L_CONFIG_BINDINGRESTORE
Definition gui.h:321
@ L_CONFIG_AXIS_S1
Definition gui.h:312
@ L_CONFIG_AXIS_RY
Definition gui.h:310
@ L_CONFIG_COMMUNICATIONS
Definition gui.h:295
@ L_CONFIG_SPLIT
Definition gui.h:299
@ L_CONFIG_FULLSCREEN
Definition gui.h:298
@ L_CONFIG_LOOKLATERAL
Definition gui.h:301
@ L_CONFIG_ACCELERATOR
Definition gui.h:288
@ L_CONFIG_BINDINGDEVICEFUNCTION
Definition gui.h:320
@ L_CONFIG_AXIS_S2
Definition gui.h:313
@ L_LIST_PERCENT
Definition gui.h:105
@ L_DIALOG_CONFIGURATION
Definition gui.h:77
@ L_CONFIG_BINDINGDEVICETRIGGER
Definition gui.h:319
@ L_MESSAGE_NETWORKLAG
Definition gui.h:175
@ L_CONFIG_LEFTBRAKE
Definition gui.h:285
@ L_CONFIG_WINDOWED
Definition gui.h:297
@ L_CONFIG_BINDINGCLEAR
Definition gui.h:322
@ L_CONFIG_RIGHTTHRUST
Definition gui.h:284
@ L_CONFIG_WALKLATERAL
Definition gui.h:304
@ L_CONFIG_MAGNIFY
Definition gui.h:274
@ L_CONFIG_DEFAULT
Definition gui.h:290
@ L_MESSAGE_FREETRACK_WAITING
Definition gui.h:654
@ L_CONFIG_LOOKVERTICAL
Definition gui.h:302
@ L_CONFIG_VALUE
Definition gui.h:278
@ L_CONFIG_AXIS_Y
Definition gui.h:307
@ L_CONFIG_AXIS_X
Definition gui.h:306
@ L_CONFIG_PROFILEGLOBAL
Definition gui.h:314
@ L_BIND_ENGINE1_CYCLE
Definition gui.h:448
@ L_CONFIG_AXIS_RZ
Definition gui.h:311
@ L_CONFIG_RESET
Definition gui.h:270
@ L_MESSAGE_SOUNDUTILIZATION
Definition gui.h:173
@ L_CONFIG_PITCHTRIM
Definition gui.h:303
@ L_BUTTON_REMEMBERLOGIN
Definition gui.h:157
@ L_MESSAGE_FREETRACK_UNAVAILABLE
Definition gui.h:653
@ IDC_INPUTAXISTHRUSTLEFT
Definition gui.h:822
@ IDC_INPUTLABELLEFTTOEBRAKE
Definition gui.h:850
@ IDC_PLAYERPORTAL
Definition gui.h:960
@ IDC_INPUTLABELRIGHTTOEBRAKE
Definition gui.h:856
@ IDC_INPUTLABELSTEERING
Definition gui.h:832
@ IDC_INPUTDEVICEWALKLATERAL
Definition gui.h:786
@ IDC_INPUTHEADERINV
Definition gui.h:770
@ IDC_INPUTLABELTHRUSTRIGHT
Definition gui.h:826
@ IDC_INPUTINVLOOKLATERAL
Definition gui.h:776
@ IDC_VIDEO_MSAA_4
Definition gui.h:916
@ DXUTSETTINGSDLG_CLOSEDCAPTIONING
Definition gui.h:891
@ IDC_INPUTLABELBRAKE
Definition gui.h:844
@ IDC_INPUTINVGAS
Definition gui.h:841
@ IDC_INPUTSPLITGAS
Definition gui.h:842
@ IDC_INPUTAXISGAS
Definition gui.h:840
@ IDC_INPUTDEVICESTEERING
Definition gui.h:833
@ IDC_INPUTDEVICEPITCH
Definition gui.h:798
@ IDC_VIDEO_VSYNC_GROUP
Definition gui.h:920
@ IDC_VIDEO_VSYNC_HELP
Definition gui.h:923
@ IDC_INPUTAXISROLL
Definition gui.h:810
@ IDC_GAMEHELPLABEL
Definition gui.h:758
@ IDC_SOUNDDEVICERADIO
Definition gui.h:953
@ IDC_INPUTINVLOOKVERTICAL
Definition gui.h:782
@ IDC_SOUNDCOMPUTERLABEL
Definition gui.h:946
@ IDC_INPUTAXISRIGHTTOEBRAKE
Definition gui.h:858
@ IDC_SCALELABEL
Definition gui.h:763
@ IDC_INPUTINVROLL
Definition gui.h:811
@ IDC_BINDING_BOUND1
Definition gui.h:870
@ IDC_SOUNDLEGACYLABEL
Definition gui.h:942
@ IDC_INPUTLABELPITCH
Definition gui.h:797
@ IDC_MASTERVOLUMECOMMS
Definition gui.h:951
@ IDC_BINDING_DEVICE2
Definition gui.h:871
@ IDC_INPUTDEVICETHRUSTRIGHT
Definition gui.h:827
@ IDC_BINDING_DEFAULTS
Definition gui.h:877
@ IDC_BINDING_BOUND2
Definition gui.h:873
@ IDC_INPUTAXISBRAKE
Definition gui.h:846
@ IDC_INPUTDEVICEPITCHTRIM
Definition gui.h:803
@ IDC_INPUTAXISPITCHTRIM
Definition gui.h:804
@ IDC_INPUTDEVICELOOKLATERAL
Definition gui.h:774
@ IDC_SOUNDPLAYINTRO
Definition gui.h:944
@ IDC_INPUTLABELROLL
Definition gui.h:808
@ IDC_BINDING_PROFILE
Definition gui.h:864
@ IDC_INPUTSPLITTHRUSTRIGHT
Definition gui.h:830
@ IDC_VIDEO_STATUS
Definition gui.h:924
@ IDC_SOUNDPLAYTESTLEFT
Definition gui.h:955
@ IDC_INPUTLABELTHRUSTLEFT
Definition gui.h:820
@ IDC_BINDING_DEVICE1
Definition gui.h:868
@ IDC_VIDEO_MSAA_LABEL
Definition gui.h:912
@ IDC_INPUTSPLITLEFTTOEBRAKE
Definition gui.h:854
@ IDC_BINDING_INPUT3
Definition gui.h:875
@ IDC_INPUTINVBRAKE
Definition gui.h:847
@ DXUTSETTINGSDLG_STATIC1
Definition gui.h:882
@ IDC_BINDING_DEVICE3
Definition gui.h:874
@ IDC_SOUNDDEVICECOMPUTER
Definition gui.h:947
@ IDC_SOUNDDEVICECOMMS
Definition gui.h:950
@ IDC_INPUTDEVICEGAS
Definition gui.h:839
@ IDC_RESTOREDEFAULTS
Definition gui.h:757
@ IDC_SOUNDDEVICELEGACY
Definition gui.h:943
@ IDC_INPUTAXISWALKVERTICAL
Definition gui.h:793
@ IDC_MASTERVOLUMERADIO
Definition gui.h:954
@ IDC_INPUTLABELWALKLATERAL
Definition gui.h:785
@ IDC_SOUNDPLAYTESTRIGHT
Definition gui.h:956
@ IDC_INPUTLABELYAW
Definition gui.h:814
@ DXUTSETTINGSDLG_STATIC2
Definition gui.h:883
@ IDC_INPUTINVSTEERING
Definition gui.h:835
@ IDC_BINDING_BOUNDHEADER
Definition gui.h:867
@ IDC_LANGUAGE
Definition gui.h:754
@ IDC_VIDEO_VSYNC_OFF
Definition gui.h:922
@ IDC_VIDEO_MSAA_2
Definition gui.h:915
@ IDC_INPUTAXISWALKLATERAL
Definition gui.h:787
@ IDC_BINDING_INPUT2
Definition gui.h:872
@ IDC_INPUTHEADERAXIS
Definition gui.h:768
@ IDC_INPUTINVWALKLATERAL
Definition gui.h:788
@ IDC_INPUTLABELPITCHTRIM
Definition gui.h:802
@ IDC_BINDING_INPUT1
Definition gui.h:869
@ IDC_SOUNDRADIOLABEL
Definition gui.h:952
@ IDC_SCALEMAGNIFY
Definition gui.h:761
@ IDC_BINDING_INPUTHEADER
Definition gui.h:866
@ IDC_INPUTLABELWALKVERTICAL
Definition gui.h:791
@ IDC_INPUTDEVICETHRUSTLEFT
Definition gui.h:821
@ IDC_VIDEO_MSAA_8
Definition gui.h:917
@ IDC_INPUTHEADERDEVICE
Definition gui.h:767
@ IDC_LANGUAGELABEL
Definition gui.h:753
@ IDC_INPUTAXISSTEERING
Definition gui.h:834
@ IDC_INPUTHEADERSPLIT
Definition gui.h:771
@ IDC_INPUTHEADERCHANNEL
Definition gui.h:766
@ IDC_INPUTINVTHRUSTRIGHT
Definition gui.h:829
@ IDC_REMEMBERLOGIN
Definition gui.h:959
@ IDC_INPUTAXISTHRUSTRIGHT
Definition gui.h:828
@ IDC_GAMEHELPRESET
Definition gui.h:759
@ IDC_INPUTSPLITTHRUSTLEFT
Definition gui.h:824
@ IDC_INPUTDEVICELOOKVERTICAL
Definition gui.h:780
@ IDC_INPUTDEVICEYAW
Definition gui.h:815
@ IDC_INPUTHEADERVALUE
Definition gui.h:769
@ IDC_VIDEO_VSYNC_LABEL
Definition gui.h:919
@ IDC_VIDEO_MSAA_OFF
Definition gui.h:914
@ IDC_INPUTSPLITRIGHTTOEBRAKE
Definition gui.h:860
@ DXUTSETTINGSDLG_WINDOWED_GROUP
Definition gui.h:892
@ IDC_VIDEO_MSAA_GROUP
Definition gui.h:913
@ IDC_INPUTDEVICERIGHTTOEBRAKE
Definition gui.h:857
@ IDC_INPUTINVTHRUSTLEFT
Definition gui.h:823
@ IDC_INPUTINVPITCH
Definition gui.h:800
@ DXUTSETTINGSDLG_FULLSCREEN
Definition gui.h:890
@ GUI_REMINDME
Definition gui.h:984
@ IDC_INPUTINVWALKVERTICAL
Definition gui.h:794
@ IDC_INPUTDEVICEWALKVERTICAL
Definition gui.h:792
@ IDC_INPUTAXISLOOKLATERAL
Definition gui.h:775
@ IDC_INPUTDEVICELEFTTOEBRAKE
Definition gui.h:851
@ IDC_INPUTSPLITYAW
Definition gui.h:818
@ IDC_INPUTAXISYAW
Definition gui.h:816
@ IDC_BINDING_CLEAR
Definition gui.h:878
@ IDC_SCALEMINIFY
Definition gui.h:762
@ IDC_MASTERVOLUMELEGACY
Definition gui.h:945
@ IDC_BINDING_UNUSEDONLY
Definition gui.h:879
@ IDC_INPUTSPLITBRAKE
Definition gui.h:848
@ DXUTSETTINGSDLG_WINDOWED
Definition gui.h:888
@ IDC_INPUTINVYAW
Definition gui.h:817
@ IDC_VIDEO_MSAA_HELP
Definition gui.h:918
@ IDC_GAMEHELPDISABLE
Definition gui.h:760
@ IDC_VIDEO_VSYNC_ON
Definition gui.h:921
@ IDC_INPUTAXISPITCH
Definition gui.h:799
@ IDC_INPUTINVLEFTTOEBRAKE
Definition gui.h:853
@ IDC_MASTERVOLUMECOMPUTER
Definition gui.h:948
@ IDC_SOUNDCOMMSLABEL
Definition gui.h:949
@ IDC_INPUTLABELLOOKLATERAL
Definition gui.h:773
@ IDC_INPUTAXISLOOKVERTICAL
Definition gui.h:781
@ IDC_INPUTDEVICEBRAKE
Definition gui.h:845
@ IDC_INPUTINVPITCHTRIM
Definition gui.h:805
@ IDC_INPUTDEVICEROLL
Definition gui.h:809
@ IDC_INPUTINVRIGHTTOEBRAKE
Definition gui.h:859
@ IDC_INPUTLABELGAS
Definition gui.h:838
@ IDC_BINDING_BOUND3
Definition gui.h:876
@ IDC_INPUTLABELLOOKVERTICAL
Definition gui.h:779
@ IDC_BINDING_DEVICEHEADER
Definition gui.h:865
@ IDC_INPUTAXISLEFTTOEBRAKE
Definition gui.h:852
#define HELP_SIZE
Definition gui.h:21
float ClientFPS()
Window11 * ClientHost()
const wchar_t * ClientFrameStats()
constexpr PackedColor ColorARGB(unsigned a, unsigned r, unsigned g, unsigned b)
uint32_t PackedColor
const wchar_t * ClientDeviceStats()
bool ClientWindowed()
auto ToDegree(T value)
Definition ClientMath.h:14
constexpr auto Max(A first, B second)
Definition ClientMath.h:16
double MonotonicSeconds()
UploadDiagnostics gUploadDiagnostics
SnapshotSystem gSnapshotSystem
Hamburger(std::wstring prmVerbiage, int prmIndex)
friend bool operator<(Hamburger a, Hamburger b)
std::wstring verbiage
bool IsFreeTrack() const
Definition InputConfig.h:23
LPDIRECTINPUTDEVICE8 g_pJoystick
Definition InputConfig.h:22
std::string friendlyName
Definition InputConfig.h:26
unsigned char axis
Definition InputConfig.h:14
unsigned char type
std::uint16_t lastDeliverySequenceDelta
std::uint32_t duplicateSourceRevisionCount
double precisionz
Definition globals.h:512
RiseMath::Vector3 dockoffset
Definition globals.h:511
double precisiony
Definition globals.h:512
double precisionx
Definition globals.h:512