1
0
Fork 0

Mouse-mode feedback message adjusts based on trigger

When triggering mouse-mode switching with right-click instead of Tab,
adjust the visual feedback to reflect this. Suggested by Huntley
Palmer.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2484/
This commit is contained in:
James Turner 2020-12-23 12:37:50 +00:00
parent 916322d0ed
commit 292695a7b5

View file

@ -725,10 +725,20 @@ var cycleMouseMode = func(node)
}
var msg = "";
if (mode == 1)
msg = "Mouse is controlling flight controls. Press TAB to change.";
else
msg = "Mouse is controlling view direction. Press TAB to change.";
# give correct feedback for the UI action which prompted this
var suffix = "Press TAB to change.";
if (reason == "right-click") {
suffix = "Right-click to change.";
}
if (mode == 1) {
msg = "Mouse is controlling flight controls.";
} else {
msg = "Mouse is controlling view direction.";
}
msg = msg ~ " " ~ suffix;
fgcommand("show-message", props.Node.new({ "label": msg, "id":"mouse-mode" }));
}