Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional caching #4

Closed
diwako opened this issue Jan 11, 2019 · 1 comment
Closed

Additional caching #4

diwako opened this issue Jan 11, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@diwako
Copy link
Owner

diwako commented Jan 11, 2019

Instead of writing the icon styles into global vars and reading them with params use CBA name spaces instead.

Example from commy2

// preInit
commy_rankIcons = [] call CBA_fnc_createNamespace;
commy_rankIcons setVariable ["PRIVATE", _rank_private];
commy_rankIcons setVariable ["CORPORAL", _rank_corporal];
commy_rankIcons setVariable ["SERGEANT", _rank_sergeant];
commy_rankIcons setVariable ["LIEUTENANT", _rank_lieutenant];
commy_rankIcons setVariable ["CAPTAIN", _rank_captain];
commy_rankIcons setVariable ["MAJOR", _rank_major];
commy_rankIcons setVariable ["COLONEL", _rank_colonel];

// script
private _icon = commy_rankIcons getVariable [rank _unit, _rank_private];
@diwako diwako added the enhancement New feature or request label Jan 11, 2019
@diwako diwako added this to the 1.0.0 milestone Jan 11, 2019
@diwako
Copy link
Owner Author

diwako commented Jan 11, 2019

Icon and color caching added.

@diwako diwako closed this as completed Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant