Jump to content
External pictures are being replaced... ×
×
×
  • Create New...
  • 0

Help Python Progressbar


Seryov

Question

Hi, I have problem to set progressbar for pet system:

Python Code:
self.petlifeg.SetPercentage(50, 100)

Result:

rTgGetI3TG2TWWZ-fBafCg.png

In the oficial code is:
SetPercentageScale

Someone know what I can do to fix the progressbar?

Thank you so much.

 

 

Link to comment
Share on other sites

  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

6 answers to this question

Recommended Posts

  • 0
  • Premium
33 minutes ago, Seryov said:

I'm using that, but dont work success, 
self.petlifeg.SetPercentage(50, 100)

The progress bar it's set to 50% but show +/- 10%...


 

Yes i mean can you paste here the snippet for that def?
So we can understand if the two parameters are correctly processed by python.

Unfortunately i don`t have the code with me so if you could provide here it would be great.

 

If you can provide even the petlifeg would be even better

Link to comment
Share on other sites

  • 0
39 minutes ago, Fleon said:

Yes i mean can you paste here the snippet for that def?
So we can understand if the two parameters are correctly processed by python.

Unfortunately i don`t have the code with me so if you could provide here it would be great.

 

If you can provide even the petlifeg would be even better

it's here

 

	def SetPercentage(self, curValue, maxValue):
		if maxValue:
			self.SetRenderingRect(0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)
		else:
			self.SetRenderingRect(0.0, 0.0, 0.0, 0.0)

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.