Megagrob Posted April 27, 2015 Share Posted April 27, 2015 (edited) Вместо переопределения класса можно сделать хук ок, спасибо. Но в хуке только часть изначальной функции handleAction(). Верхняя часть условий не нужна? А вообще неплохо получилось со ссылками, картошка нервно курит в сторонке. Пока официально не введут поддержку таких ссылок, мод - самое оно. Теперь разобраться как в диалогах такие ссылки делать, и как менять их цвет. Edited April 27, 2015 by Megagrob @ Quote Link to comment Short link Share on other sites More sharing options...
GPCracker Posted April 27, 2015 Share Posted April 27, 2015 как менять их цвет. <font color="XXXXXX"><a href="event:yyy">link</a></font>Не работает? Но в хуке только часть изначальной функции handleAction(). Верхняя часть условий не нужна?На то он и хук. Потому что он внедряется в цепочку выполнения этого метода. При вызове метода сначала выполняется проверка на ссылку, а если это не ссылка, то выполняется оригинальный код. @ Quote Link to comment Short link Share on other sites More sharing options...
Megagrob Posted April 28, 2015 Share Posted April 28, 2015 (edited) <font color="XXXXXX"><a href="event:yyy">link</a></font> Та это я проверил первым делом, так не работает, она по-умолчанию будет белая. style="color:#FF0000;" тоже не меняет цвет ссылки. А переставить <font> вовнутрь ссылки не попробовал, вот же баран, видимо заработался. Нужно вот так: <a href="event:url"><font color="#XXXXXX">text</font></a> Пример: <a href="event:http://worldofwarplanes.ru/"><font color="#559933">Самолёты</font></a> Edited April 28, 2015 by Megagrob 1 @ Quote Link to comment Short link Share on other sites More sharing options...
GPCracker Posted April 28, 2015 Share Posted April 28, 2015 Теперь разобраться как в диалогах такие ссылки делатьКаких диалогах? Там же тоже должен быть подобный обработчик... @ Quote Link to comment Short link Share on other sites More sharing options...
Megagrob Posted April 28, 2015 Share Posted April 28, 2015 (edited) Каких диалогах? DialogsInterface.showDialog() HTML код с тексте работает, а вот ссылки - нет Edited April 28, 2015 by Megagrob @ Quote Link to comment Short link Share on other sites More sharing options...
Dno__Dna_Na_Dne__Dna Posted June 19, 2015 Share Posted June 19, 2015 Подскажите, как можно вызвать по клику на ссылку игровой браузер типа вот @ Quote Link to comment Short link Share on other sites More sharing options...
Budyx69 Posted June 20, 2015 Share Posted June 20, 2015 Hi together, i Need help for clickable "Teamspeak link". this link: "ts3server://server.com" worked until WoT 0.9.6 since Version 0.9.7 is this link not work. has an idea?? @ Quote Link to comment Short link Share on other sites More sharing options...
GPCracker Posted June 20, 2015 Share Posted June 20, 2015 (edited) since Version 0.9.7 is this link not work."not work" is the worst description of a problem.First, Try to open a console and type "explorer ts3server://server.com" If it not works, problem is in your system, find and fix it before next step Next, Try to use this code in PJOrion import BigWorld BigWorld.wg_openWebBrowser('http://www.google.com')if google site was opened, try to use this import BigWorld BigWorld.wg_openWebBrowser('ts3server://server.com')if it not works - say thanks to WG. Upd. Looks like they blocked all protocols except http and https... Upd2. This code works well in clear python import webbrowser webbrowser.open('ts3server://server.com')But in WoT it is missing and overridedSo copy original module script webbrowser.pyc from python lib folder to game mods scripts folder with changed name And import it and use like import webbrowser_orig webbrowser_orig.open('ts3server://server.com')and file webbrowser.pyc from python27/Lib renamed to webbrowser_orig.pyc in res_mods/{Patch}/scripts/common/Lib folderfor me this works well. Edited June 20, 2015 by GPCracker 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Budyx69 Posted June 20, 2015 Share Posted June 20, 2015 o.k. Thanks WG for blocking :-( @ Quote Link to comment Short link Share on other sites More sharing options...
GPCracker Posted June 20, 2015 Share Posted June 20, 2015 o.k. Thanks WG for blocking :-(Solution founded) 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Budyx69 Posted June 20, 2015 Share Posted June 20, 2015 YEAHHHHHHH great +1 +1 +1 +1 +1 +1 is work many thx @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.