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:
parent
916322d0ed
commit
292695a7b5
1 changed files with 14 additions and 4 deletions
|
@ -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" }));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue