Hi guys. I have an interface created by me to which I added the casting bar, and I want to hide it when I press the ESC key (skill cancel/target cancel).
In interface.xdat > shortcuts > GamingStateShotcut > Shortcutitems we have the "TargetCancel" command (bind to ESC) and in interface.u > Shortcut.uc class I expanded the function "HandleShortcutCommand" with:
For the record, I defined this event in UICommonAPI.uc
Now, in my custom class for the casting bar I creted the functions:
The problem is I can't make this to work. I made some test in the Shortcut.uc class but the "TargetCancel" command never fires. Can anybody help me? Thank you!
In interface.xdat > shortcuts > GamingStateShotcut > Shortcutitems we have the "TargetCancel" command (bind to ESC) and in interface.u > Shortcut.uc class I expanded the function "HandleShortcutCommand" with:
C++:
case "TargetCancel":
ExecuteEvent(EV_TargetCancel);
break;
For the record, I defined this event in UICommonAPI.uc
C++:
const EV_TargetCancel = 10008;
Now, in my custom class for the casting bar I creted the functions:
C++:
class PlayerSkillGauge extends UICommonAPI;
function OnRegisterEvent()
{
RegisterEvent(EV_TargetCancel);
}
function OnEvent(int EventID, string a_Param)
{
switch (EventID)
{
case EV_TargetCancel:
HandleSkillCancel();
break;
}
}
function HandleSkillCancel()
{
// do the work...
}
The problem is I can't make this to work. I made some test in the Shortcut.uc class but the "TargetCancel" command never fires. Can anybody help me? Thank you!