GPCracker Posted July 24, 2016 Share Posted July 24, 2016 Ещё вопрос: при нажатии кнопки сайт открывался бы не в браузере, а в ангаре (в своём окне)Открываешь тему с ангарным браузером и внимательно читаешь. Там все подробно расписано, каким кодом его можно вызвать. @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted July 24, 2016 Author Share Posted July 24, 2016 Спасибо БОЛЬШОЕ!!! Ещё вопрос: при нажатии кнопки сайт открывался бы не в браузере, а в ангаре (в своём окне) http://www.koreanrandom.com/forum/topic/32482-%D0%BD%D0%B5-%D0%BE%D1%82%D0%BA%D1%80%D1%8B%D0%B2%D0%B0%D0%B5%D1%82%D1%81%D1%8F-%D0%B1%D1%80%D0%B0%D1%83%D0%B7%D0%B5%D1%80-%D0%B2-%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B5-%D0%B8%D0%B3%D1%80%D1%8B/?do=findComment&comment=334676 1 @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted July 24, 2016 Share Posted July 24, 2016 http://www.koreanrandom.com/forum/topic/32482-%D0%BD%D0%B5-%D0%BE%D1%82%D0%BA%D1%80%D1%8B%D0%B2%D0%B0%D0%B5%D1%82%D1%81%D1%8F-%D0%B1%D1%80%D0%B0%D1%83%D0%B7%D0%B5%D1%80-%D0%B2-%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B5-%D0%B8%D0%B3%D1%80%D1%8B/?do=findComment&comment=334676 Блин, вообще не получается. 4 часа сижу. Блин, вообще не получается. 4 часа сижу. Спасибо, всё работает! А как сделать кнопку по центру? @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted July 24, 2016 Share Posted July 24, 2016 (edited) А как сделать кнопку по центру?открой net.wg.gui.notification.vo::ButtonVO и смотри свойства.вот они: public var type:String = ""; public var label:String = ""; public var action:String = ""; public var width:Number = 122;Нет здесь никаких выравниваний......если мы об одних и тех же центрах подумали) Edited July 24, 2016 by ShadowHunterRUS @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted July 28, 2016 Author Share Posted July 28, 2016 Блин, вообще не получается. 4 часа сижу. Спасибо, всё работает! А как сделать кнопку по центру? Блин, вообще не получается. 4 часа сижу. Спасибо, всё работает! А как сделать кнопку по центру? кнопку в центре уведомлений или где? @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted August 22, 2016 Share Posted August 22, 2016 (edited) Добрый день! Не подскажете как сделать сообщение более приоритетней, чтобы отображалось как можно выше? # Embedded file name: mod_clikimport BigWorldfrom notification.NotificationListView import NotificationListViewfrom notification.settings import NOTIFICATION_BUTTON_STATEfrom gui.SystemMessages import SM_TYPEfrom adisp import process @processdef openBrowserWindow(url, title): from gui import game_control width = 990 height = 550 browserSize = [width, height] yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True) old_populate = NotificationListView._populate def new_populate(self): message = {'typeID': 1, 'message': {'bgIcon': '', 'defaultIcon': '', 'savedData': 0, 'timestamp': -1, 'filters': [], 'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN}, 'buttonsLayout': [{'action': 'action_1', 'type': 'submit', 'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c', 'width': 100}, {'action': 'action_2', 'type': 'cancel', 'label': 'Button 2', 'width': 100}], 'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG', 'type': 'black', 'icon': 'img://../icons/SG.png'}, 'entityID': 99999, 'auxData': ['GameGreeting']} old_populate(self) self.as_appendMessageS(message) NotificationListView._populate = new_populateold_onClickAction = NotificationListView.onClickAction def new_onClickAction(self, typeID, entityID, action): if action == 'action_1': openBrowserWindow('https://?url=ya-disk-public%2FzQ%2BixpkQPkBLxjSdk%2B1vUIYT%2FnITuvj7140U9A%3D&name=%20informuiyn.docx&c=7508c0090d''\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\cd0\xb8\xd1\x8f') elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) NotificationListView.onClickAction = new_onClickAction Edited August 22, 2016 by sergey spb @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 Добрый день! Не подскажете как сделать сообщение более приоритетней, чтобы отображалось как можно выше? # Embedded file name: mod_clik import BigWorld from notification.NotificationListView import NotificationListView from notification.settings import NOTIFICATION_BUTTON_STATE from gui.SystemMessages import SM_TYPE from adisp import process @process def openBrowserWindow(url, title): from gui import game_control width = 990 height = 550 browserSize = [width, height] yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True) old_populate = NotificationListView._populate def new_populate(self): message = {'typeID': 1, 'message': {'bgIcon': '', 'defaultIcon': '', 'savedData': 0, 'timestamp': -1, 'filters': [], 'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN}, 'buttonsLayout': [{'action': 'action_1', 'type': 'submit', 'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c', 'width': 100}, {'action': 'action_2', 'type': 'cancel', 'label': 'Button 2', 'width': 100}], 'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG', 'type': 'black', 'icon': 'img://../icons/SG.png'}, 'entityID': 99999, 'auxData': ['GameGreeting']} old_populate(self) self.as_appendMessageS(message) NotificationListView._populate = new_populate old_onClickAction = NotificationListView.onClickAction def new_onClickAction(self, typeID, entityID, action): if action == 'action_1': openBrowserWindow('https://docviewer.yandex.ru/?url=ya-disk-public%3A%89F%2FzQ%2BixpkQPkBLxjSdk%2B5hLdC1vUIYT%2FnITuvj7140U9A%3D&name=%20information.docx&c=5787508c0090d''\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\cd0\xb8\xd1\x8f') elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) NotificationListView.onClickAction = new_onClickAction self.as_appendMessageS(message)Пропиши выше вызова old.. @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted August 22, 2016 Share Posted August 22, 2016 self.as_appendMessageS(message) Пропиши выше вызова old.. Не подскажешь как? @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 Не подскажешь как?self.as_appendMessageS(message)old_populate(self) @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted August 22, 2016 Share Posted August 22, 2016 @Ekspoint, а может еще стоит поиграться с entityID? @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 @Ekspoint, а может еще стоит поиграться с entityID?от этого не зависит :) @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted August 22, 2016 Share Posted August 22, 2016 self.as_appendMessageS(message) old_populate(self) Спасибо! Но нет не отображается сверху. @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 Спасибо! Но нет не отображается сверху.хм, у меня в моде кттс так сделано и норм, приду гляню как надо точно делать @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted August 22, 2016 Share Posted August 22, 2016 хм, у меня в моде кттс так сделано и норм, приду гляню как надо точно делать Спасибо! Совсем не по теме, может знаешь? Сообщение в чате, чтобы сообщение в чате отображалось поверх playersPanel.xc (как раньше), а не за ней? @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 (edited) Спасибо! Совсем не по теме, может знаешь? Сообщение в чате, чтобы сообщение в чате отображалось поверх playersPanel.xc (как раньше), а не за ней? не знаю # Embedded file name: mod_test import BigWorld from notification.NotificationListView import NotificationListView from notification.settings import NOTIFICATION_BUTTON_STATE from gui.SystemMessages import SM_TYPE from adisp import process @process def openBrowserWindow(url, title): from gui import game_control width = 990 height = 550 browserSize = [width, height] yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True) def new_populate(self): message = {'typeID': 1, 'message': {'bgIcon': '', 'defaultIcon': '', 'savedData': None, 'timestamp': -1, 'filters': [], 'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN}, 'buttonsLayout': [{'action': 'action_1', 'type': 'submit', 'label': 'Открыть', 'width': 100}, {'action': 'action_2', 'type': 'cancel', 'label': 'Button 2', 'width': 100}], 'message': 'Информация ModPackSG', 'type': 'black', 'icon': 'img://../icons/SG.png'}, 'entityID': 99999, 'auxData': ['GameGreeting']} self.as_appendMessageS(message) old_populate(self) return old_populate = NotificationListView._populate NotificationListView._populate = new_populate def new_onClickAction(self, typeID, entityID, action): if action == 'action_1': openBrowserWindow('https://?url=ya-disk...x&c=7508c0090dИнформац\\cd0?я') elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) old_onClickAction = NotificationListView.onClickAction NotificationListView.onClickAction = new_onClickAction как видишь первым стоит Edited August 22, 2016 by Ekspoint @ Quote Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted August 22, 2016 Share Posted August 22, 2016 В NotificationsListMeta.as_setMessagesListS перебираешь список список отображаемых сообщений в ЦУ и вставляешь в нужное тебе место свое. @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 В NotificationsListMeta.as_setMessagesListS перебираешь список список отображаемых сообщений в ЦУ и вставляешь в нужное тебе место свое. а у меня просто @hookMethod.overrideMethod(NotificationListView, '_populate') def NotificationListView_populate(base, self): if configs.data['priority_notification'] == 'low': base(self) BigWorld.callback(0, lambda: self.as_appendMessageS(messages())) elif configs.data['priority_notification'] == 'standard': base(self) self.as_appendMessageS(messages()) elif configs.data['priority_notification'] == 'high': self.as_appendMessageS(messages()) base(self) @ Quote Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted August 22, 2016 Share Posted August 22, 2016 >а у меня просто Ну ты так добавляешь до или после, а переборкой можно поставить 2 или 3 или по желанию ;-) @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted August 22, 2016 Author Share Posted August 22, 2016 Ну ты так добавляешь до или после, а переборкой можно поставить 2 или 3 или по желанию ;-) это как? @ Quote Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted August 22, 2016 Share Posted August 22, 2016 def as_setMessagesListS(self, value): return self.flashObject.as_setMessagesList(value) if self._isDAAPIInited() else None value - это просто список где 1 элемент - выводимое собщение. Вставляешь в нужно место свое и все. @ 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.