Register for your free account! | Forgot your password?

You last visited: Today at 13:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[TuT]New button on taskbar

Discussion on [TuT]New button on taskbar within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Closed Thread
 
Old   #1
 
LovecKrys's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 210
Received Thanks: 199
[TuT]New button on taskbar

Hi epvp, i want to show you how to make new button on taskbar with function.
Ok so firt unpack locale_xx where xx is your locale language (de, cz, sg, etc) go to xx/ui/ and open taskbar.py. Here is position, button design etc..so find this
Code:
		{
			"name" : "InventoryButton",
			"type" : "button",

			"x" : SCREEN_WIDTH - 110,
			"y" : 3 + Y_ADD_POSITION,

			"tooltip_text" : uiScriptLocale.TASKBAR_INVENTORY,

			"default_image" : ROOT + "TaskBar/Inventory_Button_01.sub",
			"over_image" : ROOT + "TaskBar/Inventory_Button_02.sub",
			"down_image" : ROOT + "TaskBar/Inventory_Button_03.sub",
		},
and add this under the inventory button.
Code:
		{
			"name" : "Webove_stranky",
			"type" : "button",

			"x" : SCREEN_WIDTH - 178,
			"y" : 3 + Y_ADD_POSITION,

			"tooltip_text" : "Webové stránky",

			"default_image" : ROOT + "TaskBar/Inventory_Button_01.sub",
			"over_image" : ROOT + "TaskBar/Inventory_Button_02.sub",
			"down_image" : ROOT + "TaskBar/Inventory_Button_03.sub",
		},
This is the design of button, the root path is defined in the top of taskbar.py
Code:
		"default_image" : ROOT + "TaskBar/Inventory_Button_01.sub",
			"over_image" : ROOT + "TaskBar/Inventory_Button_02.sub",
			"down_image" : ROOT + "TaskBar/Inventory_Button_03.sub",
ok, next..this is tooltip text. It means text which you can see while you have your mouse cursor over the button
Code:
"tooltip_text" : "Webové stránky",
ok, we finish_xx locale. Save taskbar.py and pack your locale. After you add new locale to client and start game, wuala we have new button
Code:
http://i.epvpimg.com/N0m8c.png
Ok, now the harder part of this :-D unpack root and find uitaskbar.py
Okkkkk ladies :-D find this
Code:
toggleButtonDict[TaskBar.BUTTON_CHARACTER]=self.GetChild("CharacterButton")
and under it add this
Code:
toggleButtonDict[TaskBar.BUTTON_WEBOVE_STRANKY]=self.GetChild("Webove_stranky")
Warning!! if you change the ("Webove_stranky") to something other, you have to change it also in taskbar.py in locale!! because this determines what button has the function which we can make with this tutorial. Ok, next find this
Code:
BUTTON_CHAT = 4
and under it add this code.
Code:
BUTTON_WEBOVE_STRANKY = 5
Ok now we finished the uitaskbar.py part..open interfacemodule.py First and necessary part of this! you must write on the top or betwen the other imports this
Code:
import os
find this
Code:
self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_CHAT, ui.__mem_func__(self.ToggleChat))
now under it add this
Code:
self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_WEBOVE_STRANKY, ui.__mem_func__(self.OtevritWeb))
ooookkkk and the last part of this you have to add the definition of this
Code:
self.OtevritWeb
You can add it where you want. So, here is code you have to add.
Code:
[TAB]def OtevritWeb(self):
[TAB][TAB]chat.AppendChat(CHAT_TYPE_INFO, "Otevírání webových stránek..")
[TAB][TAB]os.startfile("www.website.cz")
you have to replace the "[TAB]" )with the tabulator xd..)
Ok now pack root, put in your client and start game. Now if you click on the new button you open the website which you can define in this
Code:
os.startfile("www.website.cz")
Finaly we have the button with function.
Ok that's all. If this help you press thanks button, and if not press it too
Sorry for my bad english..
mfg LovecKrys
LovecKrys is offline  
Thanks
39 Users
Old 05/04/2013, 18:03   #2
 
Stαgє6's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 2,019
Received Thanks: 1,471
Hello this is good but i think this is already public on this board
Stαgє6 is offline  
Thanks
1 User
Old 05/04/2013, 18:05   #3
 
elite*gold: 0
Join Date: May 2008
Posts: 208
Received Thanks: 49
Remove your Homepage link.
Chip' is offline  
Old 05/04/2013, 18:08   #4
 
LovecKrys's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 210
Received Thanks: 199
Quote:
Originally Posted by Chip' View Post
Remove your Homepage link.
Already removed.
LovecKrys is offline  
Old 05/04/2013, 19:09   #5
 
ondry147's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 49
Received Thanks: 60
Code:
http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/1455697-how-neuen-button-taskbar.html
already published
ondry147 is offline  
Old 05/04/2013, 19:12   #6
 
