Skip to content

Right-click inventory item should open UFOpaedia entry #8

Description

@ayrtondenner

Description

Port of upstream OpenApoc#1571.

In the original X-COM: Apocalypse, right-clicking an item in the agent or vehicle equip screen opens its corresponding UFOpaedia entry. Currently in OpenApoc, right-click behaves the same as left-click (drag & drop).

Scope

Modify two files:

  • game/ui/general/aequipscreen.cpp — Agent equip screen
  • game/ui/base/vequipscreen.cpp — Vehicle equip screen

Add right-click detection, UFOpaedia entry lookup (via UfopaediaEntry::data_id), and open UfopaediaCategoryView.

Testing Checklist

  • Agent equip — paper doll: Right-click item on paper doll → opens UFOpaedia entry
  • Agent equip — inventory bar: Right-click item in bottom inventory → opens UFOpaedia entry
  • Agent equip — left-click unchanged: Left-click still drags items as before
  • Vehicle equip — mounted items: Right-click equipped vehicle item → opens UFOpaedia entry
  • Vehicle equip — inventory items: Right-click item in vehicle inventory → opens UFOpaedia entry
  • Vehicle equip — left-click unchanged: Left-click still drags items as before
  • Empty slot: Right-click on empty slot → no crash, nothing happens
  • No UFOpaedia entry: Right-click item without UFOpaedia entry → nothing happens gracefully
  • While dragging: Right-click while dragging an item → no interference with drag state
  • Enemy mode: Right-click does nothing in Enemy mode on agent equip screen

Metadata

Metadata

Assignees

Labels

codingCode changes and fixes

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions