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

Chat improvement #755

Open
MrDadosz opened this issue Jan 4, 2019 · 15 comments

Comments

@MrDadosz
Copy link

commented Jan 4, 2019

Original issue

You can't now correct a typo at the beginning of a message and you have to delete everything, write it again or send a message with a typo.
In the chat should be "|" character indicating position like in the console. You should be able to change location where you're typing with left/right arrow.
If this idea were to be introduced, it would also be possible to remove characters by pressing the "Delete" key (but it should delete character after "|").

Almost every game has this option. Now sometimes is better to use console than chat,
Chat should work exactly like a console, but introducing only this change would be a good improvement

Summary

MTA chat system could use some tweaking to make it more user-friendly.

Requested features

  • Add input history (arrow up/down keys) (PR submitted at #755)
  • Add input cursor |
    • Add ability to remove characters ahead of the cursor (delete key)
    • Add ability to move input cursor when chat input is active (arrow left/right) and add word skipping (ctrl + arrow left/right)
    • Add ability to select ((ctrl +) shift + arrow left/right, or select all using ctrl + a), copy (ctrl + c), cut (ctrl + x) and paste (ctrl + v) current input
  • Add ability to select and copy text in the chatbox using mouse (including current chat input text)
  • Add auto-completion that can be provided client-side
@CrosRoad95

This comment has been minimized.

Copy link
Collaborator

commented Jan 4, 2019

you can rewrite chat yourself using dx,cef or cegui like some dayz server did it

and add features which you want

@qaisjp qaisjp added the enhancement label Jan 4, 2019

@qaisjp qaisjp added this to the Backlog milestone Jan 4, 2019

@MrDadosz

This comment has been minimized.

Copy link
Author

commented Jan 4, 2019

I know,I can rewrite everything but it doesn't make sense. Chat in MTA is good but it lacks several functions and you can customize it in the game's settings. That would improve every server, not only mine.

@qaisjp

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

I agree that the chat input could do with some improvements.

@patrikjuvonen patrikjuvonen self-assigned this Jan 4, 2019

@patrikjuvonen

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

Having done server console input improvements recently I am going to look at this one as well.

@4O4

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2019

Support for basic selection manipulation and copy / paste keyboard shortcuts would be awesome too... 😉

@CodyJL

This comment has been minimized.

Copy link

commented Jan 4, 2019

I personally think chat should be totally redone with more functions for server owners to customize it.

@qaisjp

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

Total rewrites are unnecessary!

@CodyJL

This comment was marked as off-topic.

Copy link

commented Jan 4, 2019

Total rewrites of 13+ year old code are.

@Deltanic

This comment was marked as off-topic.

Copy link

commented Jan 4, 2019

No, it is not. It almost never is. Refactor whenever you can because before you know it you'll be breaking more than you want and you'll spend more time fixing bugs/being feature complete than you would otherwise have. As a famous man once said:

It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time.

Joel Spolsky wrote a great post on this matter, I suggest you give it a read.
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

@CodyJL

This comment was marked as off-topic.

Copy link

commented Jan 5, 2019

I'm sorry but that's complete bull crap no matter how you take it. Not only do yo have in mind what could be improved over the previous system but there is also more collective experience to do a newer one. Refactoring old code ends up with a very poor, and unstable product a large chunk of the time.

@Deltanic

This comment was marked as off-topic.

Copy link

commented Jan 5, 2019

Okay Cody. I'm sure your vast experience means more than what helpful people are trying to tell you. Clearly you're the expert.

@4O4

This comment was marked as off-topic.

Copy link
Contributor

commented Jan 5, 2019

Guys, I'm not saying which one of you is right because actually you both might be - this particular topic (rewrite vs refactor of legacy codebases) has been discussed by many individuals and companies over the world with different conclusions and it is not an easy and obvious problem. There is no silver bullet, it all depends on varying factors.

It seems however that you two don't like each other and you're starting to make the atmosphere toxic which might be discouraging for many current and potential contributors :) Why so serious? There is always a way to make discussions calm, fun and definitely more fruitful. Please either change the tone of your discussion or don't discuss publicly at all (especially if you hate each other). Thanks in advance :)

@Haxardous

This comment has been minimized.

Copy link
Collaborator

commented Jan 5, 2019

Explaining more deeper.
making it behave just like the console functionality as mentioned. those also are rare ways used by people using their keyboards that's much useful. CTRL + A selects everything written, CTRL/Hold + Left/Right Arrows would make you travel faster within your text, Shift + Left/Right Arrows going to select the chosen direction to select faster, CTRL + A /+/ CTRL + X going to delete the sentence and copy it. those are so useful within all servers overall if they get implemented.

@Addlibs

This comment has been minimized.

Copy link
Contributor

commented Jan 6, 2019

Up and down arrows to traverse through history (like in F8 console) would also be useful — if for example you write a message that’s too long for /say, or you've been blocked from posting a message because you did it too quickly after a previous message, instead of having to rewrite all of it, you would open up the chatbox, press up and shorten it down or post again, etc.

@PlatinMTA

This comment has been minimized.

Copy link

commented Feb 5, 2019

It would be also nice that you could select & copy text that was written on the chatbox. Also, what is the function of showing the cursor when chat is open if you can't do anything with it? Weird.

patrikjuvonen added a commit to patrikjuvonen/mtasa-blue that referenced this issue Feb 17, 2019
patrikjuvonen added a commit to patrikjuvonen/mtasa-blue that referenced this issue Feb 17, 2019
patrikjuvonen added a commit to patrikjuvonen/mtasa-blue that referenced this issue Feb 17, 2019
patrikjuvonen added a commit that referenced this issue May 10, 2019
Add arrow key chat input history, related to #755 (#822)
* Add arrow key chat input history, related to #755

* Use reference of history entry instead of copying it

* Use std::pair in place of the inner string vector for input history

* Use custom structs instead of pairs for less ambiguity

* Add CanTakeInput method to CChat to get rid of duplication

* Add CChat::ResetHistoryChanges to get rid of duplication

* Fix outdated comment about adding to the history

* Create a separate property for storing current input value

* Move chat history key listeners to CMessageLoopHook

* Fix an unsigned int to signed to avoid odd behavior

* Add CEntryHistory and make chat and console make use of it

* Fix a couple outdated comments

* Clean up redundant code from CChat

* Update refresh_binaries.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.