Optimized Panel:IsChildHovered() #946

Merged
merged 1 commit into from Jan 28, 2016

Projects

None yet

4 participants

@KrakenZ
Contributor
KrakenZ commented May 14, 2015

Removed the iDepth parameter, no longer needed.
All instances using the parameter are corrected.

@mookmook mookmook Optimized Panel:IsChildHovered()
Removed the iDepth parameter, no longer needed.
98cf201
@TheFreeman193
Contributor

Looks good and works, panel.lua needs an EOF newline though. Only issue I can see is that some might want control over the number of levels this method looks at, such as looking only for immediate children.

@KrakenZ
Contributor
KrakenZ commented May 14, 2015

Why would it need an EOF newline?
And if you want to look at an immediate children, you simply use child:IsHovered().

@TheFreeman193
Contributor

It's just good practice- it comes from a C/Unix standard for line processing. This explains it.

@willox willox merged commit dc55a94 into garrynewman:master Jan 28, 2016
@KrakenZ KrakenZ deleted the KrakenZ:patch-1 branch Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment