feat(input): assess world objects on right click
Port SmartBox's release-completed sr_Examine gesture through the configurable SelectRight binding. Cancel camera drags at the shared retail three-pixel threshold, then reuse the canonical picker, selection pulse, and appraisal request path without inventing another wire or UI owner. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
6718ee45a0
commit
5ad32d5753
16 changed files with 394 additions and 13 deletions
|
|
@ -258,6 +258,37 @@ public class KeyBindingsJsonTests
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LoadOrDefault_migratesV4SelectRightPressBindingToClick()
|
||||
{
|
||||
var path = TempFile();
|
||||
try
|
||||
{
|
||||
const string json = """
|
||||
{
|
||||
"version": 4,
|
||||
"actions": {
|
||||
"SelectRight": [
|
||||
{ "key": "-1002", "device": 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
""";
|
||||
File.WriteAllText(path, json);
|
||||
|
||||
var loaded = KeyBindings.LoadOrDefault(path);
|
||||
Binding binding = Assert.Single(
|
||||
loaded.ForAction(InputAction.SelectRight));
|
||||
|
||||
Assert.Equal((Key)(-1002), binding.Chord.Key);
|
||||
Assert.Equal(ActivationType.Click, binding.Activation);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (File.Exists(path)) File.Delete(path);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LoadOrDefault_unknown_action_name_skipped_silently()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue