Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 11:47

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

Advertisement



[Python]Item Tooltip auf einen Button

Discussion on [Python]Item Tooltip auf einen Button within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 258
Join Date: Dec 2015
Posts: 106
Received Thanks: 127
[Python]Item Tooltip auf einen Button

Hallo,
Ich möchte in Python einen Button machen und als Tooltip soll wie bei einem richtigen Item die Beschreibung kommen. Allerdings will ich dort den Text noch etwas verändern.

Wäre nett wenn mir jemand helfen könnte^^
Creek' is offline  
Old 03/08/2016, 15:35   #2

 
.yorliK's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
Die Beschreibung von einem Item, oder eine eigene?
.yorliK is offline  
Old 03/08/2016, 23:58   #3
 
elite*gold: 258
Join Date: Dec 2015
Posts: 106
Received Thanks: 127
Quote:
Originally Posted by Kilroy. View Post
Die Beschreibung von einem Item, oder eine eigene?
Eine eigene + Itembonis.
Creek' is offline  
Old 03/09/2016, 16:29   #4

 
.yorliK's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
Quote:
Originally Posted by ʟυɢıα View Post
Eine eigene + Itembonis.
Du hast sicherlich schon einen Button erstellt.
Nun musst du nur noch einen ToolTip erstellen, das geht z.B. so:

uitooltip importieren (am besten ganz oben):
Code:
import uiToolTip
dann dort wo dein Button erstellt wird:
Code:
self.toolTip = uiToolTip.ItemToolTip()
self.toolTip.ClearToolTip() # Tooltip leeren
self.toolTip.SetItemToolTip(19) # Vnum für Schwert+9
self.toolTip.AppendSpace(5) # Tooltip größer machen für neue Textline
self.toolTip.AppendTextLine("Eigener Text") # deine Textline
self.toolTip.Hide()
Dann in der def OnUpdate deiner .py (falls noch nicht vorhanden erstellen):
Code:
def OnUpdate(self):
	if self.button.IsIn(): #deinen Button ansprechen, so wie der bei dir heißt.
		self.toolTip.Show()
	else:
		self.toolTip.Hide()
.yorliK is offline  
Old 03/09/2016, 18:49   #5
 
elite*gold: 258
Join Date: Dec 2015
Posts: 106
Received Thanks: 127
Quote:
Originally Posted by Kilroy. View Post
Du hast sicherlich schon einen Button erstellt.
Nun musst du nur noch einen ToolTip erstellen, das geht z.B. so:

uitooltip importieren (am besten ganz oben):
Code:
import uiToolTip
dann dort wo dein Button erstellt wird:
Code:
self.toolTip = uiToolTip.ItemToolTip()
self.toolTip.ClearToolTip() # Tooltip leeren
self.toolTip.SetItemToolTip(19) # Vnum für Schwert+9
self.toolTip.AppendSpace(5) # Tooltip größer machen für neue Textline
self.toolTip.AppendTextLine("Eigener Text") # deine Textline
self.toolTip.Hide()
Dann in der def OnUpdate deiner .py (falls noch nicht vorhanden erstellen):
Code:
def OnUpdate(self):
	if self.button.IsIn(): #deinen Button ansprechen, so wie der bei dir heißt.
		self.toolTip.Show()
	else:
		self.toolTip.Hide()
Danke^^
Wie würde das mit einer TextLine gehen?
Creek' is offline  
Reply


Similar Threads Similar Threads
[Python]Frage Button Tooltip
09/24/2015 - Metin2 Private Server - 2 Replies
Hey leutzz, Ich hab mal ne Frage, Von dem Abschiedsrelease (Killroy.) hab ich mir das Sideboard gezogen und es eingefügt. Ich würd gern ein Button Tooltip rein haben, funktioniert jedoch nich so ganz. Ich hab die python datei von ihm schon ein wenig abgeändert aber es will nicht rein gehen. Im syserr steht nix diesbezüglich. Hier meine .py datei: import ui import dbg
Tooltip usage on TreeView item (Dinamyc list)
07/14/2014 - AutoIt - 1 Replies
Hy all, Somehow i could not manage to make a tooltip on TreeView items... On any control i could easy do, but this messing with me. :D The treeview receiveing the elements from a file, and since this file can change, the treeview list is dinamyc as well. So i will be happy, if someone explain how do i have to thinking to make this stuff. I did read the item ID, what i have to use for the tooltip, but somehow wont work. :( Any idea, what can be the problem? Probably i just simple do...
Python button
05/04/2013 - Metin2 - 0 Replies
Hi, is here anyone who know how to make button in client which send packet to quest and the quest will start? Thx: LovecKrys > translate :-DD
Font of Item Text and Tooltip
04/26/2013 - Flyff Private Server - 3 Replies
any one who know which part of Source and the Function to edit the font of this?? Picture: . 1 ToolTip--> (FIXXED) . 2 Item --> http://img856.imageshack.us/img856/5715/aw1a.png



All times are GMT +1. The time now is 11:48.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.