Skip to content

Commit

Permalink
Rearrange some widgets, add ref editor
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypenner committed Aug 17, 2024
1 parent 60b8460 commit c7268e5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inspector/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { charset, useHabitatText } from "./data.js"
import { Scale } from "./render.js"
import { makeCanvas } from "./shim.js"
import { parseHabitatObject } from "./neohabitat.js"
import { startDrag, overlayImageView, overlayImageEditor, transparencyGridStyle, booleanCheckbox, borderStyle } from "./edit.js"
import { startDrag, overlayImageView, overlayImageEditor, transparencyGridStyle, booleanCheckbox,
borderStyle, fieldEditor } from "./edit.js"

export const TEXT_W = 40
export const TEXT_H = 16
Expand Down Expand Up @@ -464,6 +465,8 @@ export const textEditView = ({ pages, tracker }) => {
<${booleanCheckbox} obj=${editState} field="insertMode">Insert mode<//><br/>
<${booleanCheckbox} obj=${editState} field="spaceMouse">Spacebar draws selected char<//><br/>
<${booleanCheckbox} obj=${editState} field="onlyDrawingChars">Hide text characters<//><br/>
<${fileLoadView} pages=${pages} tracker=${tracker}/><br/>
<${overlayImageEditor} cropstyle="document"/>
<button onclick=${() => tracker.undo()}>Undo</button>
<button onclick=${() => tracker.redo()}>Redo</button>
<div>
Expand All @@ -474,9 +477,8 @@ export const textEditView = ({ pages, tracker }) => {
</div>
</div>
<${pageNav} pages=${pages} tracker=${tracker}/>
<label>Ref: <${fieldEditor} obj=${editState} field="ref"/></label><br/>
<p>Click on the document above to move the cursor and draw the currently-selected character.</p>
<p>If the document does not have focus, you can enable keyboard input without moving the cursor by clicking
on any blank space on the page.</p>
<${fileLoadView} pages=${pages} tracker=${tracker}/><br/>
<${overlayImageEditor} cropstyle="document"/>`
on any blank space on the page.</p>`
}

0 comments on commit c7268e5

Please sign in to comment.