Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ how to get text in mini-window supports select/copy
|
how to get text in mini-window supports select/copy
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zhenzh
China (68 posts) Bio
|
| Date
| Mon 05 Mar 2018 06:24 PM (UTC) |
| Message
| I find all my current mini-window related plugins using WindowText function to draw text which treated text as a picture and can not be selected and copied.
Is there any way to get all text in mini-window support selecting and copying as what we can do in main window? | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #1 on Mon 05 Mar 2018 08:20 PM (UTC) Amended on Mon 05 Mar 2018 08:21 PM (UTC) by Fiendish
|
| Message
| | Miniwindows are just pictures. If you want this, you have to do it from scratch using raw pixel geometry like I did for Aardwolf. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Mon 05 Mar 2018 09:03 PM (UTC) |
| Message
| | A simple way would be to make each line a hotspot (the same rectangle as what you draw the text in). You could then make something like RH (or LH) mouse-click pops up a menu which offers to copy the whole line. At least you can get back a line from the window like that. Of course, you would have to remember somewhere what was drawn for each line. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Zhenzh
China (68 posts) Bio
|
| Date
| Reply #3 on Tue 06 Mar 2018 07:04 AM (UTC) Amended on Tue 06 Mar 2018 07:06 AM (UTC) by Zhenzh
|
| Message
| I consider this feature as I'm going to move chat data into mini-window and omit the useless output from main window.
I main window, I used to be able to select and copy part of a chat line. When moving such line into mini-window, I have to do the same operation in mini-window as the output in main window has been omitted.
So, the idea mentioned by Fiendish may be the closest choice for my request.
Fiendish said:
do it from scratch using raw pixel geometry like I did for Aardwolf
Can you provide an example for how using raw pixel geometry? | | Top |
|
| Posted by
| Fiendish
USA (2,558 posts) Bio
Global Moderator |
| Date
| Reply #4 on Tue 06 Mar 2018 07:51 AM (UTC) Amended on Tue 06 Mar 2018 07:57 AM (UTC) by Fiendish
|
| Message
|
Quote: Can you provide an example for how using raw pixel geometry?
I do it for Aardwolf's channel capture plugin. Link is in my signature. The full explanation of how it works is unfortunately too complicated for me to post here now, though.
The basic idea is to use the mouse coordinates at the start of dragging, and the current mouse coordinates, and the bounding box of the text, and the height of each line of text to find which text in your window has been dragged over, and then draw a highlighted background for just the dragged-over part snapped to the nearest whole character, and then draw the text again on top of that. That way it looks like you are pulling the highlight background with your mouse. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Zhenzh
China (68 posts) Bio
|
| Date
| Reply #5 on Tue 06 Mar 2018 09:56 AM (UTC) |
| Message
| | Thank you. I can read you code for understanding details. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,206 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top