Thread: [Essentials tutorial] How to add more features to the PokeGear
View Single Post
  #3    
Old May 11th, 2013 (02:54 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
Team Unova
 
Join Date: Sep 2010
Gender: Male
Posts: 1,455
Quote originally posted by Tayuya of the Sound Four:
Thanks n_n Say if I wanted to make a sort of, mail/email system, how would that work? I know how to make scenes, just not how to populate them
Use a selection for choosing the values in a list, I suggest something like Kernel.pbMessage("Choose something",["choice 1","choice 2","choice 3","Cancel",3)

For showing a text (you need to define the background IMAGEPATH):

Code:
 def pbStartScene
    @sprites={} 
    @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
    @viewport.z=99999
    @sprites["background"]=IconSprite.new(0,0,@viewport)
    @sprites["background"].setBitmap(IMAGEPATH)
    @sprites["background"].x=(Graphics.width-@sprites["background"].bitmap.width)/2
    @sprites["background"].y=(Graphics.height-@sprites["background"].bitmap.height)/2
    @sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
    pbSetSystemFont(@sprites["overlay"].bitmap)
    overlay=@sprites["overlay"].bitmap
    overlay.clear 
    marginLeft=32
    marginRight=32
    baseColor=Color.new(72,72,72)
    shadowColor=Color.new(160,160,160)
    textPositions=["Title goes here",Graphics.width/2,0,2,baseColor,shadowColor]]
    pbDrawTextPositions(overlay,textPositions)
    text = "text text text text text text text text text text text text text text text"
    drawTextEx(overlay,marginLeft,64,Graphics.width-marginLeft-marginRight,8,
        text,baseColor,shadowColor)
    pbFadeInAndShow(@sprites) { update }
  end
Look at my diploma tutorial for a better example.
__________________
Reply With Quote