--- a/source/main.py +++ b/source/main.py @@ -1,5 +1,4 @@ import pyxel -import webbrowser from device_checker import DeviceChecker from js import window @@ -254,7 +253,7 @@ WIDTH = 120 HEIGHT = 176 def __init__(self): - pyxel.init(self.WIDTH, self.HEIGHT, title="GO FROG") + pyxel.init(self.WIDTH, self.HEIGHT, title="GO FROG", quit_key=pyxel.KEY_NONE) self.deviceChecker = DeviceChecker() pyxel.load("asset.pyxres") @@ -375,12 +374,6 @@ def __update_play(self): if self.game_over: - if pyxel.btnp(pyxel.MOUSE_BUTTON_LEFT) and (pyxel.width / 2 - 8 <= pyxel.mouse_x <= pyxel.width / 2 - 8 + 16) and (102 <= pyxel.mouse_y <= 102+16): - link = f"https://twitter.com/intent/tweet?text=pyxel%E8%A3%BD%E3%82%B2%E3%83%BC%E3%83%A0%E3%80%8CGO%20FROG%E3%80%8D%E3%82%92%E3%83%97%E3%83%AC%E3%82%A4%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%0A%E3%82%B9%E3%82%B3%E3%82%A2%E3%81%AF{int(self.traveled_distance / 10)}%E7%82%B9%EF%BC%81%0A%E2%86%93%E3%83%AA%E3%83%B3%E3%82%AF%E5%85%88%E3%81%A7%E9%81%8A%E3%81%B9%E3%82%8B%E3%82%88%E3%80%82%0Ahttps%3A%2F%2Fokapping.github.io%2FGO_FROG%2F%0A%0A%E5%88%B6%E4%BD%9C%E8%80%85%20%3A%20%40app_okapping%0A%23GO_FROG%20%23pyxel%20%23python%20" - webbrowser.open(link) - self.play_se_1() - return - if self.game_over_count > 15: if self.deviceChecker.is_pc(): if pyxel.btnp(pyxel.KEY_RETURN): @@ -558,9 +551,6 @@ pyxel.text(pyxel.width / 2 - (len(msg) * pyxel.FONT_WIDTH // 2), 80, msg, 1) pyxel.line(pyxel.width / 2 - (len(msg) * pyxel.FONT_WIDTH // 2), 86, pyxel.width / 2 - (len(msg) * pyxel.FONT_WIDTH // 2) + len(msg) * pyxel.FONT_WIDTH, 86, 1) - msg = "SHARE" - pyxel.text(pyxel.width / 2 - (len(msg) * pyxel.FONT_WIDTH // 2), 94, msg, 1) - pyxel.blt(pyxel.width / 2 - 8, 102, 0, 16, 48, 16, 16, 7) if self.show_how_to: