Board index FlightGear Development New features

Feature Suggestion: Enter exact number

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Feature Suggestion: Enter exact number

Postby CaptainTech » Sat Jan 16, 2016 2:32 pm

Hello. I have seen some places in FlightGear (e.g. Simulation Rate, Time Warp, number of Random Failures, amount of fuel (viewtopic.php?f=6&t=28375) etc.), where it's not possible to enter a number manually.

So what I suggest is this:
Image

It would also be good, if I could specify, what instruments should file and which one should not be affected.
CaptainTech
 
Posts: 67
Joined: Wed Sep 02, 2015 6:12 pm
Callsign: CaptainTech
Version: Newest
OS: Windows 7 Ultimate

Re: Feature Suggestion: Enter exact number

Postby legoboyvdlp » Sat Jan 16, 2016 3:02 pm

Well, you already coded it by the looks of it, so why not just send a merge request? ;)
Nice enough idea.

However, feature requests should go on the mailing lists, not here.
User avatar
legoboyvdlp
 
Posts: 7326
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: Feature Suggestion: Enter exact number

Postby CaptainTech » Sat Jan 16, 2016 4:14 pm

This is a manipulated image. I am too lazy to code it. And I don't wnat to run into the risk of creating bugs. :)
Last edited by Gijs on Sat Jan 16, 2016 4:34 pm, edited 1 time in total.
Reason: No useless quoting please
CaptainTech
 
Posts: 67
Joined: Wed Sep 02, 2015 6:12 pm
Callsign: CaptainTech
Version: Newest
OS: Windows 7 Ultimate

Re: Feature Suggestion: Enter exact number

Postby Hooray » Sat Jan 16, 2016 8:45 pm

there is no coding involved to modify dialogs like this, see $FG_ROOT/Docs/README.gui and refer to examples in $FG_ROOT/gui/dialogs

It's all just XML and properties
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11493
Joined: Tue Mar 25, 2008 8:40 am

Re: Feature Suggestion: Enter exact number

Postby Parnikkapore » Sun Jan 17, 2016 1:51 am

Hooray,this looks like criticizing,but xml is a type of coding.
Will you call <HTML> a "user-friendly" thing like you did with xml?
Biggest flaw of FlightGear. It's perfect for coders but not LAZY end-users buying x-plane.
My brother 's like that...
There are free alternatives to every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 818
Joined: Thu Oct 29, 2015 10:16 am
Callsign: HS-FGS
Version: next [PPA]
OS: Mint 18

Re: Feature Suggestion: Enter exact number

Postby Necolatis » Sun Jan 17, 2016 1:57 am

I submitted merge request with a dialog where you can enter a number for each failure mode. But no-one reviewed it, so it did not get commited. Or maybe they just didn't like it, don't know.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2051
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Feature Suggestion: Enter exact number

Postby Hooray » Sun Jan 17, 2016 3:55 am

Parnikkapore wrote in Sun Jan 17, 2016 1:51 am:Hooray,this looks like criticizing,but xml is a type of coding.
Will you call <HTML> a "user-friendly" thing like you did with xml?


I only said that an editing an XML file to create/modify a FlightGear dialog does not involve any "coding" or "programming".
If in doubt, I suggest to review the wikipedia article on "programming languages" and on "XML" in particular.

XML isn't any more coding than using a word-processor to play Sudoku - there are a few rules that you need to obey, but it's certainly not coding in the sense of programming.
Which has more to do with the way XML is used in FlightGear and not with XML being de-facto unsuitable to be used for programming purposes, i.e. being "interpreted" (see XSLT).

Thus, XML is merely a file format/structure on top of plain text files, a subset of which is used by /some/ Flightgear subsystems.
You don't need to be familiar with coding/programming to successfully modify XML files.

@Necolatis: Have you considered putting it up again for review and post a heads-up via the issue tracker/devel list
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11493
Joined: Tue Mar 25, 2008 8:40 am

Re: Feature Suggestion: Enter exact number

Postby Buckaroo » Sun Jan 17, 2016 4:27 am

Hooray wrote in Sat Jan 16, 2016 8:45 pm:there is no coding involved to modify dialogs like this


A markup language is by definition a set of rules for encoding. For anyone but a pedant, that's "coding". Flightgear has all sorts of behavior that is "programmed" by constructing XML or XML-like markup.

Making a mockup of a user interface can be considerably easier than changing the interface itself if one is not experienced in the necessary details of the UI. Doing the actual work is always welcome but should not be a requirement for submitting an idea.

