MCPcopy Create free account
hub / github.com/benkuper/Chataigne / State

Method State

Source/StateMachine/State/State.cpp:13–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include "StateMachine/StateMachineIncludes.h"
12
13State::State() :
14 BaseItem(getTypeString(), true)
15{
16
17 itemDataType = "State";
18
19 setHasCustomColor(true);
20 itemColor->setDefaultValue(BG_COLOR.brighter(.1f));
21
22 active = addBoolParameter("Active", "If active, the state's actions and mappings will be effective, otherwise this state won't do anything.", false);
23 loadActivationBehavior = addEnumParameter("On Load Behavior", "This is defining how the state is initializing when loading");
24 loadActivationBehavior->addOption("Restore last state", KEEP)->addOption("Activate", ACTIVE)->addOption("Deactivate", NONACTIVE);
25 checkTransitionsOnActivate = addBoolParameter("Check transitions on activate", "If checked, this will automatically check for already valid conditions on activate.\n \
26 Otherwise, already valid transition will need to be unvalidated and then validated again to be activated.", false);
27
28 focusOnLastActionTriggered = addBoolParameter("Focus on Last Action", "If checked, this will automatically scroll to make the last triggered action visible", false);
29
30 pm.reset(new ProcessorManager("Processors"));
31 addChildControllableContainer(pm.get());
32
33 //pm->setForceDisabled(true);
34
35 pm->setForceDisabled(!active->boolValue() || !enabled->boolValue(), false, true);
36
37
38 //set default value
39 //viewUISize->setBounds(50, 50,1000,1000);
40 viewUISize->setPoint(250, 200);
41 viewUISize->defaultValue = viewUISize->value;
42 viewUISize->resetValue();
43
44 showWarningInUI = true;
45
46 helpID = "State";
47
48}
49
50State::~State()
51{

Callers 1

bluetooth_enabledMethod · 0.80

Calls 4

getTypeStringFunction · 0.50
resetMethod · 0.45
getMethod · 0.45
setForceDisabledMethod · 0.45

Tested by

no test coverage detected