[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  Zoom in and out an image.

Zoom in and out an image.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1  2 

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #15 on Sat 13 Feb 2016 04:01 PM (UTC)
Message
Quote:
This is working, but it's funky. When I let go of the mouse depending on which way I was dragging, the map image jumps that direction a little bit than where I left off. I'm guessing I need to add something to the delta_xa and ya?

Save the final offset in mouseup after calling that last dragmove instead of before?

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #16 on Sat 13 Feb 2016 04:04 PM (UTC)
Message
You can also just not try to do the rate-limiting stuff right now until you find that you actually experience a performance problem while dragging.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Wuggly   USA  (112 posts)  [Biography] bio
Date Reply #17 on Sat 13 Feb 2016 04:23 PM (UTC)
Message
Thanks Fiendish, you've been very helpful. I'm sure I'll be back with more questions once I try to start with the zooming stuff.

=)
[Go to top] top

Posted by Wuggly   USA  (112 posts)  [Biography] bio
Date Reply #18 on Sun 14 Feb 2016 03:16 PM (UTC)

Amended on Sun 14 Feb 2016 03:22 PM (UTC) by Wuggly

Message
Although it was much frustration, I managed to work in zoom in/out.

Please let me know if I should start a new topic for this next question or not. It's going to be part of this same script so I figured I'd just ask it in here to keep my topics down and have one place for everything regarding this script.

Anyways, what I need now is scroll bars. I took Nick's hyperlink code and adapted it to make a big list of all the different maps that can be viewed.
reference: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=12868

However, there are almost a hundred maps, so the map list miniwindow became very long cutting off half of all the different map links, so now I need to work in a scrollbar.

I've been looking around at how others did it, and like most stuff here, I haven't quite been able to wrap my mind around it just yet.

Would anyone be willing to write up a little scrollbar tutorial, like how Fiendish explained about making a slippy map in the second reply of this thread?

(feel free to ignore this part, basically just me thinking out loud here)
Things it needs to be able to move when scrolling I suppose would be the WindowTexts and WindowAddHotspots. I get confused quite easily when it comes to the math stuff, so that's why I need some sort of tutorial for it. If you look over in the hyperlink thread down on in the post where Nick's code is, I'm wondering how scroll would affect it since it draws it using ipairs. MakeHyperlink (k, v).
The map list miniwindow is only as wide as the longest hyperlink, and only as long as the list is, so I also need to figure a way to manipulate the code some more to make it a set size so there is room for the scrollbars. I'm also wondering how this would work since the list is so big. After it draws, would I be able to set it so it shows the list starting from the top, being able to scroll down to see the rest?
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #19 on Sun 14 Feb 2016 07:14 PM (UTC)
Message
I've actually explained how to make scroll bars in another thread already. Link here: http://www.gammon.com.au/forum/?id=10728&reply=82#reply82

https://github.com/fiendish/aardwolfclientpackage
[Go to top] 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.


42,819 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]