FlightGear Newsletter June 2014: Difference between revisions

Jump to navigation Jump to search
m
→‎Development news: Canvas MessageBox
No edit summary
m (→‎Development news: Canvas MessageBox)
Line 31: Line 31:
   }}
   }}
}}
}}
=== Canvas GUI: MessageBox Support ===
Thanks to Tom's recent work on the upcoming [[Aircraft Center]], beginning with FlightGear 3.2, FlightGear's [[Canvas]]-based GUI will contain support for so called [[Canvas MessageBox|Message Boxes]]:
{|
|- style="vertical-align:top;"
| [[File:Canvas-MessageBox-demo information.png|link=]] ||
<syntaxhighlight lang="nasal">
canvas.MessageBox.info("Success", "The operation has successfully completed.");
</syntaxhighlight>
|- style="vertical-align:top;"
| [[File:Canvas-MessageBox-demo question.png|link=]] ||
<syntaxhighlight lang="nasal">
canvas.MessageBox.question(
  "Do you want it?",
  "The question is: Do you want to get a real question?.",
  func(sel)
  {
    if( sel == canvas.MessageBox.Yes )
      print("I only know that the answer is 42.");
    else
      print("Ok, I will not give you a real question.");
  }
);
</syntaxhighlight>
|- style="vertical-align:top;"
| [[File:Canvas-MessageBox-demo warning dont-show-again.png|link=]] ||
<syntaxhighlight lang="nasal">
canvas.MessageBox.warning(
  "Warning...",
  "Have you read this warning? If you want it will not be shown again.",
  func(sel)
  {
    if( sel != canvas.MessageBox.Ok )
      return;
    print("You have been warned. Let the games begin...");
  },
    canvas.MessageBox.Ok
  | canvas.MessageBox.Cancel
  | canvas.MessageBox.DontShowAgain
);
</syntaxhighlight>
|}
=== Logo Proposal ===
=== Logo Proposal ===
This is the new logo badge concept proposal for FlightGear designed by Michat.
This is the new logo badge concept proposal for FlightGear designed by Michat.

Navigation menu