
-----------------------------------
Beaner7
Mon Jan 29, 2007 8:15 pm

Help With Aligning Font.Draw/Draw.Text
-----------------------------------
I know when you use Draw.Text it should look like this

Draw.Text ("What you want it to say",x coordinate,y coordinate,the font you previously declared,colour)

but the "x coordinate" and "y coordinate" are for the bottom left hand corner.

What i am trying to do is let the user enter the word they want and then have it appear
in the bottom right hand corner of the screen.  But when i set the x and y it will always 
start at the same spot and if the word is to long it will run off the page.  

So is there anyway to change it so that the end of the word will always end somewhere
around maxx-50, letting the word start where ever it needs to make this happen.


__________________________________
|-----------------------------------------------------|
|-------------------------------Really Long Word|
|-----------------------------------------------------|
|------------Instead of this-----------------------|
|-----------------------------------------------------|
|------------------------------------------Really Lo|ng Word        
|_________________________________|


And is there a way to center the middle of the word over the middle of the page 
even when the user inputs the word which means it will have different amounts 
of letters (different length each time).
_________________________________
|------------------------|--------------------------|
|--------------------Wo|rd-----------------------|
|-------------------Big |Word-------------------| (You get the idea)
|________________________________|


Thanks
(not for a project, semester already ended.  Mainly for fun and next year)

-----------------------------------
syntax_error
Mon Jan 29, 2007 8:29 pm

Re: Help With Aligning Font.Draw/Draw.Text
-----------------------------------
u could do this
var word : string
qwer := boolean
var font :int
font :=Font.New ("Ariel:18:Italic")
var x : int % max letter in the font
put "ehter ur word"
get word
if word 