Skip to content

Commit

Permalink
Frontend for #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam McKendrick committed Aug 2, 2022
1 parent 330821b commit ff66ddf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions addons/radio/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Note: attributes are not set until edited by the user. Not just opening the
GUI, but actually changing the value of the attribute and saving. The
functions using mission config values will have to account for the possible
absence of config values by defaulting to the defaultValue.
*/

class Cfg3DEN {

class Group {
class AttributeCategories {
class GVAR(groupSettings) {
displayName = "SIA Framework";
collapsed = 0;

class Attributes {
class GVAR(radioChannel) {
displayName = "Radio Channel";
tooltip = "The channel number this group's personal radio will automatically be set to.";
property = QGVAR(radioChannel);
control = "Edit";
expression = "_this setVariable ['%s',_value,true];";

defaultValue = "1";

unique = 0;
validate = "number";
typeName = "NUMBER";
// only units should have this attribute
//condition = "objectControllable";
};
};
};
};
};
};
1 change: 1 addition & 0 deletions addons/radio/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ class CfgPatches {
};

#include "CfgEventHandlers.hpp"
#include "Cfg3DEN.hpp"

0 comments on commit ff66ddf

Please sign in to comment.