Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Modding:Common tasks
(view source)
Revision as of 09:37, 30 June 2019
609 bytes removed
,
09:37, 30 June 2019
→UI
:
Cut out DialogueBox, part of Menus
Line 279:
Line 279:
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
Game1.addHUDMessage(new HUDMessage("MESSAGE", 3));
</source>
</source>
−
−
−
===DialogueBox===
−
−
A '''DialogueBox''' is a text box with a slightly larger, slightly boldfaced text, with "typewriter-like" effect.
−
−
There are several variants, including ones with a dialogue/conversation choices.
−
−
Within the message, use a caret "^" to put a linebreak.
−
−
Here is an example of a '''simple, choiceless output:'''
−
−
<source lang="c#">
−
using StardewValley.Menus; // This is where the DialogueBox class lives
−
−
string message = "This looks like a typewriter ... ^But it's not ...^It's a computer.^"
−
Game1.activeClickableMenu = new DialogueBox(message)
−
</source>
−
−
// TODO: Examples with choices
==Menus==
==Menus==
Pepoluan
57
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Modding
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Admin noticeboard
Help Editing
Random page
Official Links
Official Site
Official Forums
Official Merchandise
Discord
Reddit
Tools
Upload file
Special pages
Printable version