def draw(self): pyxel.cls(0) self.drawStar() pyxel.pal() x1 = 72 x2 = MENU_VALUE_X Drawing.showTextHCenter(8, "OPTION") y = 50 gcommon.setMenuColor(OPTIONMENU_BGM_VOL, self.menuPos) Drawing.showText(x1, y, "BGM VOLUME") Drawing.showText(x2, y, str(Settings.bgmVolume).rjust(2)) if OPTIONMENU_BGM_VOL == self.menuPos: #gcommon.drawUpDownMarker(x2 -10, y) Drawing.drawUpDownMarker2(x2 -10, y, 0, 10, Settings.bgmVolume) y += 20 gcommon.setMenuColor(OPTIONMENU_SOUND_VOL, self.menuPos) Drawing.showText(x1, y, "SE VOLUME") se = "ON " if Settings.soundVolume > 0 else "OFF" Drawing.showText(x2, y, se) if OPTIONMENU_SOUND_VOL == self.menuPos: leftMarker = (Settings.soundVolume > 0) Drawing.drawLeftMarker(x2 -10, y, leftMarker) Drawing.drawRightMarker(x2 +len(se)*8 + 2, y, not leftMarker) y += 20 gcommon.setMenuColor(OPTIONMENU_MOUSE_ENABLED, self.menuPos) Drawing.showText(x1, y, "MOUSE") mouseOnOff = "ON " if Settings.mouseEnabled else "OFF" Drawing.showText(x2, y, mouseOnOff) if OPTIONMENU_MOUSE_ENABLED == self.menuPos: leftMarker = (Settings.mouseEnabled == True) Drawing.drawLeftMarker(x2 -10, y, leftMarker) Drawing.drawRightMarker(x2 +len(se)*8 + 2, y, not leftMarker) y += 20 gcommon.setMenuColor(OPTIONMENU_SCORE_RANKIG, self.menuPos) Drawing.showTextHCenter(y, "SCORE RANKING") y += 20 gcommon.setMenuColor(OPTIONMENU_EXIT, self.menuPos) Drawing.showTextHCenter(y, "EXIT") Drawing.setBrightness1() pyxel.blt(32, 48 + self.menuPos * 20, 4, 32, 48 + self.menuPos * 20, 192, 12) pyxel.pal() if self.mouseManager.visible: self.mouseManager.drawMenuCursor()
def draw(self): pyxel.cls(0) self.drawStar() Drawing.showTextHCenter(32, "BOSS RUSH START") x1 = 48 x2 = MENU_VALUE_X x3 = START_X idx = 0 self.setOptionColor(MENU_PLAYER_STOCK) Drawing.showText(x1, self.menuYList[MENU_PLAYER_STOCK], "PLAYER STOCK") Drawing.showText(x2, self.menuYList[MENU_PLAYER_STOCK], str(Settings.playerStock).rjust(2)) if MENU_PLAYER_STOCK == self.menuPos: Drawing.drawUpDownMarker2(x2 -10, self.menuYList[idx], 1, 99, Settings.playerStock) idx += 1 self.setOptionColor(MENU_WEAPON_TYPE) Drawing.showText(x1, self.menuYList[MENU_WEAPON_TYPE], "WEAPON") if Settings.weaponType == gcommon.WeaponType.TYPE_A: Drawing.showText(x2, self.menuYList[MENU_WEAPON_TYPE], "TYPE A") else: Drawing.showText(x2, self.menuYList[MENU_WEAPON_TYPE], "TYPE B") if MENU_WEAPON_TYPE == self.menuPos: typeA = (Settings.weaponType == gcommon.WeaponType.TYPE_A) Drawing.drawLeftMarker(x2 -10, self.menuYList[MENU_WEAPON_TYPE], not typeA) Drawing.drawRightMarker(x2 +6*8 +2, self.menuYList[MENU_WEAPON_TYPE], typeA) if Settings.weaponType == gcommon.WeaponType.TYPE_B: self.setOptionColor(MENU_WEAPON_OPTION) Drawing.showText(x1, self.menuYList[MENU_WEAPON_OPTION], " MULTIPLE") Drawing.showText(x2, self.menuYList[MENU_WEAPON_OPTION], str(Settings.multipleCount).rjust(2)) if MENU_WEAPON_OPTION == self.menuPos: Drawing.drawUpDownMarker2(x2 -10, self.menuYList[MENU_WEAPON_OPTION], 0, 99, Settings.multipleCount) # idx += 1 # self.setOptionColor(MENU_START_STAGE) # Drawing.showText(x1, self.menuYList[MENU_START_STAGE], "START STAGE") # Drawing.showText(x2, self.menuYList[MENU_START_STAGE], gcommon.stageList[self.stageIndex]) # if MENU_START_STAGE == self.menuPos: # Drawing.drawUpDownMarker2(x2 -10, self.menuYList[MENU_START_STAGE], 0, len(gcommon.stageList)-1, self.stageIndex) idx += 1 text = "START" if self.state == 0: if self.state == 0 and self.menuPos == MENU_GAME_START and self.cnt & 16 == 0: pyxel.pal(7, 8) pyxel.pal(5, 4) else: self.setOptionColor(MENU_GAME_START) Drawing.showTextHCenter(self.menuYList[MENU_GAME_START], text) else: if self.cnt & 2 == 0: pyxel.pal(7, 8) pyxel.pal(5, 4) Drawing.showTextHCenter(self.menuYList[MENU_GAME_START], text) pyxel.pal() idx += 1 # if self.state == 0: # self.setOptionColor(MENU_GAME_START) # Drawing.showTextHCenter(self.menuYList[3], "GAME START") # else: # if self.cnt & 2 == 0: # pyxel.pal(7, 8) # Drawing.showTextHCenter(self.menuYList[3], "GAME START") # if self.cnt & 2 == 0: # pyxel.pal() self.setOptionColor(MENU_EXIT) Drawing.showTextHCenter(self.menuYList[MENU_EXIT], "EXIT") Drawing.setBrightness1() y = self.menuYList[self.menuPos] -2 pyxel.blt(16, y, 4, 16, y, 224, 12) pyxel.pal() if self.mouseManager.visible: self.mouseManager.drawMenuCursor()