# ISignEditScreen

`com.jsmacrosce.jsmacros.client.access.ISignEditScreen`

Mixin-backed access to text and cursor operations on an open sign-edit screen; this is not a
screen type to construct or a global API.  
```js
const screen = Hud.getOpenScreen();  
if (screen) {
  if (typeof screen.jsmacros_setLine === "function") {
    if (typeof screen.jsmacros_fixSelection === "function") {
      screen.jsmacros_setLine(0, "Hello");  
      screen.jsmacros_fixSelection(); // moves the cursor on the current line
    }
  }
}
```

## Methods

### jsmacros_fixSelection {#com.jsmacrosce.jsmacros.client.access.ISignEditScreen_jsmacros_fixSelection-}

```js
jsmacros_fixSelection(): void
```

Moves the cursor to the end of the currently selected line and collapses any selection; it
does not change which line is active. With a non-null current message, a missing text-field
helper leaves the cursor unchanged.

### jsmacros_setLine {#com.jsmacrosce.jsmacros.client.access.ISignEditScreen_jsmacros_setLine-int-String-}

```js
jsmacros_setLine(int line, String text): void
```

Replaces a line in the open sign editor's messages and displayed sign text; it does not send
a packet, update the block entity, close the editor, or change the active line or cursor.  
A line outside the message array's range throws `IndexOutOfBoundsException` before either value is changed.

**Parameters:**
- `line`: zero-based line from the top (normally 0 through 3 for a four-line sign)
- `text`: non-null replacement line text
