localeInfo localeinfo//sizde boyle olabilir self.name = name //ARAT //ALTINDA BUL SİL self.hpGauge = hpGauge //BUL SIL if app.ENABLE_VIEW_TARGET_DECIMAL_HP: self.hpDecimal = hpDecimal self.isShowButton = False//ARAT //ALTINDA BUL SIL self.lastHPPercentage=-1 //ARAT if app.ENABLE_VIEW_TARGET_DECIMAL_HP: self.hpDecimal = None //ALTINDA BUL SIL self.hpGaugeDMG = None //ARAT self.SetSize(250, 40) //DEGISTIR if app.ENABLE_VIEW_TARGET_DECIMAL_HP: self.hpDecimal.Hide() self.SetSize(250, 65) //ARAT self.infoButton.Show() //DEGISTIR if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER: self.infoButton.Hide() else: self.infoButton.Show() //ARAT if app.ENABLE_VIEW_TARGET_DECIMAL_HP: def SetHP(self, hpPercentage, iMinHP, iMaxHP): if not self.hpGauge.IsShow(): if app.ENABLE_VIEW_TARGET_PLAYER_HP: showingButtonCount = len(self.showingButtonList) if showingButtonCount > 0: if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER: self.SetSize(max(150 + 75 * 3, showingButtonCount * 75), self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) if localeInfo.IsARABIC(): self.name.SetPosition( self.GetWidth()-23, 13) else: self.name.SetPosition(23, 13) self.name.SetWindowHorizontalAlignLeft() self.name.SetHorizontalAlignLeft() self.hpGauge.Show() self.hpGaugeDMG.Show() self.UpdatePosition() self.actual_hp = hpPercentage if self.lastHPPercentage == -1: self.lastHPPercentage=hpPercentage self.hpGaugeDMG.SetPercentage(self.lastHPPercentage, 100) self.lastHPPercentage=hpPercentage self.hpGauge.SetPercentage(hpPercentage, 100) if app.ENABLE_VIEW_TARGET_DECIMAL_HP: self.hpDecimal.SetText(localeInfo.NumberToMoneyString2(max(iMinHP, 0)) + "/" + localeInfo.NumberToMoneyString2(iMaxHP)) (textWidth, textHeight)=self.hpDecimal.GetTextSize() self.hpDecimal.SetPosition(90 / 2 - textWidth / 2, -13) self.hpDecimal.Show() else: def SetHP(self, hpPercentage): if not self.hpGauge.IsShow(): if ENABLE_VIEW_TARGET_PLAYER_HP: showingButtonCount = len(self.showingButtonList) if showingButtonCount > 0: if chr.GetInstanceType(self.GetTargetVID) != chr.INSTANCE_TYPE_PLAYER: if showingButtonCount != 1: self.SetSize(max(150, showingButtonCount * 75), self.GetHeight()) else: self.SetSize(max(150, 2 * 75), self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) if localeInfo.IsARABIC(): self.name.SetPosition( self.GetWidth()-23, 13) else: self.name.SetPosition(23, 13) self.name.SetWindowHorizontalAlignLeft() self.name.SetHorizontalAlignLeft() self.hpGauge.Show() self.UpdatePosition() ///////////////////////////////////////////////////////////////////////////////////////////////////// //DEGISTIR BUNLA KOMPLE// if app.ENABLE_VIEW_TARGET_DECIMAL_HP: def SetHP(self, hpPercentage, iMinHP, iMaxHP): import chat if not self.hpGauge.IsShow(): if app.ENABLE_VIEW_TARGET_PLAYER_HP: if self.showingButtonList: c = 0 for i in self.showingButtonList: if i.IsShow(): c += 1 showingButtonCount = c else: showingButtonCount = 0 if showingButtonCount > 0: if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER: self.SetSize(max(250, showingButtonCount * 75), 65) else: self.SetSize(200 + 7*self.nameLength, 40) else: self.SetSize(200 + 7*self.nameLength, 40) else: self.SetSize(200 + 7*self.nameLength, self.GetHeight()) if localeInfo.IsARABIC(): self.name.SetPosition( self.GetWidth()-23, 13) else: self.name.SetPosition(23, 13) self.name.SetWindowHorizontalAlignLeft() self.name.SetHorizontalAlignLeft() self.hpGauge.Show() self.UpdatePosition() self.hpGauge.SetPercentage(hpPercentage, 100) if app.ENABLE_VIEW_TARGET_DECIMAL_HP: iMinHPText = '.'.join([i - 3 < 0 and str(iMinHP)[:i] or str(iMinHP)[i-3:i] for i in range(len(str(iMinHP)) % 3, len(str(iMinHP))+1, 3) if i]) iMaxHPText = '.'.join([i - 3 < 0 and str(iMaxHP)[:i] or str(iMaxHP)[i-3:i] for i in range(len(str(iMaxHP)) % 3, len(str(iMaxHP))+1, 3) if i]) self.hpDecimal.SetText(str(iMinHPText) + "/" + str(iMaxHPText)) (textWidth, textHeight)=self.hpDecimal.GetTextSize() if localeInfo.IsARABIC(): self.hpDecimal.SetPosition(120 / 2 + textWidth / 2, -13) else: self.hpDecimal.SetPosition(130 / 2 - textWidth / 2, -13) self.hpDecimal.Show() else: def SetHP(self, hpPercentage): if not self.hpGauge.IsShow(): self.SetSize(200 + 7*self.nameLength, self.GetHeight()) if localeInfo.IsARABIC(): self.name.SetPosition( self.GetWidth()-23, 13) else: self.name.SetPosition(23, 13) self.name.SetWindowHorizontalAlignLeft() self.name.SetHorizontalAlignLeft() self.hpGauge.Show() self.UpdatePosition() self.hpGauge.SetPercentage(hpPercentage, 100) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //ARAT self.SetSize(max(150, showingButtonCount * 75), 65) //DEGISTIR if showingButtonCount == 1 and self.showingButtonList[0].GetText() == localeInfo.TARGET_BUTTON_DISMOUNT: showingButtonCount += 1 if app.ENABLE_VIEW_TARGET_PLAYER_HP: width = max(250, showingButtonCount * 75) self.SetSize(width, 65) else: self.SetSize(max(150, showingButtonCount * 75), 65)