
-----------------------------------
Jestar
Wed Nov 28, 2007 11:53 am

Is it possible to get rid of...
-----------------------------------
I was wondering if it was possible to get rid of the white background behnind the text? am i able to just make it clear?

http://img125.imageshack.us/img125/623/possibletx7.png

-----------------------------------
Dan
Wed Nov 28, 2007 12:46 pm

RE:Is it possible to get rid of...
-----------------------------------
No, at least not in the way you are using it.

functions like put where ment for non graphics mode. If you whont text in graphics mode you should use functions like Font.Draw that is a graphical text function.

I think it is Font.Draw, i have not looked it up in some time.

-----------------------------------
Jestar
Wed Nov 28, 2007 3:38 pm

Re: Is it possible to get rid of...
-----------------------------------
but then how would i do a counter like i am doing in the screenshot for time..?

-----------------------------------
Dan
Wed Nov 28, 2007 3:44 pm

RE:Is it possible to get rid of...
-----------------------------------
The same way you whould animate an image. It has to be double buffered (view offscreen and view upadate).

-----------------------------------
Tony
Wed Nov 28, 2007 3:45 pm

RE:Is it possible to get rid of...
-----------------------------------
Say way as you're doing it now. Take the same string you're constructing for put and pass it to Font.Draw(). Look up the documentation for proper usage.

-----------------------------------
Nick
Wed Nov 28, 2007 3:50 pm

RE:Is it possible to get rid of...
-----------------------------------
there both Font.Draw and Draw.Text they work the same and as a added benifit they also come in almost all fonts and sizes(i think all but i put almost just in case)

-----------------------------------
Jestar
Wed Nov 28, 2007 3:53 pm

RE:Is it possible to get rid of...
-----------------------------------
It does not allow me to use variables in Font.Draw(), could you explain further on how i should go about this?

-----------------------------------
Nick
Wed Nov 28, 2007 3:57 pm

RE:Is it possible to get rid of...
-----------------------------------
yes yes it does
what is probably happening is you are trying to pass an int through Font.Draw try intstr()
intstr will transform and integer into a string
so:
Font.Draw(intstr(myIntVar),x,y,font,color)

-----------------------------------
Tony
Wed Nov 28, 2007 3:58 pm

RE:Is it possible to get rid of...
-----------------------------------
you are probably using it incorrectly. It's time to show us some code.

-----------------------------------
HeavenAgain
Wed Nov 28, 2007 3:58 pm

RE:Is it possible to get rid of...
-----------------------------------

var font1: int
font1 := Font.New ("serif:12")
var hi : string := "HI"
Font.Draw (hi, 50, 30, font1, red)

probably you have to convert your number into string first. using intstr

-----------------------------------
Jestar
Wed Nov 28, 2007 4:04 pm

Re: Is it possible to get rid of...
-----------------------------------
alright i'll show you some code...this is what it is with the put

put clockhour, ":" ..
            if clockmin = 0 then
                put clockmin, "0" ..
            else
                put clockmin ..
            end if
            View.Update


this is it with Font.Draw


            var font1: int
            if clockmin = 0 then
                font1 := Font.New ("serif:12")
                Font.Draw (clockmin, 50, 30, font1, red)
            else
                Font.Draw (clockmin, 50, 30, font1, red) ..
            end if
            View.Update


-----------------------------------
HeavenAgain
Wed Nov 28, 2007 4:05 pm

RE:Is it possible to get rid of...
-----------------------------------
clockmin is an int, which is wrong (i think) should be a String

-----------------------------------
Jestar
Wed Nov 28, 2007 4:08 pm

Re: Is it possible to get rid of...
-----------------------------------
yes it is a int. but if i set it as a string i cant give it a value...i'm so confused..

-----------------------------------
Dan
Wed Nov 28, 2007 4:10 pm

RE:Is it possible to get rid of...
-----------------------------------
Font.Draw (intstr(clockmin), 50, 30, font1, red)

intstr should covert ints to strings (i maybe missing some partmatiers, look it up in turing help)

-----------------------------------
HeavenAgain
Wed Nov 28, 2007 4:10 pm

RE:Is it possible to get rid of...
-----------------------------------
try this
            var font1: int
            if clockmin = 0 then
                font1 := Font.New ("serif:12")
                Font.Draw (intstr(clockmin), 50, 30, font1, red)
            else
                Font.Draw (intstr(clockmin), 50, 30, font1, red) ..
            end if
            View.Update 

-----------------------------------
Jestar
Wed Nov 28, 2007 4:13 pm

