i’ve created a new window with base.openWindow() and I’ve made a button and it seems like it does not highlight when hovered. I think i need to make a mouse watcher for the window. can anyone help me?
Code:
def PlayProject(self):
wp = WindowProperties()
wp.setSize(960, 540)
wp.title = self.CurrentProjectEditor.ProjectName
# wp.setUndecorated(True) #Borderless
myMouseWatcher = MouseWatcher()
win2 = base.openWindow(props=wp, aspectRatio=16/9,name = "hi",keepCamera = True)
md = win2.makeDisplayRegion(0, 1, 0, 1)
base.mouseWatcher.getParent().attachNewNode(myMouseWatcher)
myMouseWatcher.setDisplayRegion(md)
render.setShaderAuto()
# myMouseWatcher.reparentTo(win2)
render2d = NodePath("render2d")
camera2d = base.makeCamera2d(win2)
camera2d.reparentTo(render2d)
also 3d world is the same as the main window. how can I fix it