mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Fixing windows-specific code
This commit is contained in:
parent
0a61e91bbd
commit
c7cc6840db
@ -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),
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user