Page 1 of 1

Placing text on desired place at image map?

Posted: Mon Jul 25, 2016 11:35 pm
by pratomoastan
Hi i want to ask is it possible to put a text in the imagemaps?
So i make an image maps for my status screen .
And beside the text image text 'game progress' i want to put text showin the game progress
and beside the text image 'money' i want to put text showin the current money that player have .
i cant continue with my game development until i found the solution for this.
i do stuff like : text "[prgres] %": (293,219) <<< i know this wrong , and its returning error because i dont know how to do it.

any solution ?
thanks.

heres the code :

Code: Select all

screen stats():
    if lang == "Indonesian":
        imagemap:
            ground "images/system/statsid1ground.png"
            hover "images/system/statsid1hover.png"
            alpha False
            
            text "[uang] Lagi": (227,178)
            null height 20
            text "[prgres] %": (293,219)
            hotspot (137, 385, 119, 30) action Return()
    elif lang == "English":
        imagemap:
            ground "images/system/statsen1ground.png"
            hover "images/system/statsen1hover.png"
            alpha False
            
            text "[uang] Left": (227,178)
            null height 20
            text "[prgres] %": (293,219)
            hotspot (137, 385, 119, 30) action Return()
    else lang == "None":
        imagemap:
            ground "images/system/statsnoneground.png"
            hover "images/system/statsnonehover.png"
            alpha False
            
            hotspot (137, 385, 119, 30) action Return()

Re: Placing text on desired place at image map?

Posted: Tue Jul 26, 2016 2:53 pm
by morg
what about this?

Code: Select all

screen stats:
    if lang == "Indonesian":
        imagemap:
            ground "images/system/statsid1ground.png"
            hover "images/system/statsid1hover.png"
            alpha False
    elif lang == "English":
        imagemap:
            ground "images/system/statsen1ground.png"
            hover "images/system/statsen1hover.png"
            alpha False        
    else lang == "None":
        imagemap:
            ground "images/system/statsnoneground.png"
            hover "images/system/statsnonehover.png"
            alpha False            
    text "[uang] Left" xpos 227 ypos 178
    text "[prgres] %": xpos 293 ypos 219
    hotspot (137, 385, 119, 30) action Return()

Re: Placing text on desired place at image map?

Posted: Tue Jul 26, 2016 2:59 pm
by trooper6
The other option is to not use imagemaps, but to use imagebuttons. They give a lot more flexibility, including placing images where you want them.

Re: Placing text on desired place at image map?

Posted: Thu Jul 28, 2016 2:02 pm
by pratomoastan
morg wrote:what about this?
Well , Thanks for the help mate .

Re: Placing text on desired place at image map?

Posted: Thu Jul 28, 2016 2:03 pm
by pratomoastan
trooper6 wrote:The other option is to not use imagemaps, but to use imagebuttons. They give a lot more flexibility, including placing images where you want them.
thanks for suggestion mate !!