按照原版设定,不隐藏鼠标
This commit is contained in:
parent
66e2b9e47e
commit
764e9b7eef
@ -400,10 +400,11 @@ class Level(tool.State):
|
|||||||
self.showLittleMenu = True
|
self.showLittleMenu = True
|
||||||
elif self.checkShovelClick(mouse_pos):
|
elif self.checkShovelClick(mouse_pos):
|
||||||
self.drag_shovel = not self.drag_shovel
|
self.drag_shovel = not self.drag_shovel
|
||||||
if self.drag_shovel:
|
#if self.drag_shovel:
|
||||||
# 小铲子要隐藏鼠标
|
# 小铲子要隐藏鼠标
|
||||||
pg.mouse.set_visible(False)
|
#pg.mouse.set_visible(False) # 按照原版设定,不隐藏鼠标
|
||||||
else:
|
#else:
|
||||||
|
if not self.drag_shovel:
|
||||||
self.removeMouseImagePlus()
|
self.removeMouseImagePlus()
|
||||||
elif self.drag_shovel:
|
elif self.drag_shovel:
|
||||||
# 移出这地方的植物
|
# 移出这地方的植物
|
||||||
@ -567,13 +568,13 @@ class Level(tool.State):
|
|||||||
color = c.BLACK
|
color = c.BLACK
|
||||||
self.mouse_image = tool.get_image(frame_list[0], x, y, width, height, color, 1)
|
self.mouse_image = tool.get_image(frame_list[0], x, y, width, height, color, 1)
|
||||||
self.mouse_rect = self.mouse_image.get_rect()
|
self.mouse_rect = self.mouse_image.get_rect()
|
||||||
pg.mouse.set_visible(False)
|
#pg.mouse.set_visible(False) # 按照原版设定,不隐藏鼠标
|
||||||
self.drag_plant = True
|
self.drag_plant = True
|
||||||
self.plant_name = plant_name
|
self.plant_name = plant_name
|
||||||
self.select_plant = select_plant
|
self.select_plant = select_plant
|
||||||
|
|
||||||
def removeMouseImage(self):
|
def removeMouseImage(self):
|
||||||
pg.mouse.set_visible(True)
|
#pg.mouse.set_visible(True) # 按照原版设定,不隐藏鼠标
|
||||||
self.drag_plant = False
|
self.drag_plant = False
|
||||||
self.mouse_image = None
|
self.mouse_image = None
|
||||||
self.hint_image = None
|
self.hint_image = None
|
||||||
@ -581,7 +582,7 @@ class Level(tool.State):
|
|||||||
|
|
||||||
# 移除小铲子
|
# 移除小铲子
|
||||||
def removeMouseImagePlus(self):
|
def removeMouseImagePlus(self):
|
||||||
pg.mouse.set_visible(True)
|
#pg.mouse.set_visible(True) # 按照原版设定,不隐藏鼠标
|
||||||
self.drag_shovel = False
|
self.drag_shovel = False
|
||||||
self.shovel_rect.x = self.shovel_positon[0]
|
self.shovel_rect.x = self.shovel_positon[0]
|
||||||
self.shovel_rect.y = self.shovel_positon[1]
|
self.shovel_rect.y = self.shovel_positon[1]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user