-Buck
Callsign: Buckaro(o)
Author: Lockheed 1049H Constellation, Grumman Goose, MD-81, Edgley Optica, Velocity XL RG, YASim Guide
User avatar
Buckaroo
 
Posts: 475
Joined: Fri Jan 18, 2008 6:45 am
Location: Bloomington IN USA
Callsign: Buckaro(o)
Version: 2.10
OS: Windows & Linux

Re: Feature Suggestion: Enter exact number

Postby Hooray » Sun Jan 17, 2016 4:48 am

Buckaroo wrote in Sun Jan 17, 2016 4:27 am:
Hooray wrote in Sat Jan 16, 2016 8:45 pm:there is no coding involved to modify dialogs like this

A markup language is by definition a set of rules for encoding. For anyone but a pedant, that's "coding". Flightgear has all sorts of behavior that is "programmed" by constructing XML or XML-like markup.


I suggest to read up on the wikipedia articles on "Programming language" and Markup language".

You are mincing words here - please feel free to just ignore what I said, and do a little research instead:

http://c2.com/cgi/wiki?XmlProgrammingLanguage
http://www.cse.chalmers.se/~bengt/talks ... ungang.pdf
http://inventwithpython.com/blog/2013/1 ... -language/
http://programmers.stackexchange.com/qu ... g-language

(like I said previously, that does not mean that you could not treat XML as a programming language, but it is simply not required for the sake of editing a GUI dialog in FlightGear to add a textbox widget to it, all the coding is encapsulated and handled elsewhere)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11493
Joined: Tue Mar 25, 2008 8:40 am

Re: Feature Suggestion: Enter exact number

Postby Parnikkapore » Sun Jan 17, 2016 6:46 am

You mean I don't have to do any algorithm/logic stuff while making dialogs,to clarify?

Then who's gonna make the nasal?

EDIT: and please note the difference between programming as in JavaScript and coding(Markup?) as in html
There are free alternatives to every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 818
Joined: Thu Oct 29, 2015 10:16 am
Callsign: HS-FGS
Version: next [PPA]
OS: Mint 18

Re: Feature Suggestion: Enter exact number

Postby Thorsten » Sun Jan 17, 2016 7:14 am

The effort to add a simple dialog option is about the effort to make a mockup of it in gimp - you copy/paste the line above, then alter what you want to alter. Usually no Nasal is involved at all, you're just describing what the thing does.

The learning effort is considerably less than the effort required to learn the graphics program you need to create the mockup, so if you'd start with nothing, you'd have the real dialog well before you'd have the mockup.

To cast this as a fearsome hurdle is really doing a disservice, regardless of whether you want to call this coding or not (in a sense, you're also applying logic and rules when using gimp or photoshop, so is this coding as well?)
Thorsten
 
Posts: 11378
Joined: Mon Nov 02, 2009 8:33 am

Re: Feature Suggestion: Enter exact number

Postby Parnikkapore » Sun Jan 17, 2016 7:54 am

+1 Thorsten,better waste your effort on making it rather than learning how to photoshop.
Anyway,when planning a feature I never make "full" mockups,I just plan what it does,make pencil-or-pen sketches,and start posting or coding!

That's exactly what I did for my auto-screenshot-refresher and joystick file. The latter is as easy as copying,pasting,changing what I don't like,and see how my changes did.
There are free alternatives to every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 818
Joined: Thu Oct 29, 2015 10:16 am
Callsign: HS-FGS
Version: next [PPA]
OS: Mint 18

Re: Feature Suggestion: Enter exact number

Postby Hooray » Sun Jan 17, 2016 4:56 pm

Honestly, just navigate to $FG_ROOT/gui/dialogs/exit.xml and open it in a text/xml editor.
Then see if it's making sense to you.
If it doesn't, because of the XML syntax, refer to $FG_ROOT/Docs/README.xmlsyntax
If you don't know what properties are, refer to $FG_ROOT/Docs/README.properties

To see, what GUI specific tags are supported there, see $FG_ROOT/Docs/README.gui

This may sound like a ton of stuff, but adding a widget is trivial, because it does not involve any Nasal/coding at all - the first step is making the widget show up using the correct widget name (README.gui), the next step is hooking that up to the corresponding property.

There's more to it, e.g. layouting ($FG_ROOT/Docs/README.layout) - but in general, you will only need to know a tiny subset of these things to make simple changes - and in fact, you often don't even need to look at these files, because it will suffice to just look at other dialogs and copy/paste stuff from them.

Regarding the patch that Necolatis created, my suggestion would be to turn this into a tutorial for the wiki, which illustrates how to go about making similarly straightforward changes.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11493
Joined: Tue Mar 25, 2008 8:40 am


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest