Placing text on desired place at image map?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
pratomoastan
Regular
Posts: 39
Joined: Fri Mar 11, 2016 11:39 am
Projects: My High School Life
Organization: After School Things
Deviantart: pratomoastan
Location: Indonesia
Contact:

Placing text on desired place at image map?

#1 Post 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()
Attachments
statsen1ground.png
~ Sempai !!!

User avatar
morg
Regular
Posts: 95
Joined: Sun May 10, 2015 7:35 am
Projects: Cupid's Affair
Tumblr: n-morg
Contact:

Re: Placing text on desired place at image map?

#2 Post 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()
Image

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Placing text on desired place at image map?

#3 Post 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.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
pratomoastan
Regular
Posts: 39
Joined: Fri Mar 11, 2016 11:39 am
Projects: My High School Life
Organization: After School Things
Deviantart: pratomoastan
Location: Indonesia
Contact:

Re: Placing text on desired place at image map?

#4 Post by pratomoastan »

morg wrote:what about this?
Well , Thanks for the help mate .
~ Sempai !!!

User avatar
pratomoastan
Regular
Posts: 39
Joined: Fri Mar 11, 2016 11:39 am
Projects: My High School Life
Organization: After School Things
Deviantart: pratomoastan
Location: Indonesia
Contact:

Re: Placing text on desired place at image map?

#5 Post 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 !!
~ Sempai !!!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]