From 178c16e94b0c26d93f7b62ab161d87959ad4ca9f Mon Sep 17 00:00:00 2001 From: alan eborn Date: Wed, 15 Oct 2014 15:05:26 +0000 Subject: [PATCH] DirectRadioButton--removal of model-loading by default and indicator handling Signed-off-by: rdb --- direct/src/gui/DirectRadioButton.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/direct/src/gui/DirectRadioButton.py b/direct/src/gui/DirectRadioButton.py index c96ba13dbb..c2cb423f0d 100755 --- a/direct/src/gui/DirectRadioButton.py +++ b/direct/src/gui/DirectRadioButton.py @@ -43,7 +43,7 @@ class DirectRadioButton(DirectButton): ('boxGeom', None, None), ('boxGeomColor', None, None), ('boxGeomScale', 1.0, None), - ('boxImage', loader.loadModel('models/gui/radio_button_gui'), None), + ('boxImage', None, None), ('boxImageScale', 1.0, None), ('boxImageColor', VBase4(1, 1, 1, 1), None), ('boxRelief', None, None), @@ -69,9 +69,11 @@ class DirectRadioButton(DirectButton): # Call option initialization functions self.initialiseoptions(DirectRadioButton) # After initialization with X giving it the correct size, put back space - if self['boxGeom'] == None: + if self['boxGeom'] is None: + if not 'boxRelief' in kw and self['boxImage'] is None: + self.indicator['relief'] = DGG.SUNKEN self.indicator['text'] = (' ', '*') - self.indicator['text_pos'] = (0, -.5) + self.indicator['text_pos'] = (0, -.25) else: self.indicator['text'] = (' ', ' ')