Dynamic Things Posted July 28, 2015 at 11:21 AM Share Posted July 28, 2015 at 11:21 AM Boas, o titulo penso que não foi de todo o mais esclarecedor, então sendo assim deixo-vos aqui uma imagem do que vamos fazer. Vamos extrair o root Abrir uiTarget.py Procurar por: def __init__(self): A baixo de: hpGauge = ui.Gauge() hpGauge.SetParent(self) hpGauge.MakeGauge(130, "red") hpGauge.Hide() Adicionar: hpPercenttxt = ui.TextLine() hpPercenttxt.SetParent(self) hpPercenttxt.SetPosition(160, 13) hpPercenttxt.SetText("") hpPercenttxt.Hide() Procurar por: self.hpGauge = hpGauge Adicionar em baixo: self.hpPercenttxt = hpPercenttxt Procurar por: def SetHP(self, hpPercentage): Por baixo de: self.UpdatePosition() Adicionar: self.hpPercenttxt.SetPosition(200 + 7*self.nameLength-205, 13) self.hpPercenttxt.Show() Procurar por self.hpGauge.SetPercentage(hpPercentage, 100) Adicionar por baixo: self.hpPercenttxt.SetText("%d%%" % (hpPercentage)) Feito isso podem compactar o root, e testar se está tudo ok. Cumprimentos Dynamic Things Link to comment Share on other sites More sharing options...
Magician Posted August 23, 2016 at 08:26 PM Share Posted August 23, 2016 at 08:26 PM Boa Partilha +1 Link to comment Share on other sites More sharing options...
WLN Posted December 2, 2016 at 10:01 PM Share Posted December 2, 2016 at 10:01 PM quando clico em algum player a porcentagem aparece em 0% e encima do nome do player xD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now