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

Disable default settings button if setting is already default #444

Merged
merged 2 commits into from
Jul 26, 2016

Conversation

PabstMirror
Copy link
Contributor

For CBA Settings, this will grey-out (ctrlEnabled false) the button for default settings if the setting is already set to the default value

I think this will make it easier to find settings that have been changed and easier to get all settings back to default.

Quick demo: https://www.youtube.com/watch?v=A90L1dy9dXE

Also disabled the Import button when in multiplayer as it did not work.

@Killswitch00
Copy link
Contributor

Looks nice.

@commy2 commy2 modified the milestones: 2.5.1, 3.0.1 Jul 26, 2016
@@ -98,6 +103,11 @@ for "_index" from 0 to (((count _defaultValue max 3) min 4) - 1) do {
_color set [_index, _value];
_ctrlSettingPreview ctrlSetBackgroundColor _color;
SET_TEMP_NAMESPACE_VALUE(_setting,_currentValue,_source);

//If new setting is same as default value, grey out the default button
(_control getVariable QGVAR(linkedControls)) params ["", "", "_defaultControl"];
Copy link
Contributor

@commy2 commy2 Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be added to L55

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be added to L92/97

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. IDK why, but it keeps messing up the line of this ^ comment. Meant for L108.

@commy2
Copy link
Contributor

commy2 commented Jul 26, 2016

Looks good. Suggested minor optimizations. After that can be merged.

@PabstMirror
Copy link
Contributor Author

Fixed

@commy2 commy2 merged commit e8c7529 into master Jul 26, 2016
@commy2 commy2 deleted the settingDynamicDefaultButton branch July 26, 2016 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants