Fixing windows-specific code

This commit is contained in:
Josh Yelon 2005-06-09 18:48:17 +00:00
parent 0a61e91bbd
commit c7cc6840db
2 changed files with 8 additions and 6 deletions

View File

@ -6,8 +6,7 @@ from direct.showbase.PandaObject import *
from direct.showbase.TkGlobal import *
from Valuator import *
from direct.task import Task
import math
import string
import math,sys,string
FLOATER_WIDTH = 22
FLOATER_HEIGHT = 18
@ -46,13 +45,15 @@ class FloaterWidget(Pmw.MegaWidget):
def __init__(self, parent = None, **kw):
#define the megawidget options
INITOPT = Pmw.INITOPT
SystemButtonFace = 'Grey'
if (sys.platform == "win32"): SystemButtonFace='SystemButtonFace'
optiondefs = (
# Appearance
('width', FLOATER_WIDTH, INITOPT),
('height', FLOATER_HEIGHT, INITOPT),
('relief', RAISED, self.setRelief),
('borderwidth', 2, self.setBorderwidth),
('background', 'SystemButtonFace', self.setBackground),
('background', SystemButtonFace, self.setBackground),
# Behavior
# Initial value of floater, use self.set to change value
('value', 0.0, INITOPT),

View File

@ -5,8 +5,7 @@ Slider Class: Velocity style controller for floating point values with
from direct.showbase.TkGlobal import *
from Valuator import *
from direct.task import Task
import math
import string
import math,sys,string
import operator
from pandac.PandaModules import ClockObject
@ -84,12 +83,14 @@ class SliderWidget(Pmw.MegaWidget):
# Define the megawidget options.
INITOPT = Pmw.INITOPT
SystemButtonFace = 'Grey'
if (sys.platform == "win32"): SystemButtonFace='SystemButtonFace'
optiondefs = (
# Appearance
('style', VALUATOR_MINI, INITOPT),
('relief', RAISED, self.setRelief),
('borderwidth', 2, self.setBorderwidth),
('background', 'SystemButtonFace', self.setBackground),
('background', SystemButtonFace, self.setBackground),
('fliparrow', 0, INITOPT),
# Behavior
# Bounds