This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Sandbox.ModAPI.Ingame.IMyTextSurface
Malware edited this page Apr 8, 2019
·
29 revisions
← Index ← Namespace Index
public interface IMyTextSurfaceNamespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Inheritors:
| Member | Description |
|---|---|
| CurrentlyShownImage | The image that is currently shown on the screen. Returns NULL if there are no images selected OR the screen is in text mode. |
| FontSize | Gets or sets font size |
| FontColor | Gets or sets font color |
| BackgroundColor | Gets or sets background color |
| BackgroundAlpha | Value for offscreen texture alpha channel - for PBR material it is metalness (should be 0) - for transparent texture it is opacity |
| ChangeInterval | Gets or sets the change interval for selected textures |
| Font | Gets or sets the font |
| Alignment | How should the text be aligned |
| Script | Currently running script |
| ContentType | Type of content to be displayed on the screen. |
| SurfaceSize | Size of the drawing surface. |
| TextureSize | Size of the texture the drawing surface is rendered to. |
| PreserveAspectRatio | Preserve aspect ratio of images. |
| TextPadding | Text padding from all sides of the panel. |
| ScriptBackgroundColor | Background color used for scripts. |
| ScriptForegroundColor | Foreground color used for scripts. |
| Name | Identifier name of this surface. |
| DisplayName | Localized name of this surface. |
| Member | Description |
|---|---|
| WriteText(string, bool) | |
| GetText() | |
| WriteText(StringBuilder, bool) | |
| ReadText(StringBuilder, bool) | |
| AddImageToSelection(string, bool) | |
| AddImagesToSelection(List, bool) | |
| RemoveImageFromSelection(string, bool) | |
| RemoveImagesFromSelection(List, bool) | |
| ClearImagesFromSelection() | |
| GetSelectedImages(List) | |
| GetFonts(List) | |
| GetSprites(List) | |
| GetScripts(List) | |
| DrawFrame() | Creates a new draw frame where you can add sprites to be rendered. |
| MeasureStringInPixels(StringBuilder, string, float) | Calculates how many pixels a string of a given font and scale will take up. |
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!