Re: Is it possible to get rid of...
-----------------------------------
when i use that it says "Process "day": Variable has no Value.

-----------------------------------
HeavenAgain
Wed Nov 28, 2007 4:20 pm

RE:Is it possible to get rid of...
-----------------------------------
well... :roll: then it have no value... i do not see the variable in the code you pasted, so im not sure what is going on in your program.

-----------------------------------
Jestar
Wed Nov 28, 2007 4:22 pm

Re: Is it possible to get rid of...
-----------------------------------

var clockmin : int := 0
var clockhour : int := 8


those are the two time variables i am using to make the clock.

-----------------------------------
HeavenAgain
Wed Nov 28, 2007 4:27 pm

RE:Is it possible to get rid of...
-----------------------------------
its not clockmin or hour
its complaining something about a day variable?

-----------------------------------
Jestar
Wed Nov 28, 2007 4:28 pm

RE:Is it possible to get rid of...
-----------------------------------
day is the name of the process that its in.


do you want me to just post the whole process here?

-----------------------------------
Jestar
Wed Nov 28, 2007 4:37 pm

RE:Is it possible to get rid of...
-----------------------------------
ok so this is my process...



process day
    loop
        loop
            cls
            clockmin := clockmin + 10
            if clockmin >= 60 then
                clockmin := 0
                clockhour := clockhour + 1
            end if
            if clockhour > 12 then
                clockhour := 1
                clockhour2 := clockhour2 + 1
            end if
            if clockhour2 not= 2 and maps = 1 then
                Pic.Draw (farmpic, 0, 0, picCopy)
                clockhour2 := 0
            end if
            if clockhour = 7 and maps = 1 then
                Pic.Draw (farmnightpic, 0, 0, picCopy)
                clockhour2 := clockhour2 + 1
            end if
            if clockhour2 = 2 and maps = 1 then
                Pic.Draw (farmnightpic, 0, 0, picCopy)
            end if
            put clockhour, ":" ..
            var font1 : int
            if clockmin = 0 then
                font1 := Font.New ("serif:12")
                Font.Draw (intstr (clockmin), 50, 30, font1, red)
            else
                Font.Draw (intstr (clockmin), 50, 30, font1, red) 
            end if
            View.Update
            View.Set ("offscreenonly")
            delay (200)
            exit when clockhour = 12 and clockhour2 = 3
        end loop
        clockhour := 8
        clockmin := 0
        daytime := 0
    end loop
end day


-----------------------------------
Nick
Wed Nov 28, 2007 5:21 pm

RE:Is it possible to get rid of...
-----------------------------------
tryprocess day
    loop
        end loop
        clockhour := 8
        clockmin := 0
        daytime := 0
        loop
            cls
            clockmin := clockmin + 10
            if clockmin >= 60 then
                clockmin := 0
                clockhour := clockhour + 1
            end if
            if clockhour > 12 then
                clockhour := 1
                clockhour2 := clockhour2 + 1
            end if
            if clockhour2 not= 2 and maps = 1 then
                Pic.Draw (farmpic, 0, 0, picCopy)
                clockhour2 := 0
            end if
            if clockhour = 7 and maps = 1 then
                Pic.Draw (farmnightpic, 0, 0, picCopy)
                clockhour2 := clockhour2 + 1
            end if
            if clockhour2 = 2 and maps = 1 then
                Pic.Draw (farmnightpic, 0, 0, picCopy)
            end if
            put clockhour, ":" ..
            var font1 : int
            if clockmin = 0 then
                font1 := Font.New ("serif:12")
                Font.Draw (intstr (clockmin), 50, 30, font1, red)
            else
                Font.Draw (intstr (clockmin), 50, 30, font1, red)
            end if
            View.Update
            View.Set ("offscreenonly")
            delay (200)
            exit when clockhour = 12 and clockhour2 = 3
    end loop
end day 

-----------------------------------
Jestar
Wed Nov 28, 2007 5:32 pm

Re: Is it possible to get rid of...
-----------------------------------
HeavenAgain fixed it for me...thanks for your help though.

-----------------------------------
Nick
Wed Nov 28, 2007 5:35 pm

RE:Is it possible to get rid of...
-----------------------------------
heavenAgain?
he said that its complaining about a varible...

-----------------------------------
Jestar
Wed Nov 28, 2007 5:37 pm

Re: Is it possible to get rid of...
-----------------------------------
we discussed it over PM's :P

-----------------------------------
Nick
Wed Nov 28, 2007 5:38 pm

RE:Is it possible to get rid of...
-----------------------------------
oh lol then good i thought u misread some names :P
