I did this lil proggie a few weeks ago, but have yet to get it to work. all it does not do is display the text that is inputted, here is the display method:
method display()
{
local(curtext$, "")
local(curline!, 0)
local(curttime!, 0)
local(curltime!, 0)
local(curred!, 255)
local(curgreen!, 255)
local(curblue!, 255)
local(curcenline!, 0)
local(next_t!, 0)
local(next_f!, 0)
local(next_s!, 0)
local(next_r!, 0)
local(next_g!, 0)
local(next_b!, 0)
local(next_c!, 0)
local(top!, 0)
local(left!, 0)
tcanvas!=createcanvas(windx!,windy!)
for(curline!=0; curline!<lines!; curline!++)
{
if(fontat[next_f!]! == curline!)
{
font(fonts[next_f!]$)
next_f!++
}
if(sizeat[next_s!]! == curline!)
{
fontsize(sizes[next_s!]!)
next_s!++
}
if(ttimeat[next_t!]! == curline!)
{
curttime!=ttimes[next_t!]!
next_t!++
}
if(ltimeat[next_l!]! == curline!)
{
curltime!=ltimes[next_l!]!
next_l!++
}
if(redat[next_r!]! == curline!)
{
curred!=reds[next_r!]!
next_r!++
}
if(greenat[next_g!]! == curline!)
{
curgreen!=greens[next_g!]!
next_g!++
}
if(blueat[next_b!]! == curline!)
{
curblue!=reds[next_b!]!
next_r!++
}
if(cenlineat[next_c!]! == curline!)
{
curcenline!=cenlines[next_c!]!
next_c!++
}
colorrgb(curred!, curgreen!, curblue!)
sl!=length(text[curline!]$)
if(curcenline!)
{
left!=castint((windx! / 2) - (gettextwidth(text[curline!]$) / 2))
}
font(curfont$)
fontsize(cursize!)
local(x!, 0)
for(x!=0; x!<=sl!; x!++)
{
curtext$ += charat(text[curline!]$, x!)
pixeltext(left!, top!, curtext$, tcanvas!)
drawcanvas(tcanvas!, canx!, cany!, windx!, windy!)
delay(curttime!)
}
delay(curltime!)
left! = 0
top! += gettextheight(text[curline!]$)
}
font(ftype[1]$)
fontsize(defsize!)
mwin("LINE COMPLETE")
}
}
I am thinking of taking out the canvas part, or eventually using my canvas handler class when it gets completed, or just have the cinetext class incorporated into it.
If i get this down i cna get the intro done, and some aspects of the menu and battle system.
btw i will also be making a version that only shows one line of text, so that you input write each line separately, instead of having it all show up in tandem. ANy help will obviously be greatly appreciated.