Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add XEH DisplayLoad and DisplayUnload events #264

Merged
merged 7 commits into from
Feb 20, 2016

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Feb 17, 2016

  • adds Extended_DisplayLoad_EventHandlers and Extended_DisplayUnload_EventHandlers with a syntax close to the original XEH configs.
  • this is done by replacing BIS_fnc_initDisplay with a custom wrapper function, that includes the original function and adds additional code.
  • BIS_fnc_initDisplay is the only function BI uses with the onLoad and onUnload events. Almost all important displays use it for their ui scripting framework that unfortunately is not usable for modders at all.
  • they can be used in missions or addon configs.

Example:

class Extended_DisplayLoad_EventHandlers {
    class RscDisplayInventory {
        Test = "systemChat str ['load', _this]";
    };
};

class Extended_DisplayUnload_EventHandlers {
    class RscDisplayInventory {
        Test = "systemChat str ['unload', _this]";
    };
};

this prints debug into the chat when opening and closing the inventory.

  • removes the PFH (diagnostic.pbo) that was checking every frame if the debug console was opened. The PFH was also running in MP where the debug console was disabled. It now uses a DisplayLoad event instead.
  • enables the extended debug console in editor (2d and 3d)
  • removes the onMouseEnter hack for help.pbo (help\mm_spc_init.sqf) that was used as pseudo "ControlLoad" event. The hack was based on creating an invisivle control over the whole screen that detects the creation of the cursor. It had some problems when the cursor was generated above another control that is in front of the dummy control or when the cursor was created at the border of the screen. Now uses two DisplayLoad events instead.

@commy2 commy2 added this to the 2.3.1 milestone Feb 17, 2016
Killswitch00 added a commit that referenced this pull request Feb 20, 2016
add XEH DisplayLoad and DisplayUnload events
@Killswitch00 Killswitch00 merged commit ac567ab into master Feb 20, 2016
@thojkooi thojkooi deleted the xehdisplayloadunloadevents branch April 25, 2016 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants