]> git.mxchange.org Git - flightgear.git/commit
Melchior FRANZ:
authorehofman <ehofman>
Sat, 26 Mar 2005 10:09:34 +0000 (10:09 +0000)
committerehofman <ehofman>
Sat, 26 Mar 2005 10:09:34 +0000 (10:09 +0000)
commitdb989269b8521a5825d2733a991b19c9fef50f55
tree055a13ed9a46695360d90a36401072c797e799f7
parenta488ab4d31f380b4e8cae2770fbb47c227e82f1b
Melchior FRANZ:

Printing floats in dialogs with 8 digits after the comma is inappropriate
for most cases.

- implement a "format" property for "text" gui elements (a.k.a. pui label).
  Number formats are set by strtod/snprintf, while formats on non-numbers
  are replaced by "%s". Practical example in the upcoming material.nas update.
  Valid formats regex:  '%[ -]?\d*(\.\d*)?l?f' (IOW: the format must begin
  with '%' and end with 'f').

  # Nasal:
  number = dialog.addChild("text");
  number.set("label", "3.1415926");
  number.set("format", "%.3f");
src/GUI/dialog.cxx