mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Colors from config
This commit is contained in:
parent
2b62c170fd
commit
d5916ced9e
@ -19,26 +19,23 @@ class CfgAddons {
|
||||
};
|
||||
};
|
||||
};
|
||||
//PARAMS_4(_name,_localizedName,_localizedDescription,_defaultValue);
|
||||
class ACE_Options {
|
||||
class GVAR(testOption) {
|
||||
displayName = "Config Test";
|
||||
description = "Config Description";
|
||||
default = 1;
|
||||
values[] = {"Yeah", "Naa"};
|
||||
};
|
||||
class GVAR(testOption) {
|
||||
displayName = "Config Test";
|
||||
description = "Config Description";
|
||||
default = 1;
|
||||
values[] = {"Yeah", "Naa"};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Colors {
|
||||
class GVAR(testColor) {
|
||||
displayName = "Color Config Test";
|
||||
description = "Color Config Description";
|
||||
default[] = {0,1,2,3};
|
||||
};
|
||||
class GVAR(testColor) {
|
||||
displayName = "Color Config Test";
|
||||
description = "Color Config Description";
|
||||
default[] = {0,1,1,1};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "gui\define.hpp"
|
||||
#include "gui\settingsMenu.hpp"
|
||||
|
@ -9,11 +9,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
systemChat format ["Reding From config"];
|
||||
|
||||
if (isClass (configFile >> "ACE_Options")) then {
|
||||
_countOptions = count (configFile >> "ACE_Options");
|
||||
|
||||
for "_index" from 0 to (_countOptions - 1) do {
|
||||
_optionEntry = (configFile >> "ACE_Options") select _index;
|
||||
_name = configName _optionEntry;
|
||||
@ -22,19 +19,20 @@ if (isClass (configFile >> "ACE_Options")) then {
|
||||
_default = getNumber (_optionEntry >> "default");
|
||||
_choices = getArray (_optionEntry >> "values");
|
||||
if ((count _choices) == 0) then {
|
||||
_choices = ["Aye", "Nay"];
|
||||
_choices = [(localize "STR_ACE_OptionsMenu_Disabled"), (localize "STR_ACE_OptionsMenu_Enabled")];
|
||||
};
|
||||
[_name, _displayName, _description, _choices, _default] call FUNC(addClientSideOptions);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// class ACE_Options {
|
||||
// GVAR(testOption) {
|
||||
// displayName = "Config Test";
|
||||
// description = "Config Description"
|
||||
// default = 1;
|
||||
// values[] = {"Yeah", "Naa"};
|
||||
// };
|
||||
// };
|
||||
|
||||
if (isClass (configFile >> "ACE_Colors")) then {
|
||||
_countOptions = count (configFile >> "ACE_Colors");
|
||||
for "_index" from 0 to (_countOptions - 1) do {
|
||||
_optionEntry = (configFile >> "ACE_Colors") select _index;
|
||||
_name = configName _optionEntry;
|
||||
_displayName = getText (_optionEntry >> "displayName");
|
||||
_description = getText (_optionEntry >> "description");
|
||||
_default = getArray (_optionEntry >> "default");
|
||||
[_name, _displayName, _description, _default] call FUNC(addClientSideColor);
|
||||
};
|
||||
};
|
||||
|
@ -28,5 +28,29 @@
|
||||
<Hungarian>Opciók</Hungarian>
|
||||
<Italian>Opzioni</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_OptionsMenu_Enabled">
|
||||
<English>Yes</English>
|
||||
<German>Ja</German>
|
||||
<Spanish>Si</Spanish>
|
||||
<Polish>Tak</Polish>
|
||||
<Czech>Ano</Czech>
|
||||
<French>Oui</French>
|
||||
<Russian>Да</Russian>
|
||||
<Hungarian>Igen</Hungarian>
|
||||
<Portuguese>Sim</Portuguese>
|
||||
<Italian>Si</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_OptionsMenu_Disabled">
|
||||
<English>No</English>
|
||||
<German>Nein</German>
|
||||
<Spanish>No</Spanish>
|
||||
<Polish>Nie</Polish>
|
||||
<Czech>Ne</Czech>
|
||||
<French>Non</French>
|
||||
<Russian>Нет</Russian>
|
||||
<Hungarian>Nem</Hungarian>
|
||||
<Portuguese>Não</Portuguese>
|
||||
<Italian>No</Italian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user