forked from BeeStation/BeeStation-Hornet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TGUI inputs and alerts (BeeStation#8080)
* Replace tgalert with tgui_alert (#55157) Adds TGUI-based alerts to replace the old tgalert system. Replaces all uses of tgalert with tgui_alert except for one, the 'Report Issue' button, as people were (understandably) concerned that this button using tgui will prevent a tgui bug from being easily reported. These windows have a nice little progress bar indicator of how much time they have left, and will automatically close themselves after this time elapses. Co-authored-by: Aleksej Komarov <[email protected]> * Fixes from tg/58419 * Adds a autofocus arg to tgui_alert (#60452) Co-authored-by: Mothblocks <[email protected]> * Allows you to cancel TGUI alerts (#61072) This was requested by someone downstream. Some TGUI alerts offer two options e.g. (Kill Bob, Kill Janice), In byond alerts you'd be able to cancel by pressing the X, but tgui alerts don't support this. I've added an option to enable the normal X in the top right, so you can cancel out of alerts if you enable it. * Improve Close/null response state of alert() * tgui: List Input (#56065) Ported over from https://gitlab.com/cmdevs/colonial-warfare/-/merge_requests/613 which provides an input box to select an option from a list. Has a search bar to allow filtering for results and an onKeyDown event to replicate default behaviour from the default list input boxes that BYOND provides (where you are able to type the first letter of an element in the list and it'll jump to the first element that matches and then the next and so on) Right now, it is only applied to the holopad and "Drop Bomb" verb for administrators. Credits to bobbahbrown for the Loader element from AlertModal.js which allows for a timed input (was needed on the CM codebase for timed inputs) and for the majority of the DM code. Co-authored-by: Watermelon914 <[email protected]> Co-authored-by: Aleksej Komarov <[email protected]> * Refactor ListInput with new changes * Added autofocus for the first button in the TGUI list input. (#56114) Ported over from https://gitlab.com/cmdevs/colonial-warfare/-/merge_requests/647 When you open the TGUI list input, it'll auto-focus the first element so that you can easily navigate with the arrow keys without having to click on the page beforehand. Small QoL when opening the thing, don't have to click on it if you want to navigate via arrows keys, etc. * Swap buttons in ListInput for improved accessibility (#57832) Swapped OK/Cancel buttons in tgui list input, so that it stays consistent with Windows UI guidelines (was Cancel/OK before). * tgui input list improvements (#59668) pressing enter or space now selects the selected button duplicate keys no longer cause input lists to break * Fix tgui async modals (#59822) * Fix tgui async modal constructor order * Fix another bug with the async modals * Refactors tgui list inputs to be more user-friendly (#61925) Co-authored-by: Watermelon914 <[email protected]> * TGUI input box framework (#63190) About The Pull Request Creates the framework for two new TGUI input boxes that can be toggled via game prefs. This does not convert any actual inputs to TGUI This does not convert any tgui_list_inputs into being toggleable Example pictures Input on a hand labeler. This has a MAX_LENGTH set, so it can be invalidated. Cancel always returns null. Enter button submits, if valid. text input (OUTDATED) Multiline input on newscaster. Newer version fills the window with a section, like the others multiline Sheets from a stack number input Why It's Good For The Game 1 So I did... Much sleeker input boxes Result should be a in place swap for most occurrences of input Renders casting as text/num/null obsolete but still doable Input validation from both sides handled Prefs toggle if you don't like the look Changelog cl add: TGUI input boxes are on the way! You can find new preferences in the menu. They will be on by default. /cl * TGUI input box conversions 1 (#63313) * Update to newest versions mostly, holy shit dude, learn to atomize your PRs * Add generic themes * Add Autofocus from tg/61313 (TGUI prefs) * Fixes the inputs for the linear and exponential sustain options of the song editor. (#65008) * Who added this * Tweaks and testing verb * Revert Co-authored-by: Bobbahbrown <[email protected]> Co-authored-by: Aleksej Komarov <[email protected]> Co-authored-by: Wayland-Smithy <[email protected]> Co-authored-by: Mothblocks <[email protected]> Co-authored-by: AMonkeyThatCodes <[email protected]> Co-authored-by: Watermelon914 <[email protected]> Co-authored-by: Watermelon914 <[email protected]> Co-authored-by: LatteKat <[email protected]> Co-authored-by: Aronai Sieyes <[email protected]> Co-authored-by: Jeremiah <[email protected]> Co-authored-by: Ghom <[email protected]>
- Loading branch information
1 parent
dc38c2d
commit 5d798d2
Showing
55 changed files
with
1,869 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.