Skip to reading
Eight Adventure Interface Workshops

Make inventory left and right clicks agree

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Install bass_buttons from Chapter 12 as a Global Script. Leave Use Selected Verb enabled on bass_items. The adapter listens to that widget’s item event before its built-in interaction runs.

Source table from Make inventory left and right clicks agree, page 54
InputAdapter stateResult
Left-click an itemClear an old selection; choose Look.The built-in item interaction examines it.
Right-click an itemClear an old selection; choose Walk.The built-in item interaction selects it.
HoverNo selection change.The pointer can inspect the strip without using anything.
Use a selected item on a targetThe object’s explicit right-use route executes the target.The matching item rule supplies the result.

The selected-item world route in this tutorial is right-click. The original can apply a carried item with either button in relevant contexts. Extending left-click selected-item use is a separate input rule; do not silently replace left-look everywhere.

The script is scoped to bass_items. If you change that element ID, update the script too. It should not rewrite inventory clicks in every other interface in this book.

Page 54 of 119Permalink
Go to page