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

Feature request: CBA Settings Button control and public API #1115

Closed
10Dozen opened this issue Apr 11, 2019 · 2 comments
Closed

Feature request: CBA Settings Button control and public API #1115

10Dozen opened this issue Apr 11, 2019 · 2 comments
Labels
Milestone

Comments

@10Dozen
Copy link
Contributor

10Dozen commented Apr 11, 2019

CBA Settings is very nice thing to use, but sometimes mod may need some specific configurator.
For example - class based settings (e.g. specific settings for specific weapon class), which are easier to keep/change in scripts rather than in configs. To make it easy to set up - i may use some specific UI with lists and search/filters stuff (like EJAM has)
But there is no easy way to link my custom configurator with CBA Settings now.

Would be great to have next addition to CBA Settings:
(A) New input for CBA Settings menu - Button:

  • it may look similar to other controls (text at the left, button at the right, tooltip)
  • onClick code should be set by user (e.g. to launch custom configurator)
  • option to make button disabled once clicked (to prevent multiple executions; button may be active again on re-opening settings or switching between mods via dropdown)
  • (optional) disabled button text may be configurable.

(B) CBA Settings API description of what functions should be used to save data from custom configurator to CBA Settings (guess CBA_settings_fnc_set should be used, but maybe some additional validator is needed for public use) + how to read data from CBA Settings to custom configurator..

Expected:
Ability to call custom configuration function from CBA's Addon Options menu by clicking button with user defined exec code. Ability to save data from custom configurator to CBA Settings framework.

@commy2
Copy link
Contributor

commy2 commented Apr 11, 2019

FUNC(set) is for permanent or at least applied changes. The changes in the menu are merely temporary and use SET_TEMP_NAMESPACE_VALUE and SET_TEMP_NAMESPACE_PRIORITY. There are a lot of other interactions between the different controls in the menu. I don't really trust anybody to mess with those tbh.

@10Dozen
Copy link
Contributor Author

10Dozen commented Apr 11, 2019

I don't really trust anybody to mess with those tbh.

I'm agree, that's why i am asking for some sort of public API - to not screw up someone else settings by direct inject or function calls. Ofc, if it possible without re-writing entire cba settings component ;D

@commy2 commy2 added this to the Backlog milestone Jul 25, 2019
@commy2 commy2 mentioned this issue Jan 19, 2020
6 tasks
@commy2 commy2 modified the milestones: Backlog, Ongoing Jan 19, 2020
@commy2 commy2 added the Feature label Jan 19, 2020
@commy2 commy2 closed this as completed Jan 19, 2020
@commy2 commy2 modified the milestones: Ongoing, Backlog Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants