【Python】你追我,如果你追到我......
打发无聊时间,能让人快速“平复”心情,使人“心情愉悦”```Python
# -*- coding:utf-8 -*-
import wx
from random import randint
import win32api
class Frame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title='你追我,如果你追到我......', size=(width, height),name='frame',style=541067264)
self.qdck = wx.Panel(self)
self.Centre()
self.qdck.Bind(wx.EVT_ENTER_WINDOW,self.qdck_in)
def qdck_in(self,event):
global x, y
move_x = randint(0, x)
move_y = randint(0, y)
self.MoveXY(move_x, move_y)
self.SetTitle('嘿 嘿 嘿')
class myApp(wx.App):
defOnInit(self):
self.frame = Frame()
self.frame.Show(True)
return True
width = 250
height = 100
x = win32api.GetSystemMetrics(0) - width
y = win32api.GetSystemMetrics(1) - height
if __name__ == '__main__':
app = myApp()
app.MainLoop()
```
http://img.173164.xyz/2021/04/22/e1018cbfc003b.gif 如果。。。嘿嘿嘿:lol{:1_918:} 电脑屏幕已经一拳打穿,请叫我一拳超人:lol 提神醒脑,调戏小朋友。 我居然点进来了 快乐平平无奇 呵呵呵呵呵呵,我是你永远追不到的目标 平复心情??反话吧 来看下; 这是做的小游戏;谢谢分享 引号可太传神了
页:
[1]