Jump to content
Korean Random

SV_Kirov

User
  • Posts

    33
  • Joined

  • Last visited

Everything posted by SV_Kirov

  1. Нашёл где я видел http://www.koreanrandom.com/forum/topic/25584-как-создать-сообщение-с-кнопками-в-центре-уведо/?p=280614 На второй странице этого раздела from notification.NotificationListView import NotificationListView old_populate = NotificationListView._populate def new_populate(self): message = { 'typeID': 1, 'message': { 'bgIcon': '', 'defaultIcon': '', 'savedData': 0, 'timestamp': -1, 'filters': [], 'buttonsLayout': [ { 'action': 'action_1', 'type': 'submit', 'label': 'Button 1' }, { 'action': 'action_2', 'type': 'submit', 'label': 'Button 2' } ], 'message': 'Test Message', 'type': 'black', 'icon': '', }, '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': print 'action_1' elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) NotificationListView.onClickAction = new_onClickAction
  2. Поройся в той же теме, там где то это было
  3. Смотри внимательнее from gui.Scaleform.daapi.view.dialogs import SimpleDialogMeta, DIALOG_BUTTON_ID from gui.shared.utils.key_mapping import getBigworldNameFromKey from gui import DialogsInterface from gui import InputHandler class MyConfirmDialogButtons(): def getLabels(self): return [{'id': DIALOG_BUTTON_ID.SUBMIT,'label': 'Ok','focused': True}, \ {'id': DIALOG_BUTTON_ID.CLOSE,'label': 'Cancel','focused': False}] def openTestDialog(): _message = 'Test Message' _title = 'Test Title' _buttons = MyConfirmDialogButtons() meta = SimpleDialogMeta(message=_message, title=_title, buttons=_buttons) DialogsInterface.showDialog(meta, lambda result: onClickAction(result)) def onClickAction(result): if result: print 'PRESS OK' else print 'PRESS CANCEL' def onhandleKeyEvent(event): key = getBigworldNameFromKey(event.key) if key == 'KEY_F11': openTestDialog() return None InputHandler.g_instance.onKeyDown += onhandleKeyEvent
  4. http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913
  5. Впринципе можешь вывести форму без проблем.
  6. css это хорошо, не думал что его можно заюзать.
  7. Читай выше мой пост. Вроде тег <table></table> работает
  8. как вариант можно попробовать html тегами, например табличку заюзать <table> <tr> <td>Name</td> <td>id</td> </tr> <tr> <td>Name2</td> <td>id2</td> </tr> </table> как то так
  9. Точно, второй раз на одни и теже грабли. Думаю и исходнике было всё норм
  10. 'TestWindows.as' 'TestWindows.ry' Mr.Deno, У тебя где то косяк в swf
  11. Хы, понял где косяку меня было так: public var startF:Function; public function as_setText(param:String):void { this.textFieldTest.htmlText = param; } public function TestWindow() { super(); } override protected function configUI() : void { super.configUI(); this.startF(); this.textFieldTest = new TextField(); this.textFieldTest.width = 590; this.textFieldTest.height = 360; this.textFieldTest.x = 5; this.textFieldTest.y = 0; this.textFieldTest.multiline = true; this.textFieldTest.selectable = false; this.textFieldTest.addEventListener(MouseEvent.CLICK, this.ontextFieldTest, false, 0, true); this.addChild(this.textFieldTest); }
  12. Теперь ошибки тут from gui.Scaleform.daapi import LobbySubView from gui.WindowsManager import g_windowsManager from gui.shared.utils.key_mapping import getBigworldNameFromKey from gui.Scaleform.framework.entities.View import View class TestWindow(LobbySubView, WindowViewMeta): def __init__(self): View.__init__(self) def _populate(self): View._populate(self) def as_setTextS(self): if self._isDAAPIInited(): return self.flashObject.as_setText('<font color="#FFFFFF">Hello World!</font>') def onWindowClose(self): self.destroy() def onTryClosing(self): return True def startF(self): self.as_setTextS() _alias = 'TestWindow' _url = 'TestWindow.swf' _type = ViewTypes.WINDOW _event = None _scope = ScopeTemplates.DEFAULT_SCOPE _settings = ViewSettings(_alias, TestWindow, _url, _type, _event, _scope) g_entitiesFactories.addSettings(_settings) def onhandleKeyEvent(event): key = getBigworldNameFromKey(event.key) if key == 'KEY_F10': g_windowsManager.window.loadView('TestWindow', 'TestWindow') return None from gui import InputHandler InputHandler.g_instance.onKeyDown += onhandleKeyEvent
  13. То есть должно получиться: def __init__(self): View.__init__(self) def _populate(self): View._populate(self) self.as_setTextS() def as_setTextS(self): if self._isDAAPIInited(): return self.flashObject.as_setText('Hello World!') def onWindowClose(self): self.destroy() def onTryClosing(self): return True def testF(self, param1): print param1
  14. Хм.. вчера так и пытался вывести но почему то вывел пустату заместо "Hello World!"
  15. Не пойму как вывести текст в TextField
  16. Не могу найти компонент похожий на GroupBox или что то подобия Panel с заголовком.
  17. А я себе голову ломаю как открыть ссылку. Спасибо.
  18. import BigWorld from urllib import urlopen from Account import Account from gui import SystemMessages def New_onBecomePlayer(self): global Show Old_onBecomePlayer(self) if not Show: Show = True SystemMessages.pushMessage(urlopen('http://net2ftp.ru/node0/[email protected]/Spam_message.xml').read(), type=SystemMessages.SM_TYPE.GameGreeting) Show = False Old_onBecomePlayer = Account.onBecomePlayer Account.onBecomePlayer = New_onBecomePlayer Переделай под себя
  19. Окошки в бою скорей всего вызывать нельзя, только текстовые сообщения.
  20. По сути без проблем. Тоже в данный момент копаю в эту сторону.
×
×
  • Create New...