def render(self,x,y): if hasattr(self.model,"get_item_stats"): mydest_k = pygame.Rect(x,y,self.width//2,self.height) mydest_v = pygame.Rect(x+self.width//2+16,y,self.width//2-16,self.height) for k,v in self.model.get_item_stats(): pbge.draw_text(self.font,"{}:".format(k),mydest_k,pbge.INFO_GREEN,justify=1) pbge.draw_text(self.font,v,mydest_v,pbge.INFO_HILIGHT,justify=-1)
def render( self ): if self.data <= self.trainer.camp.credits and self.trainer.skill in self.trainer.pc.statline: pbge.widgets.widget_border_on.render(self.get_rect()) pbge.draw_text(self.font,self.text,self.get_rect(),pbge.WHITE,self.justify) else: pbge.widgets.widget_border_off.render(self.get_rect()) pbge.draw_text(self.font,self.text,self.get_rect(),pbge.GREY,self.justify)
def render(self, x, y): mydest = pygame.Rect(x, y, self.width, self.height) if self.armor_gear: pbge.draw_text(self.font, "Armor: {}/{}".format(self.armor_gear.get_armor_rating(), self.armor_gear.get_armor_rating(False)), mydest, color=pbge.INFO_GREEN, justify=0) else: pbge.draw_text(self.font, "Armor: 0/0", mydest, color=pbge.INFO_GREEN, justify=0)
def __call__(self, menu_item): # Just print this weapon's stats in the provided window. myrect = self.get_rect() pbge.default_border.render(myrect) if hasattr(menu_item.value, 'desc'): pbge.draw_text(pbge.SMALLFONT, menu_item.value.desc, self.get_rect(), justify=-1, color=pbge.WHITE) else: pbge.draw_text(pbge.SMALLFONT, '???', self.get_rect(), justify=-1, color=pbge.WHITE)
def render(self): mydest = self.get_rect() if self is self.bp.active_item: color = pbge.INFO_HILIGHT else: color = pbge.INFO_GREEN pbge.draw_text(pbge.MEDIUMFONT,self.text,mydest,color=color) pbge.draw_text(pbge.ITALICFONT, self.item.scale.get_mass_string(self.item.mass), mydest, justify=1, color=color)
def render(self, flash): myrect = SHOP_PANEL_FRECT.get_rect() pbge.default_border.render(myrect) if self.portrait: self.portrait.render(myrect, 1) myrect.x += 100 myrect.w -= 100 pbge.draw_text(pbge.MEDIUMFONT, self.caption, myrect)
def pre(self): if pbge.my_state.view: pbge.my_state.view() pbge.default_border.render(self.FULL_RECT.get_rect()) pbge.draw_text(pbge.my_state.medium_font, self.prompt, self.TEXT_RECT.get_rect(), justify=0)
def _predraw(self): pbge.my_state.view() mydest = self.MENU_TITLE.get_rect() pbge.default_border.render(mydest) pbge.draw_text(pbge.MEDIUMFONT, "Choose character", mydest, color=pbge.INFO_HILIGHT, justify=0)
def render(self): mydest = self.INFO_AREA.get_rect() pbge.default_border.render(mydest) if self.shop.customer not in self.portraits: self.portraits[self.shop.customer] = self.shop.customer.get_portrait() self.portraits[self.shop.customer].render(mydest,1) mydest.x += 100 mydest.w -= 100 pbge.draw_text(pbge.MEDIUMFONT,"{} \n ${:,}".format(str(self.shop.customer),self.camp.credits),mydest,justify=0)
def render_desc(self, menu_item): # Just print this weapon's stats in the provided window. myrect = self.get_rect() pbge.default_border.render(myrect) pbge.draw_text(pbge.SMALLFONT, self.get_desc(menu_item.value.weapon), self.get_rect(), justify=-1, color=pbge.WHITE)
def render(self,x,y): mydest = pygame.Rect(x,y,40,50) self.am_sprite.render(mydest,0) textdest = pygame.Rect(mydest.x + 5, mydest.y + 10, 30, 16 ) pbge.draw_text(pbge.BIGFONT, str(self.model.calc_average_armor()), textdest, justify=0,color=pbge.INFO_HILIGHT) mydest.right = x+self.width self.am_sprite.render(mydest,1) textdest = pygame.Rect(mydest.x + 5, mydest.y + 10, 30, 16 ) pbge.draw_text(pbge.BIGFONT, str(self.model.calc_mobility()), textdest, justify=0,color=pbge.INFO_HILIGHT) self.module_display.render(x+self.width//2-30,y)
def render(self): mydest = self.get_rect().inflate(-8,-8) if self.pc is self.fhq.active_pc: widgets.widget_border_on.render(mydest) else: widgets.widget_border_off.render(mydest) self.avatar_pic.render(mydest,self.avatar_frame) mydest.x += 64 mydest.w -= 64 pbge.draw_text(pbge.MEDIUMFONT,self.pc.get_full_name(),mydest,color=pbge.WHITE)
def render(self, x, y): labelwidth = self.width // 2 valuex = self.width // 2 + 16 valuewidth = self.width // 2 - 16 for i,stat in enumerate(self.stats): labeldest = pygame.Rect(x, y + i * self.linesize, labelwidth, self.linesize) pbge.draw_text(self.font, '{}: '.format(stat), labeldest, justify = 1, color = self.color) value = str(self.stat_lookup(stat)) valuedest = pygame.Rect(x + valuex, y + i * self.linesize, valuewidth, self.linesize) pbge.draw_text(self.font, value, valuedest, justify = -1, color = self.color)
def render(self,x,y): mydest = pygame.Rect(x,y,40,50) self.am_sprite.render(mydest,0) textdest = pygame.Rect(mydest.x + 5, mydest.y + 10, 30, 16 ) pbge.draw_text(pbge.BIGFONT, str(self.model.calc_average_armor()), textdest, justify=0) mydest.right = x+self.width self.am_sprite.render(mydest,1) textdest = pygame.Rect(mydest.x + 5, mydest.y + 10, 30, 16 ) pbge.draw_text(pbge.BIGFONT, str(self.model.calc_mobility()), textdest, justify=0) self.module_display.render(x+self.width//2-30,y)
def render(self): pbge.my_state.view() pbge.default_border.render(self.title_zone.get_rect()) pbge.default_border.render(self.charsheet_zone.get_rect()) pbge.default_border.render(self.info_zone.get_rect()) pbge.default_border.render(self.menu_zone.get_rect()) if self.title: pbge.draw_text(pbge.BIGFONT,self.title,self.title_zone.get_rect(),pbge.WHITE,justify=0) if self.info: myrect = self.charsheet_zone.get_rect() self.info.render(myrect.x,myrect.y)
def render(self,x,y): mydest = pygame.Rect(x,y,self.width//2,self.height) for ps in self.WEAPON_STAT_NAMES: pbge.draw_text(self.font,'{}: '.format(ps),mydest,justify=1,color=pbge.INFO_GREEN) mydest.y += self.linesize if self.model: self._draw_stars(x+self.width//2+16, y, self.model.damage) self._draw_stars(x+self.width//2+16, y + self.linesize, self.model.accuracy) self._draw_stars(x+self.width//2+16, y + self.linesize * 2, self.model.penetration) mydest = pygame.Rect(x+self.width//2+16, y+ self.linesize * 3, self.width//2 - 16, self.linesize) pbge.draw_text(self.font,self.model.get_reach_str(),mydest,color=pbge.INFO_HILIGHT)
def render(self, x, y): mydest = pygame.Rect(x, y, self.width, self.height) pbge.draw_text(self.font, self.model.scale.get_mass_string(self.model.mass), mydest, color=pbge.INFO_GREEN) pbge.draw_text(self.font, '{} slots'.format(self.model.volume), mydest, justify=1, color=pbge.INFO_GREEN)
def render(self, x, y): self.image.render(pygame.Rect(x, y, 100, 100), 1) mydest = pygame.Rect(x + 110, y, self.width - 110, self.height) skillz = [ sk.name for sk in list(self.model.statline.keys()) if sk in stats.NONCOMBAT_SKILLS ] pbge.draw_text(pbge.MEDIUMFONT, 'Skills: {}'.format(', '.join(skillz or ["None"])), mydest, justify=-1, color=pbge.INFO_GREEN)
def render(self, flash=False): mydest = self.get_rect().inflate(-8, -8) if self.fhq.active_pc is self.pc: widgets.widget_border_on.render(mydest) else: widgets.widget_border_off.render(mydest) self.avatar_pic.render(mydest, self.avatar_frame) mydest.x += 64 mydest.w -= 64 pbge.draw_text(pbge.MEDIUMFONT, self.pc.get_full_name(), mydest, color=pbge.WHITE)
def render(self, x, y): self.bg.render(pygame.Rect(x, y, 136, 136), 0) pbge.my_state.screen.blit(self.image, pygame.Rect(x + 4, y + 4, 128, 128)) mydest = pygame.Rect(x + 140, y, self.width - 140, self.height) pbge.draw_text(pbge.MEDIUMFONT, "Mass: {:.1f} tons \n Armor: {} \n Mobility: {} \n Speed: {} \n Sensor Range: {} \n E-War Progs: {} {}".format(self.model.mass / 10000.0, self.model.calc_average_armor(), self.model.calc_mobility(), self.model.get_max_speed(), self.model.get_sensor_range(self.model.scale), self.model.get_ewar_rating(), self.additional_info), mydest, color=pbge.INFO_GREEN)
def adventure_desc(self, menu_item): item = menu_item.value if item: myrect = self.LEFT_COLUMN.get_rect() pbge.default_border.render(myrect) if item.ADVENTURE_MODULE_DATA.title_card: if item not in self.posters: self.posters[item] = pbge.image.Image( item.ADVENTURE_MODULE_DATA.title_card) self.posters[item].render((myrect.x, myrect.y)) if menu_item.desc: myrect = self.TEXT_AREA.get_rect() pbge.default_border.render(myrect) pbge.draw_text(pbge.MEDIUMFONT, menu_item.desc, myrect)
def render(self): mydest = self.INFO_AREA.get_rect() pbge.default_border.render(mydest) if self.shop.customer not in self.portraits: self.portraits[ self.shop.customer] = self.shop.customer.get_portrait() self.portraits[self.shop.customer].render(mydest, 1) mydest.x += 100 mydest.w -= 100 pbge.draw_text(pbge.MEDIUMFONT, "{} \n ${:,}".format(str(self.shop.customer), self.camp.credits), mydest, justify=0)
def render(self): pbge.my_state.view() pbge.default_border.render(self.title_zone.get_rect()) pbge.default_border.render(self.charsheet_zone.get_rect()) pbge.default_border.render(self.info_zone.get_rect()) pbge.default_border.render(self.menu_zone.get_rect()) if self.title: pbge.draw_text(pbge.BIGFONT, self.title, self.title_zone.get_rect(), pbge.WHITE, justify=0) if self.info: myrect = self.charsheet_zone.get_rect() self.info.render(myrect.x, myrect.y)
def render(self,draw_menu_rect=True): if my_state.view: my_state.view() self.bottom_sprite.tile(pygame.Rect(0,my_state.screen.get_height()//2+100,my_state.screen.get_width(),200)) if self.npc_sprite: self.npc_sprite.render(self.get_portrait_area()) if self.pilot_sprite: default_border.render(self.PILOT_AREA.get_rect()) self.pilot_sprite.render(self.PILOT_AREA.get_rect(),1) text_rect = self.TEXT_AREA.get_rect() default_border.render(text_rect) draw_text(my_state.medium_font,self.text,text_rect) if draw_menu_rect: default_border.render(self.MENU_AREA.get_rect())
def render(self): myrect = CUSTOMER_PANEL_FRECT.get_rect() pbge.default_border.render(myrect) customer = self.customer_manager.get_customer() if customer: if customer not in self._portraits: self._portraits[customer] = customer.get_portrait() self._portraits[customer].render(myrect, 1) myrect.x += 100 myrect.w -= 100 customertext = customer.name + '\n' else: customertext = '' pbge.draw_text(pbge.MEDIUMFONT, '{} ${:,}'.format(customertext, self.camp.credits), myrect)
def __call__(self, menuitem): mydest = self.SHOP_INFO_AREA.get_rect() pbge.default_border.render(mydest) if self.portrait: self.portrait.render(mydest, 1) mydest.x += 100 mydest.w -= 100 pbge.draw_text(pbge.MEDIUMFONT, self.caption, mydest) mydest = self.ITEM_INFO_AREA.get_rect() item = menuitem.value if item: myinfo = self.get_buy_info(item) if myinfo: myinfo.render(mydest.x, mydest.y) self.customer.render()
def __call__(self, menuitem): mydest = self.SHOP_INFO_AREA.get_rect() pbge.default_border.render(mydest) if self.portrait: self.portrait.render(mydest,1) mydest.x += 100 mydest.w -= 100 pbge.draw_text(pbge.MEDIUMFONT,self.caption,mydest) mydest = self.ITEM_INFO_AREA.get_rect() item = menuitem.value if item: myinfo = self.get_buy_info(item) if myinfo: myinfo.render(mydest.x, mydest.y) self.customer.render()
def __call__(self, menu_item): if menu_item.desc: if menu_item.desc[2]: mydest = self.THUMB_AREA.get_rect() pbge.my_state.screen.blit(menu_item.desc[2], mydest) myimage = self.myportraits[menu_item.desc] myimage.render(self.PORTRAIT_AREA.get_rect()) save_version = self._string_to_major_version(menu_item.desc[0]) if save_version < self.current_version: mydest = self.WARNING_AREA.get_rect() pbge.default_border.render(mydest.inflate(8, 8)) pbge.draw_text( pbge.MEDIUMFONT, "Warning: Save from {}.\nThis might cause problems in the current version, or it might not. Good luck!" .format(menu_item.desc[0]), mydest, justify=0)
def render(self,x,y): pbge.draw_text(pbge.SMALLFONT, str(self.model), pygame.Rect(x,y,self.width,self.height), justify=-1) if self.model: pbge.draw_text(pbge.SMALLFONT, 'H:{}'.format(self.model.current_health), pygame.Rect(x+83,y,35,self.height,justify=0)) pbge.draw_text(pbge.SMALLFONT, 'M:{}'.format(self.model.get_current_mental()), pygame.Rect(x+118,y,35,self.height,justify=0)) pbge.draw_text(pbge.SMALLFONT, 'S:{}'.format(self.model.get_current_stamina()), pygame.Rect(x+153,y,35,self.height,justify=0)) cp,mp = self.mover.get_current_and_max_power() if mp > 0: mydest = self.power_sprite.get_rect(0) mydest.midright = (x + self.width, y + self.height//2) self.power_sprite.render(mydest,10-max(cp*10//mp,1))
def render(self,x,y): pbge.draw_text(pbge.SMALLFONT, str(self.model), pygame.Rect(x,y,self.width,self.height), justify=-1) if self.model: pbge.draw_text(pbge.SMALLFONT, 'H:{}'.format(self.model.current_health), pygame.Rect(x+83,y,35,self.height,justify=0), color=pbge.INFO_GREEN) pbge.draw_text(pbge.SMALLFONT, 'M:{}'.format(self.model.get_current_mental()), pygame.Rect(x+118,y,35,self.height,justify=0), color=pbge.INFO_GREEN) pbge.draw_text(pbge.SMALLFONT, 'S:{}'.format(self.model.get_current_stamina()), pygame.Rect(x+153,y,35,self.height,justify=0), color=pbge.INFO_GREEN) cp,mp = self.mover.get_current_and_max_power() if mp > 0: mydest = self.power_sprite.get_rect(0) mydest.midright = (x + self.width, y + self.height//2) self.power_sprite.render(mydest,10-max(cp*10//mp,1))
def render(self,x,y): mydest = pygame.Rect(x,y,self.width,self.height) max_w = 0 for ps in stats.PRIMARY_STATS: mytext = '{}: '.format(ps.name) pbge.draw_text(self.font,mytext,mydest,color=pbge.INFO_GREEN) max_w = max(max_w,self.font.size(mytext)[0]) mydest.y += self.font.get_linesize() if self.model: mydest = pygame.Rect(x+max_w, y, 36, self.height) rankdest = pygame.Rect(x+max_w+36, y, self.width - max_w - 36, self.height) has_statline = hasattr(self.model, 'statline') for ps in stats.PRIMARY_STATS: statval = self.model.get_stat(ps) statstr = str(statval) if has_statline: basestat = self.model.statline.get(ps, 0) if statval > basestat: statstr += ' +' elif statval < basestat: statstr += ' -' pbge.draw_text(self.font, statstr, mydest, color=pbge.INFO_HILIGHT) mydest.y += self.font.get_linesize() pbge.draw_text(self.font, self.STAT_RANKS[max(min((statval-2)//2,len(self.STAT_RANKS)-1),0)], rankdest, color=pbge.INFO_GREEN ) rankdest.y = mydest.y
def render(self, x, y): pbge.draw_text(pbge.my_state.huge_font, '{}%'.format(int(self.odds * 100)), pygame.Rect(x, y, 75, 32), justify=0, color=pbge.INFO_HILIGHT) pbge.draw_text(pbge.my_state.big_font, 'TO HIT', pygame.Rect(x, y + pbge.my_state.huge_font.get_linesize(), 75, 32), justify=0, color=pbge.INFO_HILIGHT) t = 0 for mymod in self.modifiers: pbge.draw_text(pbge.my_state.small_font, '{:+d}: {}'.format(int(mymod[0]), mymod[1]), pygame.Rect(x + 77, y + t * pbge.SMALLFONT.get_linesize(), self.width - 77, 32), justify=-1, color=pbge.INFO_GREEN) t += 1 if t > 2: break
def render(self,draw_menu_rect=True): if my_state.view: my_state.view() self.bottom_sprite.tile(pygame.Rect(0,my_state.screen.get_height()//2+100,my_state.screen.get_width(),200)) if self.npc_sprite: self.npc_sprite.render(self.get_portrait_area()) if self.pilot_sprite: default_border.render(self.PILOT_AREA.get_rect()) self.pilot_sprite.render(self.PILOT_AREA.get_rect(),1) text_rect = self.TEXT_AREA.get_rect() default_border.render(text_rect) draw_text(my_state.medium_font,self.text,text_rect) if draw_menu_rect: default_border.render(self.MENU_AREA.get_rect()) name_rect = self.NAME_AREA.get_rect() default_border.render(name_rect) draw_text(my_state.big_font,str(self.npc),name_rect,color=pbge.WHITE,justify=0) name_rect.y += my_state.big_font.get_linesize() draw_text(my_state.small_font,self.npc_desc,name_rect,color=pbge.GREY,justify=0) if self.pc: react_level = ( self.npc.get_reaction_score(self.pc,self.camp) + 99 )//40 self.react_sprite.render(self.REACT_AREA.get_rect(),react_level)
def render(self, x, y): mydest = pygame.Rect(x, y, self.width, self.height) max_w = 0 for ps in stats.PRIMARY_STATS: mytext = '{}: '.format(ps.name) pbge.draw_text(self.font, mytext, mydest, color=pbge.INFO_GREEN) max_w = max(max_w, self.font.size(mytext)[0]) mydest.y += self.font.get_linesize() if self.model: mydest = pygame.Rect(x + max_w, y, 20, self.height) rankdest = pygame.Rect(x + max_w + 30, y, self.width - max_w - 30, self.height) for ps in stats.PRIMARY_STATS: statval = self.model.get_stat(ps) pbge.draw_text(self.font, str(statval), mydest, color=pbge.INFO_HILIGHT) mydest.y += self.font.get_linesize() pbge.draw_text(self.font, self.STAT_RANKS[max( min((statval - 2) // 2, len(self.STAT_RANKS) - 1), 0)], rankdest, color=pbge.INFO_GREEN) rankdest.y = mydest.y
def render(self, x, y): pbge.draw_text(pbge.SMALLFONT, str(self.model), pygame.Rect(x, y, self.width, self.height), justify=-1) if self.model: field_width = (self.width - 130) // 3 text_width = max(pbge.SMALLFONT.size(a)[0] for a in ("H:", "M:", "S:")) mydest = pygame.Rect(x + 83, y, field_width, self.height) pbge.draw_text(pbge.SMALLFONT, 'H:', mydest, justify=-1, color=pbge.INFO_GREEN) maxi = self.model.max_health mini = self.model.current_health dark_rect = mydest.copy() dark_rect.x += text_width dark_rect.w -= text_width pbge.my_state.screen.fill(self.DARK_HEALTH, dark_rect) bright_rect = dark_rect.copy() bright_rect.w = int((bright_rect.w * mini) / maxi) pbge.my_state.screen.fill(self.BRIGHT_HEALTH, bright_rect) mydest.x += field_width + 5 pbge.draw_text(pbge.SMALLFONT, 'M:', mydest, justify=-1, color=pbge.INFO_GREEN) maxi = self.model.get_max_mental() mini = self.model.get_current_mental() dark_rect = mydest.copy() dark_rect.x += text_width dark_rect.w -= text_width pbge.my_state.screen.fill(self.DARK_MENTAL, dark_rect) bright_rect = dark_rect.copy() bright_rect.w = int((bright_rect.w * mini) / maxi) pbge.my_state.screen.fill(self.BRIGHT_MENTAL, bright_rect) mydest.x += field_width + 5 pbge.draw_text(pbge.SMALLFONT, 'S:', mydest, justify=-1, color=pbge.INFO_GREEN) maxi = self.model.get_max_stamina() mini = self.model.get_current_stamina() dark_rect = mydest.copy() dark_rect.x += text_width dark_rect.w -= text_width pbge.my_state.screen.fill(self.DARK_STAMINA, dark_rect) bright_rect = dark_rect.copy() bright_rect.w = int((bright_rect.w * mini) / maxi) pbge.my_state.screen.fill(self.BRIGHT_STAMINA, bright_rect) cp, mp = self.mover.get_current_and_max_power() if mp > 0: mydest = self.power_sprite.get_rect(0) mydest.midright = (x + self.width, y + self.height // 2) self.power_sprite.render(mydest, 10 - max(cp * 10 // mp, 1))
def render(self,x,y): pbge.draw_text(pbge.my_state.huge_font, '{}%'.format(int(self.odds*100)), pygame.Rect(x,y,75,32),justify=0,color=pbge.INFO_HILIGHT) pbge.draw_text(pbge.my_state.big_font, 'TO HIT', pygame.Rect(x,y+pbge.my_state.huge_font.get_linesize(),75,32),justify=0,color=pbge.INFO_HILIGHT) t = 0 for mymod in self.modifiers: pbge.draw_text(pbge.my_state.small_font, '{:+d}: {}'.format(int(mymod[0]),mymod[1]), pygame.Rect(x+77,y+t*pbge.SMALLFONT.get_linesize(),self.width-77,32),justify=-1,color=pbge.INFO_GREEN) t += 1 if t > 2: break
def render(self, x, y): if self.model: pbge.draw_text(self.font, 'Health: {}/{}'.format(self.model.current_health, self.model.max_health), pygame.Rect(x, y, self.width, self.rowheight), justify=0, color=pbge.INFO_GREEN) pbge.draw_text(self.font, 'Mental: {}/{}'.format(self.model.get_current_mental(), self.model.get_max_mental()), pygame.Rect(x, y + self.rowheight, self.width, self.rowheight), justify=0, color=pbge.INFO_GREEN) pbge.draw_text(self.font, 'Stamina: {}/{}'.format(self.model.get_current_stamina(), self.model.get_max_stamina()), pygame.Rect(x, y + self.rowheight * 2, self.width, self.rowheight), justify=0, color=pbge.INFO_GREEN)
def render(self,x,y): mydest = pygame.Rect(x,y,self.width,self.height) max_w = 0 for ps in stats.PRIMARY_STATS: mytext = '{}: '.format(ps.name) pbge.draw_text(self.font,mytext,mydest,color=pbge.INFO_GREEN) max_w = max(max_w,self.font.size(mytext)[0]) mydest.y += self.font.get_linesize() if self.model: mydest = pygame.Rect(x+max_w, y, 20, self.height) rankdest = pygame.Rect(x+max_w+30, y, self.width - max_w - 30, self.height) for ps in stats.PRIMARY_STATS: statval = self.model.get_stat(ps) pbge.draw_text(self.font, str(statval), mydest, color=pbge.INFO_HILIGHT) mydest.y += self.font.get_linesize() pbge.draw_text(self.font, self.STAT_RANKS[max(min((statval-2)//2,len(self.STAT_RANKS)-1),0)], rankdest, color=pbge.INFO_GREEN ) rankdest.y = mydest.y
def render( self ): pbge.my_state.view() myrect = self.text_area.get_rect() pbge.default_border.render(myrect) pbge.draw_text(pbge.my_state.medium_font,self.memos[self.memo_n],myrect)
def render(self,x,y): mydest = pygame.Rect(x,y,self.width,self.height) pbge.draw_text(self.font,self.model.scale.get_mass_string(self.model.mass),mydest,color=pbge.INFO_GREEN) pbge.draw_text(self.font, '{} slots'.format(self.model.volume), mydest, justify=1, color=pbge.INFO_GREEN)
def render(self, x, y): self.image.render(pygame.Rect(x, y, 100, 100), 1) mydest = pygame.Rect(x + 110, y, self.width - 110, self.height) skillz = [sk.name for sk in self.model.statline.keys() if sk in stats.NONCOMBAT_SKILLS] pbge.draw_text(pbge.MEDIUMFONT, 'Skills: {}'.format(', '.join(skillz or ["None"])), mydest, justify=-1, color=pbge.INFO_GREEN)
def render(self,x,y): if self.model: pbge.draw_text(self.font, 'Health: {}/{}'.format(self.model.current_health,self.model.max_health), pygame.Rect(x,y,self.width,self.rowheight),justify=0, color=pbge.INFO_GREEN) pbge.draw_text(self.font, 'Mental: {}/{}'.format(self.model.get_current_mental(),self.model.get_max_mental()), pygame.Rect(x,y+self.rowheight,self.width,self.rowheight),justify=0, color=pbge.INFO_GREEN) pbge.draw_text(self.font, 'Stamina: {}/{}'.format(self.model.get_current_stamina(),self.model.get_max_stamina()), pygame.Rect(x,y+self.rowheight*2,self.width,self.rowheight),justify=0, color=pbge.INFO_GREEN)