18 lines
6.7 KiB
HTML
18 lines
6.7 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__DEFINES/text.dm - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="code/__DEFINES/text.html#define">Define Details</a></header><main><h1>code/__DEFINES/text.dm <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm0"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm0"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="code/__DEFINES/text.html#define/FOURSPACES">FOURSPACES</a></th><td>Does 4 spaces. Used as a makeshift tabulator.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT">MAPTEXT</a></th><td>Standard maptext
|
|
Prepares a text to be used for maptext. Use this so it doesn't look hideous.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT_PIXELLARI">MAPTEXT_PIXELLARI</a></th><td>Pixel-perfect scaled fonts for use in the MAP element as defined in skin.dmf</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT_GRAND9K">MAPTEXT_GRAND9K</a></th><td>Standard size (ie: normal runechat) - Size options: 6pt 12pt 18pt.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT_TINY_UNICODE">MAPTEXT_TINY_UNICODE</a></th><td>Small size. (ie: context subtooltips, spell delays) - Size options: 12pt 24pt.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT_SPESSFONT">MAPTEXT_SPESSFONT</a></th><td>Smallest size. (ie: whisper runechat) - Size options: 6pt 12pt 18pt.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/MAPTEXT_VCR_OSD_MONO">MAPTEXT_VCR_OSD_MONO</a></th><td>Prepares a text to be used for maptext, using a variable size font.</td></tr><tr><th><a href="code/__DEFINES/text.html#define/WXH_TO_HEIGHT">WXH_TO_HEIGHT</a></th><td>Macro from Lummox used to get height from a MeasureText proc.
|
|
resolves the MeasureText() return value once, then resolves the height, then sets return_var to that.</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/FOURSPACES"><aside class="declaration">#define </aside>FOURSPACES <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L2"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 2"></a></h3><p>Does 4 spaces. Used as a makeshift tabulator.</p><h3 id="define/MAPTEXT"><aside class="declaration">#define </aside>MAPTEXT<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L6"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 6"></a></h3><p>Standard maptext
|
|
Prepares a text to be used for maptext. Use this so it doesn't look hideous.</p><h3 id="define/MAPTEXT_GRAND9K"><aside class="declaration">#define </aside>MAPTEXT_GRAND9K<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L23"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 23"></a></h3><p>Standard size (ie: normal runechat) - Size options: 6pt 12pt 18pt.</p><h3 id="define/MAPTEXT_PIXELLARI"><aside class="declaration">#define </aside>MAPTEXT_PIXELLARI<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L20"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 20"></a></h3><p>Pixel-perfect scaled fonts for use in the MAP element as defined in skin.dmf</p>
|
|
<p>Four sizes to choose from, use the sizes as mentioned below.
|
|
Between the variations and a step there should be an option that fits your use case.
|
|
BYOND uses pt sizing, different than px used in TGUI. Using px will make it look blurry due to poor antialiasing.</p>
|
|
<p>Default sizes are prefilled in the macro for ease of use and a consistent visual look.
|
|
To use a step other than the default in the macro, specify it in a span style.
|
|
For example: MAPTEXT_PIXELLARI("<span style='font-size: 24pt'>Some large maptext here</span>")
|
|
Large size (ie: context tooltips) - Size options: 12pt 24pt.</p><h3 id="define/MAPTEXT_SPESSFONT"><aside class="declaration">#define </aside>MAPTEXT_SPESSFONT<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L29"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 29"></a></h3><p>Smallest size. (ie: whisper runechat) - Size options: 6pt 12pt 18pt.</p><h3 id="define/MAPTEXT_TINY_UNICODE"><aside class="declaration">#define </aside>MAPTEXT_TINY_UNICODE<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L26"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 26"></a></h3><p>Small size. (ie: context subtooltips, spell delays) - Size options: 12pt 24pt.</p><h3 id="define/MAPTEXT_VCR_OSD_MONO"><aside class="declaration">#define </aside>MAPTEXT_VCR_OSD_MONO<aside>(text)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L42"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 42"></a></h3><p>Prepares a text to be used for maptext, using a variable size font.</p>
|
|
<p>More flexible but doesn't scale pixel perfect to BYOND icon resolutions.
|
|
(May be blurry.) Can use any size in pt or px.</p>
|
|
<p>You MUST Specify the size when using the macro
|
|
For example: MAPTEXT_VCR_OSD_MONO("<span style='font-size: 24pt'>Some large maptext here</span>")
|
|
Prepares a text to be used for maptext, using a variable size font.
|
|
Variable size font. More flexible but doesn't scale pixel perfect to BYOND icon resolutions. (May be blurry.) Can use any size in pt or px.</p><h3 id="define/WXH_TO_HEIGHT"><aside class="declaration">#define </aside>WXH_TO_HEIGHT<aside>(measurement, return_var)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/text.dm#L46"><img src="git.png" width="16" height="16" title="code/__DEFINES/text.dm 46"></a></h3><p>Macro from Lummox used to get height from a MeasureText proc.
|
|
resolves the MeasureText() return value once, then resolves the height, then sets return_var to that.</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |