VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HeadingModeCommandSpecParam.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
6 #pragma once
7 
9 #include <vlpi/enumDictionary.h>
10 #include <vlpi/enumLoader.h>
12 
19 {
20 public:
21  explicit DtHeadingModeCommandSpecParamBuilder(const Json::Value& staticParams, const std::string& entityName,
22  DtScenarioManager& scnMgr, const Json::Value& typeModifiers)
24  {}
26 
27 private:
28 
29  static Json::Value buildResult(const Json::Value& staticParams)
30  {
31  Json::Value result = staticParams;
32  result["Type"] = "Choice";
33 
34  // order is not incremental, see eg DtTaskTurnToHeadingDialog
35  Json::Value choices(Json::arrayValue);
36  Json::Value choice0, choice1, choice2, choice3;
37  choice0["Value"] = 0;
38  choice0["DisplayName"] = "True North";
39  choice1["Value"] = 3;
40  choice1["DisplayName"] = "Magnetic North";
41  choice2["Value"] = 1;
42  choice2["DisplayName"] = "Host Object (if embarked)";
43  choice3["Value"] = 2;
44  choice3["DisplayName"] = "Current Heading";
45  choices.append(choice0);
46  choices.append(choice1);
47  choices.append(choice2);
48  choices.append(choice3);
49 
50  result["Choices"] = choices;
51  return result;
52  }
53 
54 };
Definition: scenarioManager.h:40
DtHeadingModeCommandSpecParamBuilder(const Json::Value &staticParams, const std::string &entityName, DtScenarioManager &scnMgr, const Json::Value &typeModifiers)
Definition: HeadingModeCommandSpecParam.h:21
Concrete DtCommandSpecParamBuilder wrapping a pre-built JSON result.
Definition: commandSpecParamBuilder.h:50
Abstract base and immediate concrete implementation for per-parameter command spec builders...
virtual Json::Value result() const override
Returns the fully populated JSON descriptor for this parameter. Only valid after isReady() returns tr...
Definition: commandSpecParamBuilder.h:59
DtHeadingModeCommandSpecParamBuilder.
Definition: HeadingModeCommandSpecParam.h:18
IMGUI_API void Value(const char *prefix, bool b)
static Json::Value buildResult(const Json::Value &staticParams)
Definition: HeadingModeCommandSpecParam.h:29

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)