Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Dynamic Font changing [RESOLVED]

Hello...

I need to dynamically change the default Font before displaying some message. To do this, I use Font.default_name = ["FontName"] just before th "Show Message" command.
The result is that it doesn't work. The font remains the original one.
But note that this doen't work ONLY for "Show Message" !!! If I open any other Window (Menu, Save, Shop, etc...), the new default font is taken into account, and the font dispayed is the one I wanted. It seems only the "Show Message" doens't trigger the font modification.
Alas, what I want is just change the font, show a message, and change back to the default font.

Any idea/suggestion ??
 
Font.default_name is used to change the font of all windows... you need to change the fond of Window_Message. Add this before Main to do it easy:
Code:
class Scene_map
   def changeMessageFont(font)
     @message_window.contents.font.name = font
   end
end

To change the font, use this in call script:
Code:
$scene.changeMessageFont('Verdana')
 
Fustel":1a9vqe2z said:
class Scene_Map < Scene_Base

wortked much better; but the idea was here. Thanks very much.

Err... how do I edit the post subject to include [RESOLVED]  :thumb:
Actually its better without setting again the superclass  :smile:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top