def render_player(self): ModelInput("hp", "生命") ModelInput("ap", "防弹衣") self.coord_view = ModelCoordWidget("coord", "坐标", savable=True, preset=coords) # ModelInput("gravity", "重量") ModelCoordWidget("speed", "速度") ModelInput("rotation", "旋转") ModelInput("wanted_level", "通缉等级") self.money = ModelInput("money", "金钱") ui.Text("") with ui.GridLayout(cols=4, vgap=10, className="expand"): ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord) ui.Button(label="从标记点读取坐标", onclick=self.player_coord_from_waypoint) ui.ToggleButton(label="切换无伤状态", onchange=self.set_ped_invincible) ui.ToggleButton(label="可以切换武器", onchange=self.set_ped_block_switch_weapons) ui.ToggleButton( label="不会被拽出车", onchange=self.set_ped_can_be_dragged_out_of_vehicle) ui.ToggleButton(label="摩托车老司机", onchange=self.set_ped_keep_bike) ui.ToggleButton(label="不被通缉", onchange=self.set_never_wanted)
def render_func(self): with ui.GridLayout(cols=4, vgap=10, className="expand"): self.render_common_button() ui.Button("附近的人缴械", onclick=self.near_peds_remove_weapon) ui.Button("附近的人着火", onclick=self.near_peds_make_fire) ui.Button("附近的人爆炸", onclick=self.near_peds_explode) ui.Button("敌人着火", onclick=self.enemys_make_fire) ui.Button("敌人爆头", onclick=self.enemys_explode_head) ui.Button("敌人爆炸", onclick=self.enemys_explode) ui.Button("敌人缴械", onclick=self.enemys_remove_weapon) ui.Button("敌人定住", onclick=self.enemys_freeze_position) ui.Button("警车爆炸", onclick=self.police_car_explode) ui.Button("警察和直升机爆炸", onclick=self.police_and_helicopter_explode) ui.Button("保存菜单", onclick=self.activate_save_menu) ui.Button("停止计时", onclick=self.freeze_timer) ui.Button("恢复计时", onclick=partial(self.freeze_timer, freeze=False)) ui.Button("附近的人吹飞", onclick=self.near_peds_go_away) ui.Button("附近的车吹飞", onclick=self.near_vehicles_go_away) # ui.Button("驾驶到到目的地", onclick=self.drive_to_destination) # ui.Button("驾驶到到标记点", onclick=self.drive_to_waypoint) ui.Button("停止自动驾驶", onclick=self.clear_driver_tasks) ui.Button("修复衣服", onclick=self.repair_cloth) ui.Button("清空区域内的载具", onclick=self.clear_area_of_vehicles) ui.Button("清空区域内的角色", onclick=self.clear_area_of_peds) ui.Button("清空区域内的警察", onclick=self.clear_area_of_cops) ui.Button("清空区域内的火焰", onclick=self.clear_area_of_fire) self.set_buttons_contextmenu()
def render_func(self): with ui.GridLayout(cols=4, vgap=10, className="expand"): self.render_common_button() ui.Button(label="洗衣服", onclick=self.clothes_rebuild) ui.Button("敌人爆炸", onclick=self.enemys_explode) ui.Button("附近的车大风车", onclick=self.near_vehicles_pinwheel) ui.Button("瞬移到目的地(红)", onclick=self.teleport_to_destination) ui.Button("瞬移到目的地(绿)", onclick=partial(self.teleport_to_destination, color=1)) ui.Button("瞬移到目的地(黄/蓝)", onclick=partial(self.teleport_to_destination, color=8)) self.set_buttons_contextmenu()
def render_assembly_functions(self, functions, cols=4, vgap=10): with ui.GridLayout(cols=cols, vgap=vgap, className="expand"): self.assembly_buttons = {} for item in functions: button = ui.ToggleButton( label=item.label, onchange=partial(__class__.toggle_assembly_function, self.weak, item=item)) if item.help: button.setToolTip(item.help) self.assembly_buttons[item.key] = button
def render_player(self): ModelInput("hp", "生命") ModelInput("ap", "防弹衣") ModelInput("rotation", "旋转") self.coord_view = ModelCoordWidget("coord", "坐标", savable=True, preset=coords) ModelCoordWidget("speed", "速度") ModelInput("weight", "重量") ModelInput("wanted_level", "通缉等级") ui.Hr() with ui.GridLayout(cols=5, vgap=10, className="expand"): ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord) ui.ToggleButton(label="切换无伤状态", onchange=self.set_ped_invincible)
def render_player(self): ModelInput("hp", "生命") self.maxhp_view = ModelInput("maxhp", "最大生命") ModelInput("ap", "防弹衣") ModelInput("rotation", "旋转") self.coord_view = ModelCoordWidget("coord", "坐标", savable=True, preset=coords) ModelCoordWidget("speed", "速度") ModelInput("weight", "重量") ProxyInput("wanted_level", "通缉等级", self.get_wanted_level, self.set_wanted_level) ui.Hr() with ui.Vertical(className="fill"): with ui.GridLayout(cols=5, vgap=10, className="expand"): ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord) ui.Button(label="从地图读取坐标", onclick=self.playerCoordFromMap) ui.ToggleButton(label="切换无伤状态", onchange=self.set_ped_invincible) ui.Text("防止主角受到来自以下的伤害") with ui.Horizontal(className="fill"): self.player_proof_views = [ ui.CheckBox("爆炸", className="vcenter", onchange=partial(self.set_player_proof, bitindex=Player.SPECIAL_EP)), ui.CheckBox("碰撞", className="vcenter", onchange=partial(self.set_player_proof, bitindex=Player.SPECIAL_DP)), ui.CheckBox("子弹", className="vcenter", onchange=partial(self.set_player_proof, bitindex=Player.SPECIAL_BP)), ui.CheckBox("火焰", className="vcenter", onchange=partial(self.set_player_proof, bitindex=Player.SPECIAL_FP)), ] ui.Button("全部", style=btn_md_style, onclick=self.player_proof_all) ui.Button("再次应用", style=btn_md_style, onclick=self.player_proof_apply).setToolTip( "死亡或者重新读档后需要再次应用")
def render_cheat(self): with ui.Vertical(className="fill padding"): with ui.GridLayout(cols=4, vgap=10, className="expand"): self.cheat_views = [ ui.CheckBox(label, onchange=partial(self.toggle_cheat, index=i)) for i, label in enumerate(('不被通缉', '决不会饿', '无限健康', '无限氧气', '无限弹药', '坦克模式', '超级攻击', '超级跳跃', '最大威望', '最大引力', '满街跑车', '满街破车', '无限奔跑', '主角防火', '完美操控', '交通通畅', '超级兔跳', '液压装置', '船可以飞', '车可以飞')) ] ui.CheckBox("冻结任务计时", onchange=self.freeze_timer) ui.CheckBox("一击必杀", onchange=self.one_hit_kill) with ui.Horizontal(className="padding"): ui.Button("同步", onclick=self.cheat_sync)
def render_cheat(self): with ui.Vertical(className="fill padding"): with ui.GridLayout(cols=4, vgap=10, className="expand"): SimpleCheckBox("infinite_run", "无限奔跑", 0x536F25, (), b'\xEB', b'\x75') SimpleCheckBox("drive_on_water", "水上开车", 0x593908, (), b'\x90\x90', b'\x74\x07') SimpleCheckBox("no_falling_off_the_bike", "摩托老司机", 0x61393D, (), b'\xE9\xBC\x0E\x00\x00\x90', b'\x0F\x84\xBB\x0E\x00\x90') SimpleCheckBox("disable_vehicle_explosions", "不会爆炸", 0x588A77, (), b'\x90\x90', b'\x75\x09') SimpleCheckBox("infinite_ammo1", "无限子弹1", 0x5D4ABE, (), b'\x90\x90\x90', b'\xFF\x4E\x08') SimpleCheckBox("infinite_ammo2", "无限子弹2", 0x5D4AF5, (), b'\x90\x90\x90', b'\xFF\x4E\x0C')
def render_vehicle(self): ModelInput("hp", "HP") ModelCoordWidget("roll", "滚动") ModelCoordWidget("dir", "方向") self.vehicle_coord_view = ModelCoordWidget("coord", "坐标", savable=True, preset=coords) ModelCoordWidget("speed", "速度") ModelInput("weight", "重量") ui.Hr() with ui.GridLayout(cols=5, vgap=10, className="expand"): ui.Button(label="人坐标->车坐标", onclick=self.from_player_coord) ui.ToggleButton(label="切换无伤状态", onchange=self.set_vehicle_invincible) ui.Button(label="锁车", onclick=self.vehicle_lock_door) ui.Button(label="开锁", onclick=partial(self.vehicle_lock_door, lock=False))
def render_functions(self, names, cols=4): """渲染功能按钮""" with ui.GridLayout(cols=cols, vgap=10, className="expand"): for name in names: func = getattr(self.weak, name) ui.Button(func.__doc__, onclick=func)
def render_func(self): with ui.GridLayout(cols=4, vgap=10, className="expand"): self.render_common_button() self.set_buttons_contextmenu()
def render_vehicle(self): vehicle = self.weak._vehicle ModelInput("hp", "HP") ModelCoordWidget("dir", "方向") self.vehicle_grad_view = ModelCoordWidget("grad", "旋转") self.vehicle_coord_view = ModelCoordWidget("coord", "坐标", savable=True, preset=coords) ModelCoordWidget("speed", "速度") ModelInput("weight", "重量") ui.Text("") with ui.Vertical(className="fill"): with ui.GridLayout(cols=5, vgap=10, className="expand"): ui.Button(label="人坐标->车坐标", onclick=self.from_player_coord) ui.Button(label="从地图读取坐标", onclick=self.vehicleCoordFromMap) ui.ToggleButton(label="切换无伤状态", onchange=self.set_vehicle_invincible) ui.Button(label="锁车", onclick=self.vehicle_lock_door) ui.Button(label="开锁", onclick=partial(self.vehicle_lock_door, lock=False)) ui.Hr() ui.Text("防止当前载具受到来自以下的伤害") with ui.Horizontal(className="fill"): self.vehicle_proof_views = [ ui.CheckBox("爆炸", className="vcenter", onchange=partial(self.set_vehicle_proof, bitindex=Vehicle.SPECIAL_EP)), ui.CheckBox("碰撞", className="vcenter", onchange=partial(self.set_vehicle_proof, bitindex=Vehicle.SPECIAL_DP)), ui.CheckBox("子弹", className="vcenter", onchange=partial(self.set_vehicle_proof, bitindex=Vehicle.SPECIAL_BP)), ui.CheckBox("火焰", className="vcenter", onchange=partial(self.set_vehicle_proof, bitindex=Vehicle.SPECIAL_FP)), ] ui.Button("全部", style=btn_md_style, onclick=self.vehicle_proof_all) ui.Button( "再次应用", style=btn_md_style, onclick=self.vehicle_proof_apply).setToolTip("切换载具后需要再次应用") ui.Text("颜色") with ui.Horizontal(className="fill"): self.vehicle_body_color_view = ColorWidget("body_color", "车身1", vehicle, "body_color", datasets.COLOR_LIST) self.vehicle_body2_color_view = ColorWidget( "body2_color", "车身2", vehicle, "body2_color", datasets.COLOR_LIST) self.vehicle_stripe_color_view = ColorWidget( "stripe_color", "条纹1", vehicle, "stripe_color", datasets.COLOR_LIST) self.vehicle_stripe2_color_view = ColorWidget( "stripe2_color", "条纹2", vehicle, "stripe2_color", datasets.COLOR_LIST)