安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题








Thanks, I'll take a look.
I was actually talking about you guys incorporating my code, not the other way around.
However, I am attempting to make mine compatible with Toolbox by hooking into PostSquadSelectInit. How do I go about doing that? I'm trying to use XEVENTMGR.RegisterForEvent. Hopefully that is the correct way
Also, can I register for the event in the OnInit handler of the ScreenListner extension whose defualt properites sets ScreenClass=class'UISquadSelect'? Can I even use that technique given that Toolbox overrides the built in UISquadSelect class?
Aleternately, is the correct way to create a second class that extends UIScreenListerner without a ScreenClass assignment? And then it's in that class where the event listener is registered?
I just need help understanding how to hook into your event triggered in a class that overwrites a built in screen class.
Thanks.
Alex
One method is to set up your screen listener with a ScreenClass == none and then do filtering within OnInit, etc. The filter looks like if(UISquadSelect(Screen) != none). I've used this, and it will automatically detect UISquadSelect or any extension of it.
Another method is to use one of the new X2EventManager TriggerEvent methods that I've added in various places in Toolbox to improve interoperability. This method was used with the (updated) LeaderPack mod to make that compatible. LeaderPack had its own UIScreenListener on UISquadSelect for the leader-related UI bits, and I used the Triggered Events to implement the same functionality.
If you look through the LeaderPack code, inside the class UIStrategyScreenListener_LWOfficerPack is an example where I've set up 8 different RegisterForEvent methods to listen for events generated by Toolbox.
Note that LeaderPack was updated with these changes over a month ago, so a little while before Toolbox release! :). So that design functions fine with or without Toolbox. If Toolbox isn't present, the UISquadSelect listener kicks in and LeaderPack does its thing, and the RegisteredEvents never activate because they aren't triggered. If Toolbox IS present, then the UISquadSelect listener doesn't activate, but the functionality is handled through the Events.
Excellent. That is exactly what I needed.
Thanks,
Alex