Author Topic: How do I fill the whole screen with dialogue?  (Read 1436 times)

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
How do I fill the whole screen with dialogue?
« on: September 10, 2016, 08:31:37 am »
I was wondering if it was possible to fill the whole screen with dialog or at certain coordinates. I want to make a stat menu. Is it possible to pass the value of $v for more than one variables in one dialog? Would it be possible to show more than one dialogs at once and have them vanish at the same time?

example:

ATK: 20
DEF: 40
SP.ATK: 30
SP.DEF: 100
Speed: 60
« Last Edit: September 10, 2016, 10:47:48 am by zutokaza »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
Re: How do I fill the whole screen with dialogue?
« Reply #1 on: September 11, 2016, 10:52:12 am »
Dialogues are more adapted to talking to characters. For a stats menu, I would directly show the text on the screen. See the menu API and the text surface API.
I did a stats menu like that in zelda Roth se.

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
Re: How do I fill the whole screen with dialogue?
« Reply #2 on: October 24, 2016, 12:30:58 am »
For those that want an example.

Code: ( lua) [Select]
--http://www.solarus-games.org/doc/latest/lua_api_text_surface.html
    local test = sol.text_surface.create({ -- name a local variable something and assign it to the sol.text_surface
      font = "minecraftia", -- font name
      text = "what", -- text you want to show
      font_size = 50, -- font size obviously
      horizontal_alignment = "center", -- default "left"
      vertical_alignment = "bottom", -- default "middle"
      rendering_mode = "antialiasing", -- "solid" (faster) and default
      color = {0,0,0}, -- color must be in a table RGB (http://www.rapidtables.com/web/color/RGB_Color.htm)
    })

Code: ( lua) [Select]
function sol.main:on_draw(screen)
   test:draw(screen,100,100)
end --end of draw function