Solarus-Games English Forum

Solarus => Development => Topic started by: zutokaza on September 10, 2016, 08:31:37 AM

Title: How do I fill the whole screen with dialogue?
Post by: zutokaza 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
Title: Re: How do I fill the whole screen with dialogue?
Post by: Christopho 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.
Title: Re: How do I fill the whole screen with dialogue?
Post by: zutokaza 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