Implemented ChatDialog suggestions

Discussion in 'Client & Site Suggestions' started by Aidden, Jun 26, 2015.

  1. I think ChatDialog.getTitle() and getOption(Pattern) would be very useful. The latter making it possible to deal with an entire conversation in one line of code.

  2. Supporteroni
  3. Support for ChatDialog.getTitle
    In regards to getOption(Pattern), what exactly would it be matching against? The text? Would only one pattern be required in the constructor or should we accept multiple for further simplicity?

    Edit: Added Option getOption(Pattern... patterns)
  4. The text is what i had in mind. My idea was if i need to handle selecting multiple options going deep into a chat dialog, instead of having X if statements all checking the text, or a for loop looping over them and checking the text, i could just write a pattern that handled all options i need to choose
  5. I mean currently you can pass in multiple Strings and it will return the first option containing one of them. But I've gone ahead and added the ability to use Patterns within itt.
  6. You could use the String... argument, since that takes multiple Strings?
  7. Oh, i didn't realize it already took a vararg. Is there any benefit to having both?
    --- Double Post Merged, Jun 26, 2015, Original Post Date: Jun 26, 2015 ---
    Yeah lol just found that out
  8. So the string argument is based on the hierarchy of options right? So if an option is placed first, then another next, it will look for the first one before going to the second one?
  9. Theres no need for it to be varags really, if there are multiple text options that would be viable or must be there the user can already specify this in there regex pattern
  10. Ehhh, I'm sure there's still some edge case where varargs are needed, or at least more practical than jamming them all into a single pattern
  11. My logic was that it's easier to write simple patterns than it is complex ones.
  12. I support. Clarity > Compactness.
  13. Anyways, all of this is available in the latest release :)
  14. You can create separate patterns and join them at compile time easily, though.

Share This Page