mIRC Home    About    Download    Register    News    Help

Print Thread
#129231 03/09/05 01:41 PM
Joined: Nov 2003
Posts: 157
RuFy Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Nov 2003
Posts: 157
Hi, I like to made a custom toolbar. I want this:
When the user click on the left arrow the icons scoll on the left, and if the user scroll on the right arrow, the icons scroll on the right. Someone can help me?
Example:

< |~| |-| |Æ| |£| |ß| |ê| >

after I click on the right:

< |Æ| |£| |ß| |ê| |å| |ø| >

laugh

#129232 06/09/05 01:07 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The easy way is to store the icons with some form of identifier.

Then, you can say to display scroll location + 0, then scroll location + 1, then +2, then +3, etc.

Example:

a=0, b=1, c=2, d=3, e=4

Scroll Location = 0

So, modification # in this case is 0.

0 + 0 = 1, so display "a"
then
0 + 1 = 2, so display "b"

When you scroll right 1 from there, then scroll location = 1, so:

1 + 0 = 2, display "a"
1 + 1 = 3, display "b"

If you scroll left 1 from the 0 position, scroll location would be -1, so:

-1 + 0 = -1, diplay the last icon in your list (we'll just say "z")
-1 + 1 = 0, display "a"

This idea can be easily added into any script you have to display the icons.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard