-
Notifications
You must be signed in to change notification settings - Fork 151
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: Customizable Dialog function #1169
Comments
I was trying to make my own system for this and wanted to eventually do a pull request when I got it good enough. It's pretty rough as I just started to learn gui stuff: https://github.com/SceptreOfficial/Custom-Dialog-System Anyways, It would be amazing if this type of function was in CBA. |
I know you might fear that if you implement that there always can be some use-cases where it can't be used/is not flexible enough and someone will complain, want changes etc. but in my opinion something like this will make creating simple modal inputs and other small dialogs immensely easier to do. |
I'm all for @SceptreOfficial 's method. It is like eating your cake AND not just having it, but 2 of it (incremented)! |
IMHO Achilles-like gui function is a bad idea for CBA. Tried to use it for my purposes, but realized that it can be applied in very few cases only (layout and styling is almost not customzible, so it's like CBA options but displayed in game). So I prefer to have more flexibility in terms of visualization (like mine, but ofc, my variant is far from ideal and lacks few very useful fixes, just because i am too lazy to add them :D), even if it will require a bit more complex syntax to use or less features available. |
I want to support the idea of some customizible ui that was discussed last week on Slack.
I have a custom made function to generate scripted ui and after several years i can still find use for it, and i am sure CBA should have something like this too.
What it can be used for:
Some live examples:
https://www.youtube.com/watch?v=sJ5bSF7TJ8c
https://www.youtube.com/watch?v=ojGpx_VT8Xg
https://www.youtube.com/watch?v=lA5JcqRFUVQ
https://www.youtube.com/watch?v=ZSwf9CgzVy8
https://www.youtube.com/watch?v=FxOdmp91Py0
My variant's syntax (https://github.com/10Dozen/dzn_commonFunctions/blob/master/dzn_commonFunctions/functions/uiFunctions/fn_ShowAdvDialog.sqf):
It may look a bit tricky (as each element type expects specified parameters at position 2+ in array), but it's mostly intuitve (like button -> text -> code, dropdown -> list elements to display -> list values). Styling options are optional and always in the tail.
Leading numbers (0, 1, 2) - means line number, if several items share same line - element width will be divided equally (so 1 el = 1*width, 2 el = 2 * 1/2 width, 4 el = 4 * 1/4 width, etc.)
Supported controls: RscStructuredText (LABEL and HEADER), RscEdit (INPUT), RscCombo (DROPDOWN), RscXListBox (LISTBOX), RscCheckbox (CHECKBOX), RscSlider (SLIDER), RscButtonMenuOK (BUTTON).
Button control initialized with buttonClick event with added code that reads other inputs values to _this variable (so current values of dialog are accessible).
Styling and structured text compatibility allows some level of customization (colors, images).
UI class itself is just:
The text was updated successfully, but these errors were encountered: