import ui,net,chat,player,app,localeInfo,ime,chr,savasp,time,os
if app.YENILENMIS_FISILTI_SISTEMI:
import uiContact
if app.ENABLE_YAZIYOR_SISTEMI:
import whisper
b_name = "Yazıyor."
class WhisperButton(ui.Button):
def __init__(self):
ui.Button.__init__(self, "TOP_MOST")
def __del__(self):
ui.Button.__del__(self)
def SetToolTipText(self, text, x=0, y = 32):
ui.Button.SetToolTipText(self, text, x, y)
self.ToolTipText.Show()
def SetToolTipTextWithColor(self, text, color, x=0, y = 32):
ui.Button.SetToolTipText(self, text, x, y)
self.ToolTipText.SetPackedFontColor(color)
self.ToolTipText.Show()
def ShowToolTip(self):
if 0 != self.ToolTipText:
self.ToolTipText.Show()
def HideToolTip(self):
if 0 != self.ToolTipText:
self.ToolTipText.Show()
class WhisperDialog(ui.ScriptWindow):
class TextRenderer(ui.Window):
def SetTargetName(self, targetName):
self.targetName = targetName
def OnRender(self):
(x, y) = self.GetGlobalPosition()
chat.RenderWhisper(self.targetName, x, y)
class ResizeButton(ui.DragButton):
def __init__(self):
ui.DragButton.__init__(self)
def __del__(self):
ui.DragButton.__del__(self)
def OnMouseOverIn(self):
app.SetCursor(app.HVSIZE)
def OnMouseOverOut(self):
app.SetCursor(app.NORMAL)
def __init__(self, eventMinimize, eventClose):
print "NEW WHISPER DIALOG ----------------------------------------------------------------------------"
ui.ScriptWindow.__init__(self)
self.targetName = ""
self.KarakterSayisi = 153
self.Rengimrengim = ""
self.Renksec = ["Normal", "Mavi", "Yesil", "Kirmizi", "Pembe"]
self.Renkler = ["|h|r", "|cFF0080FF|H|h", "|cFF00FF00|H|h", "|cFFFF0000|H|h", "|cFFFF00FF|H|h"]
self.UI_Elements = { }
self.__Gui()
self.eventMinimize = eventMinimize
self.eventClose = eventClose
self.eventAcceptTarget = None
if app.YENILENMIS_FISILTI_SISTEMI:
self.InitializeProfileData()
def __del__(self):
print "---------------------------------------------------------------------------- DELETE WHISPER DIALOG"
ui.ScriptWindow.__del__(self)
def LoadDialog(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "UIScript/WhisperDialog.py")
except:
import exception
exception.Abort("WhisperDialog.LoadDialog.LoadScript")
try:
GetObject = self.GetChild
self.scrollBar = GetObject("scrollbar")
self.titleNameEdit = GetObject("Baslik_Adi_Duzeltme")
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Fisiltinin_Basligini_Halay_cek = GetObject("Fisiltinin_Basligini_Halay_cek")
self.ignoreButton = GetObject("ignorebutton")
self.Fisilti_Dugmesi = GetObject("Fisilti_Dugmesi")
self.Kapatma_Dugmesi = GetObject("Kapatma_Dugmesi")
if app.YENILENMIS_FISILTI_SISTEMI:
self.titleNameEditBar = GetObject("Isim_Girme_Cubugu")
self.Sohbet_Hatti = GetObject("Sohbet_Hatti")
self.Fisilti_Kucultme_Butonu = GetObject("Fisilti_Kucultme_Butonu")
self.Mesaj_Gonder = GetObject("Mesaj_Gonder")
self.board = GetObject("board")
self.editBar = GetObject("editbar")
self.GM_Simgesi = GetObject("GM_Simgesi")
self.Kabul_Et = GetObject("Kabul_Et")
self.KalanKarakter = GetObject("KarakterSayisi")
if app.ENABLE_YAZIYOR_SISTEMI:
self.yaziyor = GetObject("Yaziyor_Text")
if app.YENILENMIS_FISILTI_SISTEMI:
self.Fisilti_karakter_iconlari = GetObject("Fisilti_karakter_iconlari")
self.Fisilti_Bayrak_Iconu = GetObject("Fisilti_Bayrak_Iconu")
self.Fisilti_Dil_Iconu = GetObject("Fisilti_Dil_Iconu")
self.Fisilti_Isim = GetObject("Fisilti_Isim")
self.Fisilti_Level = GetObject("Fisilti_Level")
self.Fisilti_Durum = GetObject("Fisilti_Durum")
self.Fisilti_Lonca = GetObject("Fisilti_Lonca")
self.Fisilti_Dogum_Gunu = GetObject("Fisilti_Dogum_Gunu")
self.Fisilti_Konum_Yer = GetObject("Fisilti_Konum_Yer")
except:
import exception
exception.Abort("DialogWindow.LoadDialog.BindObject")
self.titleNameEdit.SetText("")
self.GM_Simgesi.Hide()
self.Fisilti_Kucultme_Butonu.SetEvent(ui.__mem_func__(self.Minimize))
self.board.SetCloseEvent(ui.__mem_func__(self.Close))
self.scrollBar.SetPos(1.0)
self.scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
self.Sohbet_Hatti.SetReturnEvent(ui.__mem_func__(self.SendWhisper))
self.Sohbet_Hatti.SetEscapeEvent(ui.__mem_func__(self.Minimize))
self.Sohbet_Hatti.SetMultiLine()
self.Sohbet_Hatti.OnIMEKeyDown = ui.__mem_func__(self.OnIMEKeyDown)
self.Mesaj_Gonder.SetEvent(ui.__mem_func__(self.SendWhisper))
self.titleNameEdit.SetReturnEvent(ui.__mem_func__(self.AcceptTarget))
self.titleNameEdit.SetEscapeEvent(ui.__mem_func__(self.Close))
self.Kabul_Et.SetEvent(ui.__mem_func__(self.AcceptTarget))
self.KalanKarakter.SetText(str(self.KarakterSayisi))
self.textRenderer = self.TextRenderer()
self.textRenderer.SetParent(self)
self.textRenderer.SetPosition(20, 28)
self.textRenderer.SetTargetName("")
self.textRenderer.Show()
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Fisiltinin_Basligini_Halay_cek.SetText("")
self.Kapatma_Dugmesi.SetEvent(ui.__mem_func__(self.Close))
self.ignoreButton.SetToggleDownEvent(ui.__mem_func__(self.IgnoreTarget))
self.ignoreButton.SetToggleUpEvent(ui.__mem_func__(self.IgnoreTarget))
self.Fisilti_Dugmesi.SetEvent(ui.__mem_func__(self.ReportViolentWhisper))
self.resizeButton = self.ResizeButton()
self.resizeButton.SetParent(self)
self.resizeButton.SetSize(20, 20)
self.resizeButton.SetPosition(280, 180)
self.resizeButton.SetMoveEvent(ui.__mem_func__(self.ResizeWhisperDialog))
self.resizeButton.Show()
self.ResizeWhisperDialog()
if app.YENILENMIS_FISILTI_SISTEMI:
self.SetWhisperDialogSize(410, 280)
self.emoticonsDict = {}
for objectEmoticons in xrange(len(uiContact.DICTIONARY['EMOTICONS_NAME_LIST'])):
self.emoticonsDict.update({objectEmoticons : [uiContact.EmoticonDialog(self.board, 10 + (objectEmoticons * 20), 205, lambda argument = objectEmoticons: self.OnSelectEmoticon(argument), objectEmoticons)]})
def Destroy(self):
self.eventMinimize = None
self.eventClose = None
self.eventAcceptTarget = None
if app.YENILENMIS_FISILTI_SISTEMI:
self.InitializeProfileData()
self.ClearDictionary()
self.scrollBar.Destroy()
self.titleNameEdit = None
self.titleNameEditBar = None
self.Kabul_Et = None
self.scrollBar = None
self.Sohbet_Hatti = None
self.Mesaj_Gonder = None
self.Fisilti_Kucultme_Butonu = None
self.textRenderer = None
self.board = None
self.editBar = None
if not app.YENILENMIS_FISILTI_SISTEMI:
self.ignoreButton = None
self.Fisilti_Dugmesi = None
self.Kabul_Et = None
self.resizeButton = None
self.Kapatma_Dugmesi = None
self.Fisiltinin_Basligini_Halay_cek = None
if not app.YENILENMIS_FISILTI_SISTEMI:
def ResizeWhisperDialog(self):
(xPos, yPos) = self.resizeButton.GetLocalPosition()
if xPos < 280:
self.resizeButton.SetPosition(280, yPos)
return
if yPos < 150:
self.resizeButton.SetPosition(xPos, 150)
return
self.SetWhisperDialogSize(xPos + 20, yPos + 20)
def SetWhisperDialogSize(self, width, height):
try:
max = int((width - 90) / 6) * 3 - 6
self.board.SetSize(width, height)
self.scrollBar.SetPosition(width - 25, 35)
self.scrollBar.SetScrollBarSize(height - 100)
self.scrollBar.SetPos(1.0)
self.editBar.SetSize(width - 18, 50)
self.Sohbet_Hatti.SetSize(width - 90, 40)
self.Sohbet_Hatti.SetLimitWidth(width-90)
self.SetSize(width, height)
if 0 != self.targetName:
chat.SetWhisperBoxSize(self.targetName, width - 50, height - 90)
if localeInfo.IsARABIC():
self.textRenderer.SetPosition(width - 20, 28)
self.scrollBar.SetPosition(width - 25 + self.scrollBar.GetWidth(), 35)
self.editBar.SetPosition(10 + self.editBar.GetWidth(), height - 60)
self.Mesaj_Gonder.SetPosition(width - 80 + self.Mesaj_Gonder.GetWidth(), 10)
self.Fisilti_Kucultme_Butonu.SetPosition(width - 42 + self.Fisilti_Kucultme_Butonu.GetWidth(), 12)
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Kapatma_Dugmesi.SetPosition(width - 24 + self.Kapatma_Dugmesi.GetWidth(), 12)
self.Sohbet_Hatti.SetPosition(5 + self.Sohbet_Hatti.GetWidth(), 5)
self.board.SetPosition(self.board.GetWidth(), 0)
else:
self.textRenderer.SetPosition(20, 28)
self.scrollBar.SetPosition(width - 25, 35)
self.editBar.SetPosition(10, height - 60)
self.Mesaj_Gonder.SetPosition(width - 80, 10)
if app.YENILENMIS_FISILTI_SISTEMI:
self.Fisilti_Kucultme_Butonu.SetPosition(width - 44, 10)
else:
self.Fisilti_Kucultme_Butonu.SetPosition(width - 42, 12)
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Kapatma_Dugmesi.SetPosition(width - 24, 12)
self.SetSohbet_HattiMax(max)
except:
import exception
exception.Abort("WhisperDialog.SetWhisperDialogSize.BindObject")
def SetSohbet_HattiMax(self, max):
self.Sohbet_Hatti.SetMax(max)
from grpText import GetSplitingTextLine
text = self.Sohbet_Hatti.GetText()
if text:
self.Sohbet_Hatti.SetText(GetSplitingTextLine(text, max, 0))
def OpenWithTarget(self, targetName):
if app.YENILENMIS_FISILTI_SISTEMI:
net.SendRequestContactProfilePacket(targetName, 1, "")
chat.CreateWhisper(targetName)
if app.YENILENMIS_FISILTI_SISTEMI:
chat.SetWhisperBoxSize(targetName, self.GetWidth() - 60, self.GetHeight() - 110)
self.titleNameEditBar.Hide()
self.SetPosition(170, 0)
else:
chat.SetWhisperBoxSize(targetName, self.GetWidth() - 60, self.GetHeight() - 90)
if app.ENABLE_YAZIYOR_SISTEMI:
self.SetTimer()
self.yaziyor.SetText(b_name)
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Fisiltinin_Basligini_Halay_cek.SetText(targetName)
self.ignoreButton.Hide()
if app.IsDevStage():
self.Fisilti_Dugmesi.Show()
else:
self.Fisilti_Dugmesi.Hide()
self.Sohbet_Hatti.SetFocus()
self.targetName = targetName
self.textRenderer.SetTargetName(targetName)
self.GM_Simgesi.Hide()
self.Fisilti_Kucultme_Butonu.Show()
self.titleNameEdit.Hide()
self.Kabul_Et.Hide()
if app.ENABLE_YAZIYOR_SISTEMI:
self.yaziyor.Hide()
if savasp.goruldu == 0:
if "#"+str(self.targetName)+"#" in savasp.Goruldu_Listesi:
goruldu_renk2 = {
1: '|cFF00FFFF|H|h'
}
goruldu_yazi2 = str(goruldu_renk2[1])
localtime = time.strftime("%H:%M:%S") #|cFF00FFFF|H|h
net.SendWhisperPacket(self.targetName, "" + goruldu_yazi2 + localeInfo.FISILTI_GORULDU + "(" + str(localtime) + ")")
savasp.Goruldu_Listesi.remove("#"+str(self.targetName)+"#")
else:
pass
def OpenWithoutTarget(self, event):
if app.YENILENMIS_FISILTI_SISTEMI:
self.titleNameEditBar.Show()
self.SetPosition(250, 0)
self.eventAcceptTarget = event
self.Fisilti_Kucultme_Butonu.Hide()
self.GM_Simgesi.Hide()
self.titleNameEdit.SetText("")
self.titleNameEdit.SetFocus()
self.targetName = 0
self.titleNameEdit.Show()
self.Kabul_Et.Show()
if not app.YENILENMIS_FISILTI_SISTEMI:
self.Fisiltinin_Basligini_Halay_cek.SetText("")
self.Fisilti_Kucultme_Butonu.Hide()
self.GM_Simgesi.Hide()
self.ignoreButton.Hide()
self.Fisilti_Dugmesi.Hide()
def SetGameMasterLook(self):
self.GM_Simgesi.Show()
def Minimize(self):
self.titleNameEdit.KillFocus()
if app.YENILENMIS_FISILTI_SISTEMI:
self.titleNameEditBar.Hide()
self.Kabul_Et.Hide()
self.Sohbet_Hatti.KillFocus()
self.Hide()
if app.ENABLE_YAZIYOR_SISTEMI:
if whisper.IsSended(self.targetName) and self.targetName:
whisper.Remove(self.targetName)
if None != self.eventMinimize:
if app.YENILENMIS_FISILTI_SISTEMI:
self.eventMinimize(self.targetName, self.job, self.level, self.empire, self.guild, self.language, self.status, self.location, self.year, self.month, self.day)
else:
self.eventMinimize(self.targetName)
def __Gui(self):
self.UI_Elements["arkaplan"] = ui.BoardWithTitleBar()
self.UI_Elements["arkaplan"].SetSize(290, 150)
self.UI_Elements["arkaplan"].SetCenterPosition()
self.UI_Elements["arkaplan"].AddFlag('movable')
self.UI_Elements["arkaplan"].AddFlag('float')
self.UI_Elements["arkaplan"].SetTitleName('Renk Seçme Paneli')
self.UI_Elements["arkaplan"].SetCloseEvent(self.Close)
self.UI_Elements["arkaplan"].Show()
for i in self.Renksec:
self.UI_Elements["Renk_%s_Button" % (i)] = ui.Button()
self.UI_Elements["Renk_%s_Button" % (i)].SetParent(self.UI_Elements["arkaplan"])
self.UI_Elements["Renk_%s_Button" % (i)].SetPosition(10 + self.Renksec.index(i) * 55, 100)
self.UI_Elements["Renk_%s_Button" % (i)].SetUpVisual("d:/ymir work/ui/public/xsmall_button_01.sub")
self.UI_Elements["Renk_%s_Button" % (i)].SetOverVisual("d:/ymir work/ui/public/xsmall_button_02.sub")
self.UI_Elements["Renk_%s_Button" % (i)].SetDownVisual("d:/ymir work/ui/public/xsmall_button_03.sub")
self.UI_Elements["Renk_%s_Button" % (i)].SetText(str(i))
self.UI_Elements["Renk_%s_Button" % (i)].SetEvent(lambda x = i: self.renk_ayarla(x))
self.UI_Elements["Renk_%s_Button" % (i)].Show()
def KalanKarakterSayisi(self):
text = self.Sohbet_Hatti.GetText()
self.KalanKarakter.SetText("%d/%d" % (len(text), self.KarakterSayisi))
def Close(self): #Kapatma
chat.ClearWhisper(self.targetName)
if app.ENABLE_YAZIYOR_SISTEMI:
if whisper.IsSended(self.targetName) and self.targetName:
whisper.Remove(self.targetName)
self.titleNameEdit.KillFocus()
if app.YENILENMIS_FISILTI_SISTEMI:
self.titleNameEditBar.Hide()
self.Kabul_Et.Hide()
self.Sohbet_Hatti.KillFocus()
self.UI_Elements["arkaplan"].Hide()
self.Hide()
if None != self.eventClose:
self.eventClose(self.targetName)
def ReportViolentWhisper(self):
net.SendChatPacket("/reportviolentwhisper " + self.targetName)
def IgnoreTarget(self):
net.SendChatPacket("/ignore " + self.targetName)
def AcceptTarget(self):
name = self.titleNameEdit.GetText()
if len(name) <= 0:
self.Close()
return
if None != self.eventAcceptTarget:
self.titleNameEdit.KillFocus()
self.eventAcceptTarget(name)
def OnScroll(self):
chat.SetWhisperPosition(self.targetName, self.scrollBar.GetPos())
if app.ENABLE_YAZIYOR_SISTEMI:
def SetTimer(self):
self.endTime = time.clock() + 0.4
def OnUpdate(self):
self.KalanKarakterSayisi()
if self.targetName and self.Sohbet_Hatti:
if len(self.Sohbet_Hatti.GetText()) > 0 and not whisper.IsSended(self.targetName):
whisper.Add(self.targetName)
elif not len(self.Sohbet_Hatti.GetText()) > 0 and whisper.IsSended(self.targetName):
whisper.Remove(self.targetName)
if whisper.CheckName(self.targetName):
self.yaziyor.Show()
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
if len(self.yaziyor.GetText()) - len(b_name) < 3:
self.yaziyor.SetText(self.yaziyor.GetText() + ".")
else:
self.yaziyor.SetText(b_name)
self.SetTimer()
else:
self.yaziyor.Hide()
if app.YENILENMIS_FISILTI_SISTEMI:
def InitializeProfileData(self):
self.job = -1
self.level = -1
self.empire = -1
self.guild = ""
self.language = ""
self.status = ""
self.location = ""
self.year = ""
self.month = ""
self.day = ""
self.lastSentenceStack = []
self.lastSentencePos = 0
def OnIMEKeyDown(self, key):
if app.VK_UP == key:
self.__PrevLastSentenceStack()
return TRUE
if app.VK_DOWN == key:
self.__NextLastSentenceStack()
return TRUE
return FALSE
def __PrevLastSentenceStack(self):
if self.lastSentenceStack and self.lastSentencePos < len(self.lastSentenceStack):
self.lastSentencePos += 1
lastSentence = self.lastSentenceStack[- self.lastSentencePos]
self.Sohbet_Hatti.SetText(lastSentence)
self.Sohbet_Hatti.SetEndPosition()
def __NextLastSentenceStack(self):
if self.lastSentenceStack and self.lastSentencePos > 1:
self.lastSentencePos -= 1
lastSentence = self.lastSentenceStack[- self.lastSentencePos]
self.Sohbet_Hatti.SetText(lastSentence)
self.Sohbet_Hatti.SetEndPosition()
def __PushLastSentenceStack(self, text):
if len(text) <= 0:
return
LAST_SENTENCE_STACK_SIZE = 32
if len(self.lastSentenceStack) > LAST_SENTENCE_STACK_SIZE:
self.lastSentenceStack.pop(0)
self.lastSentenceStack.append(text)
def OnSelectEmoticon(self, key):
self.Sohbet_Hatti.SetText("%s %s" % (self.Sohbet_Hatti.GetText(), uiContact.DICTIONARY['EMOTICONS_KEY_LIST'][key]))
self.Sohbet_Hatti.OnSetFocus()
def RecvWhisperProfile(self, job, level, empire, guild, language, status, location, year, month, day):
def get(text):
if not text:
return localeInfo.PROFILE_SELECT_DEFAULT
return text
self.job = job
self.level = level
self.empire = empire
self.guild = guild
self.language = language
self.status = status
self.location = location
self.year = year
self.month = month
self.day = day
if empire in uiContact.DICTIONARY['EMPIRE_IMAGE_LIST']:
self.Fisilti_Bayrak_Iconu.LoadImage(uiContact.DICTIONARY['EMPIRE_IMAGE_LIST'][empire])
if job in uiContact.DICTIONARY['FACE_IMAGE_LIST']:
self.Fisilti_karakter_iconlari.LoadImage(uiContact.DICTIONARY['FACE_IMAGE_LIST'][job])
if language:
self.Fisilti_Dil_Iconu.LoadImage(uiContact.DICTIONARY['LANGUAGE_IMAGE_STRING'] % (language))
self.Fisilti_Isim.SetText(str(self.targetName))
self.Fisilti_Level.SetText(str(level))
self.Fisilti_Lonca.SetText(str(guild))
self.Fisilti_Dogum_Gunu.SetText("%s/%s/%s" % (get(year), get(month), get(day)))
if len(location) > 19:
location = location[:16] + "..."
if len(status) > 19:
status = status[:16] + "..."
self.Fisilti_Konum_Yer.SetText(str(location))
self.Fisilti_Durum.SetText(str(status))
def renk_ayarla(self, yeni_renk):
self.Rengimrengim = yeni_renk
self.Sohbet_Hatti.SetText("%s" % (self.Renkler[self.Renksec.index(self.Rengimrengim)]))
def SendWhisper(self):
text = self.Sohbet_Hatti.GetText()
textLength = len(text)
text = text + " "
# Emoticoane start
if ':) ' in text: #lion patch
text = text.replace(":) "," |Eemoji/smile_1|e ")
if ':))' in text:
text = text.replace(":))"," |Eemoji/laugh_1|e ")
if ':( ' in text:
text = text.replace(":( "," |Eemoji/sad_1|e ")
if ':((' in text:
text = text.replace(":(("," |Eemoji/cry_1|e ")
if ';)' in text:
text = text.replace(";)"," |Eemoji/blink_1|e ")
if ':x' in text:
text = text.replace(":x"," |Eemoji/love_1|e ")
if ':X' in text:
text = text.replace(":X"," |Eemoji/love_1|e ")
if ':d ' in text:
text = text.replace(":d "," |Eemoji/teeth_1|e ")
if ':D ' in text:
text = text.replace(":D "," |Eemoji/teeth_1|e ")
if ':p' in text:
text = text.replace(":p"," |Eemoji/tongue_1|e ")
if ':P' in text:
text = text.replace(":P"," |Eemoji/tongue_1|e ")
if ':dislike' in text:
text = text.replace(":dislike"," |Eemoji/dislike_1|e ")
if ':angry' in text:
text = text.replace(":angry"," |Eemoji/angry_1|e ")
if ':face' in text:
text = text.replace(":face"," |Eemoji/facepalm_1|e ")
if ':wow' in text:
text = text.replace(":wow"," |Eemoji/wow_1|e ")
if ':hm' in text:
text = text.replace(":hm"," |Eemoji/hm_1|e ")
if ':kiss' in text:
text = text.replace(":kiss"," |Eemoji/kiss_1|e ")
if ':zzz' in text:
text = text.replace(":zzz"," |Eemoji/zzz_1|e ")
if textLength > 0:
if net.IsInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
return
net.SendWhisperPacket(self.targetName, text)
self.Sohbet_Hatti.SetText("")
if app.YENILENMIS_FISILTI_SISTEMI:
self.__PushLastSentenceStack(text)
chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, "%s %s : %s" % (uiContact.GetWhisperSendedTime(), player.GetName(), text))
else:
chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + " : " + text)
def OnTop(self):
if self.Sohbet_Hatti:
self.Sohbet_Hatti.SetFocus()
def BindInterface(self, interface):
self.interface = interface
def OnMouseLeftButtonDown(self):
hyperlink = ui.GetHyperlink()
if hyperlink:
if app.IsPressed(app.DIK_LALT):
link = chat.GetLinkFromHyperlink(hyperlink)
ime.PasteString(link)
else:
self.interface.MakeHyperlinkTooltip(hyperlink)
if "__main__" == __name__:
import uiTest
class TestApp(uiTest.App):
def OnInit(self):
wnd = WhisperDialog(self.OnMax, self.OnMin)
wnd.LoadDialog()
wnd.OpenWithoutTarget(self.OnNew)
wnd.SetPosition(0, 0)
wnd.Show()
self.wnd = wnd
def OnMax(self):
pass
def OnMin(self):
pass
def OnNew(self):
pass
TestApp().MainLoop()