[Help] Picture issue
Author |
Message |
tjmoore1993
|
Posted: Thu Apr 02, 2009 5:06 pm Post subject: [Help] Picture issue |
|
|
Hello, I've made quite a few posts to receive help and have received some nice answers that help a lot. I have been learning turing for several days and know how to do a lot of things but I am not to good around a few categories.
Anyways I seen a guide on implementing a picture to your application. I've got the picture added and it launches when I want it to through a procedure.
Problem :
The picture is a "menu_bar" and I want text to display on the "Image" but when I try to use this
my variable goes where it is suppose to go but the image that I want to use for the "menu_bar" moves up an x value.
Question :
Is there some sort of way to make it so that the "menu_bar" does not move and it stays on the bottum so other things can display on it? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Thu Apr 02, 2009 5:21 pm Post subject: RE:[Help] Picture issue |
|
|
You are mixing "graphics mode" with "text mode", so that could lead to problems. The put statement will also draw a solid background behind the text, so that wouldn't work with images.
You are probably looking for Font.Draw |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tjmoore1993
|
Posted: Thu Apr 02, 2009 6:24 pm Post subject: RE:[Help] Picture issue |
|
|
Thanks but there is still a problem. I have variables that are integers that I want written but I get an argument unless they are strings. |
|
|
|
|
|
DemonWasp
|
Posted: Thu Apr 02, 2009 9:24 pm Post subject: RE:[Help] Picture issue |
|
|
You want to convert an int to a string with intstr() |
|
|
|
|
|
Dusk Eagle
|
Posted: Fri Apr 03, 2009 12:24 am Post subject: Re: [Help] Picture issue |
|
|
You can even do something fancy like this with intstr:
The final line is what's important. There are two things to notice here. The first is the intstr(score). The intstr command, as DemonWasp said, is used to convert an int to a string. Although you could do something like:
Turing: |
var score : int := 10
var score_as_string := intstr(score )
|
which do you find easier?
The second thing to notice is the + sign. The + is used to combine to different strings together into one. So, for instance, we could do the following:
Turing: |
var string1 : string := "Hello"
var string2 : string := "World"
var string3 : string := string1+string2
Font.Draw (string3, yada-yada-yada )
|
Combine these techniques and you'll be a Turing Master in no time! |
|
|
|
|
|
|
|