1
0
Fork 0
Commit graph

74 commits

Author SHA1 Message Date
mfranz
fe78690623 allow to not only set a general widget <color>, but also specific element
colors:  <color-{{back,fore}ground,highlight,label,legend,misc,editfield}>
<input-misc>, for example, sets the input field cursor color, <input-legend>
the input field text color. (This feature was always planned as part of the
'theming' capabilities, and most code is already in place. Only this line
was apparently fogotten. :-)
2006-04-14 10:17:09 +00:00
mfranz
86d606f87a <input> elements that are <live> always update their input field from the
<property>, except if they are activated, in which case the user input
should, of course, not get overwritten. But if such an input was active and
the user selected a different widget, then its contents were dropped.
Fix that by setting the "DownCallback" for live input fields.
2006-04-03 15:00:33 +00:00
mfranz
651db1845b - make aircraft list no longer stick out from its dialog box
- cosmetics: consistent coding style (and "if" is not a function :-)
2006-03-25 07:45:50 +00:00
mfranz
bf53d2b117 - set size, otherwise the widget doesn't expand to the size that the layouter
found desirable
- set slider width default correctly (parentHeight? Huh?)
2006-03-23 23:02:48 +00:00
mfranz
a04aad7a99 puList.cxx: _list_box->getIntegerValue() returns -1 as long as no list
entry was selected. Return 0 in this case, not an invalid string address
  (causing segfaults).
dialogs.cxx: don't set property if no list entry was chosen.
2006-03-22 10:56:49 +00:00
mfranz
b0b5c2dda9 remove useless test 2006-03-08 20:23:31 +00:00
mfranz
2de4fd5d8e add support for <nasal> blocks <open> and <close> in XML dialogs:
<nasal>
      <open>print("I'm called on dialog open")</open>
      <close>print("I'm called on dialog close")</close>
  </nasal>

All Nasal runs in a dialog namespace, so that variables and functions
defined in the <open> block can be used in <binding>s, etc. This is
especially useful for <radio> button handling. See "location-in-air.xml".
2006-03-08 10:44:46 +00:00
mfranz
ef70c9cf41 backspace accelerator 2006-03-01 14:26:17 +00:00
fredb
36e4045810 Add missing include files needed by the new math code under windows 2006-02-18 13:58:09 +00:00
mfranz
f5469ba9fe only user specified negative coords are interpreted as relative to the upper
right corner, not those that are result of centering a dialog if no x/y are
given. This centers screen.log messages correctly. But maybe we have to
rethink that special meaning of negative coords altogether.
2006-02-12 19:43:53 +00:00
mfranz
aec1d580c2 on closing a dialog write the last position back, so that the caller can
open it there again next time
2006-01-29 21:21:56 +00:00
mfranz
cabf53537a allow top level <font> definition that applies to text in the whole dialog
and makes the layouter use this font's metrics
2006-01-27 12:57:13 +00:00
mfranz
54ee68291b fonts are now delivered by FGFontCache (except for the splash screen,
because this comes way before the gui subsystem is ready)
2006-01-27 08:01:31 +00:00
mfranz
e2016f9568 fix FGFontCache and make use of it (this allows to assign bitmap fonts
in dialogs)
2006-01-26 21:40:37 +00:00
mfranz
f6225f5cb7 remove a few unused vars
menubar: cosmetics of the day
2005-12-15 20:07:14 +00:00
mfranz
5299ab0304 distinguish editable and non editable textboxes; the former will usually
be colored like input fields, while the others will be colored like normal
text
2005-11-09 18:23:55 +00:00
mfranz
feb555b087 prepare for pending plib change: set combobox/selectbox input field colors
to other color than "Yeukky Pink"; #undef'ed for older plib versions; plib
patch will be made available in case fgfs 0.9.9 is released before plib 0.8.5
2005-11-09 17:59:53 +00:00
mfranz
e4929c1dc1 interpret negative dialog <x> and <y> coordinates as distance from the
right/upper screen edge (analogous to the --geometry spec), assuming
that we never want to draw outside the screen area; for this to work
we need to write the original x/y coords back to overwrite the absolute,
positive values that the layouter stored there
2005-11-06 23:53:30 +00:00
mfranz
63f5947afc backing out all changes to non-depreciated symbols/functions: plib's cvs
isn't tagged, so we can't easily say what was added after the last stable
release
2005-11-06 14:27:17 +00:00
mfranz
30f5e63f81 implement <key> property for key names: <keynum>27</keynum> == <key>Esc</key> 2005-11-05 18:41:43 +00:00
mfranz
e7d2718e15 switch from depreciated pui functions to the "new", supported ones
(OK'ed by Curt)
2005-11-05 09:51:01 +00:00
mfranz
7f3cd89be5 return correct input object 2005-11-03 20:15:05 +00:00
mfranz
add06e613d cleanup 2005-11-02 13:52:01 +00:00
mfranz
fd5ed5a8fa allow to trigger widgets via accelerator key, which is defined via "keynum"
property (e.g. <keynum>49</keynum>). The numbers are the same as in
keyboard.xml. (Could later be replaced/enhanced with <key>Ctrl-a</key>
notation.) This does, of course, only work for widgets with assigned
bindings.
2005-11-02 13:11:19 +00:00
mfranz
58179758af add support for a <hide> property, which hides whole XML groups (widgets
or data blocks) from layouter and dialog creator. This is required for
dynamically generated/modified dialogs. Parts in the XML file can be
hidden and turned on by the C++ code. Other hidden parts can be used
as templates that are multiply used. Hidden datablocks can contain
strings that are used in dialog context, that are easier to translate
or modify in the XML file.
2005-10-21 17:47:48 +00:00
ehofman
0666590909 Fix a segmentation fault when switching to a new style and selecting a new dialog. I still need to find out why getColor doesn't work properly. 2005-07-18 10:00:02 +00:00
mfranz
3e38a4d415 - suppress CygWin warnings (Vivian Meazza) 2005-07-13 11:43:00 +00:00
mfranz
4ac0776e97 nasal dialogs are separate trees and have an empty name 2005-07-13 07:05:50 +00:00
mfranz
eefd7dee8c - fix alpha handling (hopefully)
- remove another leftover debugging line
2005-07-13 06:37:39 +00:00
mfranz
275a9a5cc0 - don't clamp when setting, but on request (allows to set an invalid color)
- adapt constness
- remove leftover debugging line
2005-07-12 16:48:16 +00:00
mfranz
387888862c - let FGColor setters/mergers report if they found something merge-worthy
- tune "use-<color>-node-for-pucol" masks
2005-07-11 08:01:28 +00:00
mfranz
01bca490b1 add missing paren 2005-07-09 14:01:52 +00:00
mfranz
f3e88fc05d - clear alpha like r/g/b
- fix warning
- replace tabs by 4 spaces, according to the style of the file
2005-07-09 13:53:25 +00:00
mfranz
f65eb6e3d5 tell the layouter about the default font (I wonder why
LayoutWidget::setDefaultFont() wants puFont* /and/ pointsize as extra
parameters, when puFont knows its pointsize anyway. Didn't want to change
that yet, though.) Now the HELVETICA_10 font makes actually sense. :-)
2005-07-08 20:12:06 +00:00
mfranz
e675f80a66 remove commented out and non-functional code for now 2005-07-08 06:45:00 +00:00
mfranz
f2bf0a7cb3 - use color map information from new_gui.cxx and set puObject colors
accordingly;
- cleanup (call all puObjects "obj" for easier editing/copying)
- commented out code: (not-yet functional props preprocessor)
2005-07-07 21:30:34 +00:00
mfranz
cac0a9b326 - abstract out reading colors from the property tree into a routine.
This could also be used to read the default foreground/background color
  from a definition in preferences.xml or gui/color.xml.
2005-07-04 07:27:17 +00:00
mfranz
e73dffb99f - fix <hrule>
- add <vrule>
- allow elements to default to foreground color (black)
- remove redundant  if (foo) delete foo;

The rules do currently need a dummy child for the layouter to work correctly,
(<hrule><foo/></hrule>). The goal is to make a simple <hrule/> work.
2005-07-02 20:49:38 +00:00
mfranz
550352c0b6 keep panel and gui bindings nicely separated; useful for debugging,
especially now that the property path is shown in nasal error messages
2005-06-24 14:07:15 +00:00
mfranz
19b09cef28 FGBindings doesn't create its own, detached copy of the bindings property
subtree. Keeping bindings available is in the responsibility of the caller.
2005-06-24 13:44:22 +00:00
mfranz
0636ebfc86 - fix "frame" (the old code was broken and ... strange)
- add "hrule" (horizontal rule; accepts color and "pref-height" for thickness)
2005-06-20 20:54:47 +00:00
ehofman
70fe768e5c Revert the previous patch. 2005-05-17 09:56:52 +00:00
ehofman
a75c0859bd Oops, I didn't test compile the latest code and this is what happens. 2005-05-16 09:05:17 +00:00
ehofman
d4b8a81a44 Make the dialogs work again. 2005-05-16 08:37:18 +00:00
ehofman
48f45296ce Add support for altering the border thickness of objects and add a 'frame' object as a visual representation of a group. 2005-05-06 11:46:52 +00:00
ehofman
a760869475 Fix a couple of stupid mistakes, I'm off to find a brown paper bag now. 2005-05-03 12:48:31 +00:00
ehofman
a4eebe4277 Shoot, I removed a bit of crucial information just before committing it. 2005-05-03 12:20:17 +00:00
ehofman
2c3b8e075c Make it possible to define a different font for the labels 2005-05-03 11:58:33 +00:00
ehofman
c3ba52d821 Allow for defining the label color. 2005-05-02 14:45:04 +00:00
ehofman
0c61e0dae1 Make it optional whether a dialog can be dragged or not. 2005-05-02 12:14:12 +00:00