Class CellAttributesExtensions
Extension methods for CellAttributes manipulation.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public static class CellAttributesExtensions
Methods
GetAtlasIndex(CellAttributes)
Extracts the atlas texture index from the attributes.
Declaration
public static int GetAtlasIndex(this CellAttributes attributes)
Parameters
| Type | Name | Description |
|---|---|---|
| CellAttributes | attributes | The cell attributes to read. |
Returns
| Type | Description |
|---|---|
| int | The atlas index (0-255). |
GetHyperlinkTag(CellAttributes)
Extracts the hyperlink tag from the attributes. Tag 0 means no hyperlink is associated with this cell.
Declaration
public static byte GetHyperlinkTag(this CellAttributes attributes)
Parameters
| Type | Name | Description |
|---|---|---|
| CellAttributes | attributes | The cell attributes to read. |
Returns
| Type | Description |
|---|---|
| byte | The hyperlink tag (0-255). |
Has(CellAttributes, CellAttributes)
Checks whether the specified flag is set.
Declaration
public static bool Has(this CellAttributes attributes, CellAttributes flag)
Parameters
| Type | Name | Description |
|---|---|---|
| CellAttributes | attributes | The cell attributes to check. |
| CellAttributes | flag | The flag to test. |
Returns
| Type | Description |
|---|---|
| bool | True if the flag is set. |
WithAtlasIndex(CellAttributes, int)
Sets the atlas texture index in the attributes, preserving other flags. Values outside 0-255 are silently masked to the low 8 bits.
Declaration
public static CellAttributes WithAtlasIndex(this CellAttributes attributes, int atlasIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| CellAttributes | attributes | The cell attributes to modify. |
| int | atlasIndex | The atlas index (0-255). |
Returns
| Type | Description |
|---|---|
| CellAttributes | The modified attributes with the new atlas index. |
WithHyperlinkTag(CellAttributes, byte)
Sets the hyperlink tag in the attributes, preserving other flags.
Declaration
public static CellAttributes WithHyperlinkTag(this CellAttributes attributes, byte tag)
Parameters
| Type | Name | Description |
|---|---|---|
| CellAttributes | attributes | The cell attributes to modify. |
| byte | tag | The hyperlink tag (0-255). 0 means no hyperlink. |
Returns
| Type | Description |
|---|---|
| CellAttributes | The modified attributes with the new hyperlink tag. |