Quote: "or mabey you choose string variables to be printed or something"
i once made a plugin that could print strings(no font change or fancy underlining though) and if i can find it I'll resurrect it
[quote]Also, would it be possible for a scrollbar to be made? if you print "hi" 200 times in a window after about 50 the rest are off the window. would it be possible for a scrollbar to see that?[quote]
the way directx and the internal window crap works I'm pretty sure not
I did once see a code snip of a scroll bar
found it!
from Lost In Thought
`setup screen
sync on : sync rate 0
backdrop on
color backdrop 0
`dim array to store strings
dim test$(20)
`make strings for example
for i = 1 to 20
test$(i) = str$(i)
if i < 10
for j = 1 to 6
test$(i) = test$(i) + test$(i)
next j
else
for j = 1 to 5
test$(i) = test$(i) + test$(i)
next j
endif
next i
`set first string to print
begin = 1
`set mousemoved amount to 0
amount = 0
`set sefault scroll position to 55
scroll = 55
`main loop
do
`set default printing locations
side = 15
down = 55
`update amount mouse moved
amount = mousemovez()
`change the beginning string count and scroll position
`according to mouse wheel changes
if amount > 0
`if mouse wheel is scrolled up then decrease the beginning number and scroll
`position
dec begin, (amount/120)
`don't let beginning string go below 1
if begin < 1 then begin = 1
`update the scroll position according to the string number
`formula is (default scroll posion y +((beginning string - 1)*((string spacing*number of lines on screen)/total number of strings that can move))
`or 55+((begin-1)*((15*8)/11))
`or (55+((begin-1)*11))
scroll = (55+((begin-1)*11))
endif
if amount < 0
`if mouse wheel is scrolled down then increase the beginning number and scroll
`position
inc begin, 0-(amount/120)
`don't let beginning string go above 12 or (total number of string-number of lines in window)
if begin > 12 then begin = 12
`update the scroll position according to the string number
`formula is (default scroll posion y +((beginning string - 1)*((string spacing*number of lines on screen)/total number of strings that can move))
`or 55+((begin-1)*((15*8)/11))
`or (55+((begin-1)*11))
scroll = (55+((begin-1)*11))
endif
`save mouse position values
m_pos_x = mousex()
m_pos_y = mousey()
`if mouse is positioned over cusros check to see if dragging is possible
if m_pos_x >= 540
if m_pos_x =< 545
if m_pos_y >= scroll
if m_pos_y <= scroll+15
`if mouse 1 is clicked turn dragging on
if mouseclick() = 1
lock_on = 1
else
`if not clicked keep up with the y offset from the mouse to the scroll top
m_offset = m_pos_y-scroll
endif
endif
endif
endif
endif
`if mouse is not clicked turn scrolling by mouse drag off
if mouseclick() = 0
lock_on = 0
endif
`scroll by mouse drag
if lock_on = 1
`update scroll value by new mouse position y-original offset
scroll = (m_pos_y-m_offset)
`don't let scroll get lower than default
if scroll < 55 then scroll = 55
`don't let scroll get higher than max default+(number of moves possible*space between moves calculated above)
if scroll > 55+(11*11) then scroll = 55+(11*11)
`update the beginning string by scroll position
begin = ((scroll - 55)/11)+1
endif
`draw scroll bar
box 540,scroll,545,scroll+15
`draw window
line 10,50,535,50
line 10,195,535,195
line 10,50,10,195
line 535,50,535,195
`print strings starting with one calculated from above
for i = begin to (begin + 8)
set cursor side,down
print test$(i)
`move to next cursor position down
inc down, 15
next i
sync
loop
I dont think thats what you want though
I was Offset of Reality