def render_main(self): person = (self._person, models.Character) with Group("player", "全局", self._global): ModelInput("money.money", "金钱") with Group("player", "角色", person): Choice("角色", tuple("play%d" % i for i in range(1, 5)), self.weak.on_person_change) ModelInput("health") ModelInput("health_max") ModelCoordWidget("coord", labels=('X坐标', 'Z坐标', 'Y坐标'), savable=True) ModelCheckBox("invincible") self.lazy_group( Group("person_items", "角色物品", person, serializable=False, cols=4), self.render_person_items) self.lazy_group( Group("saved_items", "整理界面物品", self._saved_items, serializable=False, cols=6), self.render_saved_items) # self.lazy_group(StaticGroup("物品箱/宝物箱"), self.render_inventory_treasure_items) self.lazy_group(StaticGroup("代码插入"), self.render_assembly_functions)
def render_main(self): with Group("global", "全局", self._global): ModelInput("money", "金钱") ModelInput("exp", "驾驶员经验") with Group("player", "我方角色", self.person, cols=4): Choice("角色", datasets.PARTNERS, self.on_person_change) ModelInput("ability", "机体类型(海陆空)及变身能力") ModelInput("spiritual_type", "精神类型") ModelSelect("robot", "机体图", choices=datasets.ROBOTS) ModelInput("map_y", "地图X坐标") ModelInput("map_x", "地图Y坐标") ModelInput("map_avatar", "地图头像") ModelSelect("weapon_1", "上武器", choices=datasets.WEAPONS) ModelSelect("weapon_2", "下武器", choices=datasets.WEAPONS) ModelInput("mobile", "机动") ModelInput("strength", "强度") ModelInput("defense", "防卫") ModelInput("speed", "速度") ModelInput("hp", "HP") ModelInput("hpmax", "HP上限") ModelInput("move", "行动次数") ModelInput("spiritual", "精神") ModelInput("spiritual_max", "精神上限") self.lazy_group(Group("items", "道具", None), self.render_items) # self.lazy_group(Group("weapons", "武器", self.weapon), self.render_weapons) # with Group("enemy", "敌人", None, cols=4): # for addr, name in models.ENEMY_ATTRS: # Input(name, None, addr, size=1) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h")
def render_main(self): with Group("global", "全局", self._global): ModelInput("turn").set_help('0~1,下面会一直累加(慎用)') ModelInput("minutes") ModelInput("seconds_1") ModelInput("seconds_0") ModelInput("our_points") ModelInput("enemy_points") ModelInput("basketry_left_top") ModelInput("basketry_left_middle") ModelInput("basketry_left_bottom") ModelInput("basketry_right_top") ModelInput("basketry_right_middle") ModelInput("basketry_right_bottom") ModelInput("ball_owner").set_help('球在人手里(0~3),地上或空中(6)') with Group("player", "我方角色", self.person) as group: Choice("角色", ("1P", "2P", "3P", "4P"), self.on_person_change) # ModelInput("jump") # ModelInput("power") ModelInput("character").set_help('0~3') with ModelSelect.choices_cache: ModelSelect("equip_1", instance=self.equip_holder, choices=datasets.ITEMS) ModelSelect("equip_2", instance=self.equip_holder, choices=datasets.ITEMS) ModelSelect("equip_3", instance=self.equip_holder, choices=datasets.ITEMS) with StaticGroup("快捷键"): ui.Text("B: 获得球") ui.Text("N: 左边耐久置0") ui.Text("M: 球筐耐久恢复")
def render_main(self): with Group("global", "全局", self._global): ModelInput("growth_points", "成长点数") ModelInput("money_1p", "1p金钱") ModelInput("money_2p", "2p金钱") with Group("player", "我方角色", self.person, cols=4) as group: Choice("角色", ("1P", "2P"), self.on_person_change) for addr, name in models.PERSON_ATTRS: ModelInput(name) with group.footer: dialog_style = {'width': 1200, 'height': 900} with DialogGroup("items", "道具", self.itemholder, cols=4, dialog_style=dialog_style) as dialog_group: indexs = (0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15) with ModelSelect.choices_cache: for i in indexs: ModelSelect("items.%d" % i, "道具%02d" % (i + 1), choices=datasets.ITEMS) with DialogGroup("skills", "技能", self.skillholder, dialog_style=dialog_style): values = [1 << i for i in range(7, -1, -1)] for i, labels in enumerate(datasets.SKILL_ITEMS): ModelFlagWidget("have_%s" % (i + 1), "拥有", labels=labels, values=values, checkbtn=True, cols=4) ModelFlagWidget("active_%s" % (i + 1), "激活", labels=labels, values=values, checkbtn=True, cols=4) with Group("enemy", "敌人", None, cols=4) as group: for addr, name in models.ENEMY_ATTRS: Input(name, None, addr, size=1) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h")
def render_main(self): person = self.person chariot = self.chariot with Group("global", "全局", self._global): ModelInput("money", "金钱") ModelInput("battlein", "遇敌率") ModelCheckBox("battlein", "不遇敌", enable=0xFF, disable=0) with Group("player", "角色", person, cols=4): Choice("角色", datasets.PERSONS, self.on_person_change) ModelInput("level", "等级") ModelInput("hpmax", "HP上限") ModelInput("hp", "HP") ModelInput("atk", "攻击") ModelInput("defense", "守备") ModelInput("strength", "强度") ModelInput("intelli", "智力") ModelInput("stamina", "体力") ModelInput("speed", "速度") ModelInput("battle", "战斗") ModelInput("drive", "驾驶") ModelInput("fix", "修理") ModelInput("exp", "经验") self.lazy_group(Group("human_items", "角色装备/物品", person, cols=4), self.render_human_items) self.lazy_group(Group("chariot", "战车", chariot, cols=4), self.render_chariot) self.lazy_group(Group("chariot_items", "战车装备/物品", chariot, cols=4), self.render_chariot_items) with StaticGroup("快捷键"): ui.Text("左移: alt+left\n" "右移: alt+right\n" "上移: alt+up\n" "下移: alt+right\n" "恢复HP: alt+h")
def render_enemy(self): datasets = self.datasets Choice("敌人", tuple("敌人%d" % i for i in range(1, 11)), self.on_enemy_change) ModelSelect("race", choices=datasets.MONSTERS) ModelInput("level") ModelInput("hp") ModelInput("atk") ModelInput("defense") ModelInput("hit") ModelInput("avoid") ModelInput("speed") for i, label in enumerate("物火光电音气冷"): ModelInput("resistance.%d" % i, "%s抗性" % label, spin=True, min=-100, max=100).set_help( "○<=-50, -50<●<=-20, 20<空<30, 30<=△<80, 80<=×") with ModelSelect.choices_cache: for i in range(4): ModelSelect("enemy_case.%d.race" % i, "种类%d" % (i + 1), instance=self._global, choices=datasets.MONSTERS) ModelInput("enemy_case.%d.count" % i, "数量", instance=self._global)
def render_chariot(self): Choice("战车", datasets.CHARIOTS, self.on_chariot_change) ModelInput("sp", "装甲片") ModelInput("main_bullets_count", "主炮炮弹") ModelInput("se_bullets_count", "S-E炮弹") ModelInput("bullet", "弹仓容量") ModelInput("defense", "守备力") ModelInput("weight", "底盘重量")
def render_robot(self): Choice("机体", datasets.ROBOT_CHOICES, self.on_robot_change) ModelInput("hp") ModelInput("en") ModelSelect("body", choices=datasets.ROBOTS) ModelSelect("pilot", choices=datasets.ROBOT_CHARACTERS) ModelArrayInput("body_remould") ModelArrayInput("ammo") ModelInput("weapon_remould")
def render_person(self): datasets = self.datasets Choice("角色", datasets.PERSONS, self.on_person_change) ModelSelect("figure", choices=datasets.FIGURES) ModelInput("level") ModelInput("exp") ModelInput("hp") ModelInput("hpmax") ModelInput("battle_level") ModelInput("drive_level") ModelInput("power") ModelInput("strength") ModelInput("speed") ModelInput("spirit") ModelInput("scar") ModelInput("level_max") with ModelSelect.choices_cache: ModelSelect("weapon_1", choices=datasets.EQUIP_WEAPON.choices, values=datasets.EQUIP_WEAPON.values) ModelSelect("weapon_2", choices=datasets.EQUIP_WEAPON.choices, values=datasets.EQUIP_WEAPON.values) ModelSelect("weapon_3", choices=datasets.EQUIP_WEAPON.choices, values=datasets.EQUIP_WEAPON.values) ModelSelect("equip_head", choices=datasets.EQUIP_HEAD.choices, values=datasets.EQUIP_HEAD.values) ModelSelect("equip_body", choices=datasets.EQUIP_BODY.choices, values=datasets.EQUIP_BODY.values) ModelSelect("equip_hand", choices=datasets.EQUIP_HAND.choices, values=datasets.EQUIP_HAND.values) ModelSelect("equip_foot", choices=datasets.EQUIP_FOOT.choices, values=datasets.EQUIP_FOOT.values) ModelSelect("equip_orn", choices=datasets.EQUIP_ORN.choices, values=datasets.EQUIP_ORN.values) ModelInput("atk1") ModelInput("atk2") ModelInput("atk3") ModelInput("defense") for i, label in enumerate("火光电声气冰"): ModelInput("resistance.%d" % i, "%s抗性" % label, spin=True, max=100) ModelSelect("prof", choices=datasets.PROFS) if self.person.field("subprof"): ModelSelect("subprof", choices=datasets.SUBPROFS)
def render_chariot(self): datasets = self.datasets Choice("战车", datasets.CHARIOTS, self.on_chariot_change) ModelInput("sp") ModelSelect("chassis.equip", "底盘", choices=datasets.CHARIOT_CHASSIS.choices, values=datasets.CHARIOT_CHASSIS.values) ModelInput("chassis.defense", "底盘防御") ModelInput("chassis.attr1", "荷台").set_help('道具容量,最大18个') ModelInput("chassis.attr2", "弹舱") ModelSelect("chassis.change", "双持类型", choices=datasets.DOUBLE_TYPE) ModelInput("chassis.weight", "底盘重量")
def render_person(self): Choice("角色", datasets.PERSONS, self.on_person_change) ModelInput("hp_max") ModelInput("resist") ModelInput("str") ModelInput("mgc") ModelInput("agl") ModelInput("vit") ModelInput("hp_heal") ModelArrayInput("resistance", label=["%s抗性" % item for item in datasets.ATTRIBUTE]) ModelFlagWidget("adaptive", cols=3, labels=datasets.ATTRIBUTE) with Group.active_group().footer: ui.Button("全技能", onclick=self.weak.all_skills)
def render_player(self): Choice("角色", datasets.PERSONS, self.on_person_change) ModelInput("level") ModelInput("hp") ModelInput("hpmax") ModelInput("atk") ModelInput("defense") ModelInput("power") ModelInput("intelli") ModelInput("stamina") ModelInput("speed") ModelInput("battle") ModelInput("drive") ModelInput("fix") ModelInput("exp")
def render_person(self): Choice("角色", self.datasets.PERSONS, self.on_person_change) ModelInput("addr_hex", "地址", readonly=True) ModelInput("level", "等级") ModelInput("exp", "经验") ModelInput("hp", "HP") ModelInput("hpmax", "HP上限") ModelInput("ep", "EP") ModelInput("epmax", "EP上限") ModelInput("atk", "攻击") ModelInput("defense", "防御") ModelInput("speed", "速度") ModelInput("lucky", "好运") for tlabel, tname in self.datasets.ELEMENT_TYPES: ModelInput("%s_power" % tname, "%s力量" % tlabel) ModelInput("%s_defense" % tname, "%s抗性" % tlabel)
def render_pilot(self): Choice("角色", datasets.ROBOT_CHARACTERS, self.on_pilot_change) ModelSelect("pilot", choices=datasets.PILOT_CHARACTERS) ModelInput("exp") ModelInput("sp") ModelInput("killed") ui.Hr() ui.Hr() ModelFlagWidget("skill_1", labels=datasets.SKILLS_1, cols=2) ModelFlagWidget("skill_2", labels=datasets.SKILLS_2, cols=2) ModelCheckBox("skill_1_status") ModelCheckBox("skill_2_status") ModelInput("help_atk") ModelInput("help_def") ModelInput("energy") ModelInput("points") ModelArrayInput("develop") ModelArraySelect("skill_chip", choices=datasets.SHILL_CHIPS)
def render_main(self): person = (self._person, models.Character) with Group("player", "全局", self._global): ModelInput("skill_points", instance=(self._skill_points, models.SkillPoints)) with Group("player", "角色", person): self.char_choice = Choice("角色", datasets.PERSONS, self.weak.on_person_change) ModelInput("health") ModelInput("health_max") ModelInput("stamina") ModelInput("stamina_max") ModelInput("moving_speed") ModelInput("rapid_fire") ModelInput("is_wet") ModelCoordWidget("coord", labels=('X坐标', 'Z坐标', 'Y坐标'), savable=True) ModelCheckBox("invincible") self.lazy_group(Group("person_items", "角色物品", person, serializable=False, cols=4), self.render_person_items) self.lazy_group(Group("person_skills", "角色技能", self._global, cols=4), self.render_person_skills) self.lazy_group(StaticGroup("代码插入"), self.render_assembly_functions) self.lazy_group(StaticGroup("功能"), self.render_functions)
def render_iteminfos(self): datasets = self.datasets Choice("物品", datasets.ITEMS, self.on_item_change) Label("复制属性") with ui.Horizontal(className="fill"): self.copy_iteminfo_view = ui.Choice(className="fill", choices=datasets.ITEMS) ui.Button("复制", onclick=self.copy_iteminfo) ModelInput("addr_hex", "地址", readonly=True) ModelInput("name_ptr", "名称指针", hex=True) ModelInput("desc_ptr", "介绍文本", hex=True) ModelInput("icon", "图标序号") ModelSelect("type", "类型", choices=datasets.WEAPONTYPES) ModelInput("level", "要求熟练度", hex=True, size=1).set_help(datasets.PROFICIENCY_HINT) ModelInput("power", "威力") ModelInput("hit", "命中") ModelInput("kill", "必杀") ModelInput("weight", "重量") ModelInput("range_min", "最小射程") ModelInput("range_max", "最大射程") ModelInput("move_add", "移动+") ModelInput("hp_add", "HP+") ModelInput("power_add", "力量+") ModelInput("magic_add", "魔力+") ModelInput("skill_add", "技巧+") ModelInput("speed_add", "速度+") ModelInput("lucky_add", "幸运+") ModelInput("defense_add", "防御+") ModelInput("magicdef_add", "魔防+") i = 0 for item in datasets.ITEM_ATTRS: hint, labels = item i += 1 ModelFlagWidget("attr%d" % i, hint or "属性%d" % i, labels=labels)
def render_chariot(self): Choice("战车", datasets.CHARIOTS, self.on_chariot_change) ModelInput("sp") ModelInput("bullet") ModelInput("defense") ModelInput("weight")