Author Topic: Text position on top...  (Read 61 times)

Dokk

  • Newbie
  • *
  • Posts: 4
  • Game developer & musician
    • View Profile
Text position on top...
« on: August 04, 2018, 07:22:03 pm »
Hello. I have a problem with some specific text position. I made a map titles (kinda "Level 1: The Beginning") as a dialogs. And I want to start this map name then game is starting on the top of the screen for 2-3 seconds.

Code: Lua
  1. function map:on_started()
  2.  
  3. --Starting a map title
  4. game:start_dialog("level.1")
  5.  

 I tried to change the position directly in alttp_dialog_box and surely all my dialogs became to the top ;D

So, how to change the text position only for some specific text as mine?
I'm making first russian quest on SE

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1123
    • View Profile
Re: Text position on top...
« Reply #1 on: August 04, 2018, 08:06:27 pm »
The dialog box script explains how to do that:
Code: Lua
  1. -- - dialog_box:set_position(position):
  2. --   Sets the vertical position of the dialog box for subsequent dialogs.
  3. --   position must be one of:
  4. --   - "auto": Choose automatically so that the hero is not hidden.
  5. --   - "top": Top of the screen.
  6. --   - "bottom" (default): Bottom of the screen.
  7. --   - a table with x and y integer fields.
  8.  

Dokk

  • Newbie
  • *
  • Posts: 4
  • Game developer & musician
    • View Profile
Re: Text position on top...
« Reply #2 on: August 05, 2018, 12:20:43 pm »
In a grow of work, I didn't read comments for script. Shame on me! Thank you , Christopho. My progress is saved  ;D
I'm making first russian quest on SE