Jump to content

Loading bar - How can I set text?


Recommended Posts

  • Gold

Hi guys,

how can I set text with loaded percents? For example: is 10% it will show: loading map textures, is 20% it will show: loading warrior etc.

Here is a video with that loading:

I think, I must do it somewhere on these lines:

Thanks for answers!

Sincerely,

ReFresh

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

d9e27a7ccb1085d7deb6d59858b162e4.gif

//@root/introLoading.py
//@Mr.Big Dick
//1.) Search:
			self.loadingGage=self.GetChild("FullGage")
//2.) Add bellow:
			self.loadingInfo = self.GetChild("LoadingInfo_Text")
//3.) Search:
			self.loadingGage.SetPercentage(2+98*p/100, 100)
//4.) Add bellow:
			self.loadingInfo.SetText("Loading: %s" % (self.txtLoadingProgressDict[p]))
//5.) Search:
		self.errMsg.Hide()
//6.) Add bellow:
		self.txtLoadingProgressDict = {
			0: "InitData",      10: "Map",      30: "Sound",
			40: "Effect",       50: "Warrior",  60: "Assasin",
			70: "Sura",         80: "Shaman",   90: "Skill",
			93: "Enemy",        97: "NPC",      98: "Guild Building",
			100: "Start game"
		}
//@locale/xx/loadingwindow.py
//1.) Search:
					"name" : "FullGage",
//2.) And add under this section: -> https://metin2.download/picture/bH38A0dGUpV6X9BXGgcJHh1c11Sqtzgo/.png
                {
					"name" : "LoadingInfo_Text", "type" : "text", "x" : 190, "y" : -20, "fontname" : "Tahoma:19", "text" : "",  "vertical_align" : "center",
				},

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 4
Link to comment
Share on other sites

  • Gold

@VegaS I got this error:

1112 12:04:19056 ::   File "introLoading.py", line 268, in OnUpdate

1112 12:04:19056 ::   File "introLoading.py", line 190, in __SetProgress

1112 12:04:19056 :: KeyError
1112 12:04:19056 :: : 
1112 12:04:19056 :: 10 //THIS IS NUMBER OF LOADED PRECENT, IN SYSSER WAS ALL SAME ERRORS WITH PERCENTS WHICH WAS LOADED.
1112 12:04:19056 :: 

Here are the lines where is an error:

 

 

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Gold
1 hour ago, tavi said:

Refresh problem is with your gauge, because I implement this sistem and is work very nice without your problem

Are you serious? I know it omg. Go to learn English language and don't post comments like which you posted. I don't need to read it's your problem blablabla I need solution for my problem.

I'll be always helpful! 👊 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

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.