[H]olymind's Avatar
 
elite*gold: 1
Join Date: Jun 2010
Posts: 76
Received Thanks: 192
import webbrowser
webbrowser.open('http://www.google.pt')

Is much better
[H]olymind is offline  
Old 05/04/2013, 19:18   #7
 
elite*gold: 139
Join Date: Sep 2010
Posts: 583
Received Thanks: 546
Quote:
Originally Posted by [H]olymind View Post
import webbrowser
webbrowser.open('http://www.google.pt')

Is much better
Well only difference is that this function above me returns a True or False Value if Opened == True else False. thats all
AND ITS USES SYSTEM STANDARD Browser this means always InternetGayPlorer
.XXShuzZzle is offline  
Old 05/04/2013, 19:21   #8
 
elite*gold: 2
Join Date: Apr 2013
Posts: 409
Received Thanks: 42
thank you for the codes .
.Trinity is offline  
Thanks
1 User
Old 05/04/2013, 19:25   #9
 
LovecKrys's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 210
Received Thanks: 199
Quote:
Originally Posted by [H]olymind View Post
import webbrowser
webbrowser.open('http://www.google.pt')

Is much better
This is the same as i wrote. And you have to place in root webbrowser library.
Only differce is as wrote ShuzZzle
sorry for bad eng
LovecKrys is offline  
Old 05/04/2013, 21:45   #10
 
socressor's Avatar
 
elite*gold: 1300
Join Date: Sep 2008
Posts: 927
Received Thanks: 379
already public by me..
socressor is offline  
Thanks
1 User
Old 05/04/2013, 22:06   #11
 
.RazerX's Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 188
Received Thanks: 149
Quote:
Originally Posted by socressor View Post
already public by me..
True...
Is His Thread
.RazerX is offline  
Old 05/04/2013, 23:02   #12
 
elite*gold: 0
Join Date: Apr 2013
Posts: 23
Received Thanks: 22
Everything applied correctly, but the button does not appear -.-
No errors on syser...
CDiem is offline  
Old 05/05/2013, 07:18   #13
 
elite*gold: 0
Join Date: Apr 2010
Posts: 28
Received Thanks: 13
Is possible to run quest this way?
564lopes564 is offline  
Old 05/05/2013, 20:37   #14
 
LovecKrys's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 210
Received Thanks: 199
Quote:
Originally Posted by CDiem View Post
Everything applied correctly, but the button does not appear -.-
No errors on syser...
You have to write the correct path to the picture of button. Check it or post here your taskbar.py from locale_xx

Quote:
Originally Posted by 564lopes564 View Post
Is possible to run quest this way?
Yes, it's possible but i don't know how to do it. I need it too
LovecKrys is offline  
Old 05/05/2013, 20:41   #15
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Thx
I Was Locking For It
MrLibya is offline  
Closed Thread


Similar Threads Similar Threads
[HOW-TO] Neuen Button in Taskbar
08/02/2013 - Metin2 PServer Guides & Strategies - 38 Replies
Hi, da ichs hier noch nich gesehn habe und ich nur erkläre wie mans einbaut nicht wie komplexe Funktionen dafür sind... hier wie man einen neuen Button in der Taskbar platziert. Beispiel Bild für meine Premium Funktionen: http://img194.imageshack.us/img194/1816/092611432 4.jpg 1.Schritt:
Fehler nach einfügen von Neuen TaskBar Button
03/03/2013 - Metin2 Private Server - 2 Replies
Vor dem einfügen nicht ein Fehler aber nach dem einfügen geht der client bei login aus xD -.-" :confused: syserr: 0302 20:56:03273 :: networkModule.py(line:194) SetSelectCharacterPhase system.py(line:130) __pack_import system.py(line:110) _process_result introSelect.py(line:28) ? system.py(line:130) __pack_import
HowTo funktion für button in taskbar und shortcut
10/11/2011 - Metin2 PServer Guides & Strategies - 14 Replies
hallo zusammen dies ist mein erstes tutorial , also seid nicht zu streng mit der beurteilung. nachdem ich mich ein wenig mit dem clienten befasst hatte, kam mir das thema Neuen Button in Taskbar ziemlich zu gute. wer diesen thread erfolgreich getestet hat , kann dies mit einbinden. also hab ich was für die farmer erstellt es wird folgendes benötigt.
Taskbar Button Renamer
01/08/2008 - CO2 Exploits, Hacks & Tools - 31 Replies
*Updated to utilize the ma-global.inf file which can be found in joek's thread: Hack Programmers United Front This is my first contribution to the forum, hope you all like it. It's just a simple taskbar button renamer for CO2 written in VB6, using the SendMessage API and some other APIs which can be found in some of Blinko's modules. This tool renames ALL currently open CO2 windows. In the future I might add the option to allow users to choose which accounts/windows are renamed, and an...



All times are GMT +1. The time now is 13:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.