flat assembler
Message board for the users of flat assembler.
Index
> DOS > Scroll bar? |
Author |
|
edfed 11 Feb 2011, 09:48
a scroll bar with mouse or without mouse?
with mouse it is a little more complicated than without because there is a need of 2 adjustments, one for the "cursor of the scroll bar" to "first line of text to display", and one for "first line to display" to cursor of scroll bar". if you don't do that, your cursor will not be accurate to the real position, like the volume cursor in vlc 0.8.6i for example, where the cursor is one pixel behind mouse cursor above 59% without is very simple, take the keys from keyboard, and change Y coordinate of the cursor. this coordinate can be a percentage of the total scroll bar, or just a relative coordinate to the top of scroll bar, with a limit wich is "scroll bar lengh" - "cursor lengh". did you tryed to draw your scroll bar theory before to ask here? because just with a single drawing, showing variables for the scroll bar and math relation between all them will give you the solution. |
|||
11 Feb 2011, 09:48 |
|
me239 11 Feb 2011, 21:18
edfed wrote: a scroll bar with mouse or without mouse? |
|||
11 Feb 2011, 21:18 |
|
Dex4u 11 Feb 2011, 22:30
Why not just have a buffer and write the names to buffer from the DTA Buffer.
The names are 13bytes long so copy from the DTA Buffer to your main buffer and add 13 byte to the pointer untill your buff is fill or theres no more files. That way you just move the start offset in the buff up and down *13. And display them to screen. |
|||
11 Feb 2011, 22:30 |
|
me239 12 Feb 2011, 04:15
Dex4u wrote: Why not just have a buffer and write the names to buffer from the DTA Buffer. BTW, I think file name are only 11 bytes (8 byte file name, and 3 byte extension) |
|||
12 Feb 2011, 04:15 |
|
Dex4u 12 Feb 2011, 17:27
me239 wrote: BTW, I think file name are only 11 bytes (8 byte file name, and 3 byte extension) http://www.ctyme.com/intr/rb-2977.htm#Table1626 Quote:
Remember you can have "." and zero at end |
|||
12 Feb 2011, 17:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.