Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Fixed cursor tracking, fixed hovering system and more #16

Merged
merged 2 commits into from
Dec 5, 2016

Conversation

axelbm
Copy link
Contributor

@axelbm axelbm commented Dec 4, 2016

Updated getCursorPos

  • More accurate
  • It does not detect any more from the back side
  • Added a range restriction

Updated pointInsidePanel

  • Now ignore not visible panels

Updated checkHover

  • Improve the the hovering

Added vgui.MaxRange3D2D(range)

  • To set the max interactive range of a panel
Example:
vgui.Start3D2D(pos, ang, scale)
	vgui.MaxRange3D2D(75)
	panel:Paint3D2D()
vgui.End3D2D()

Added vgui.IsPointingPanel(panel)

  • Return true if the player aim the panel
  • Do not use in vgui.Start3D2D

Uniformized the code style

  • It just my personal preference and I found that more clean with the same style.

That's it!

Updated checkhover
Added vgui.IsPointingPanel
Uniformized the code style
@handsomematt
Copy link
Owner

Very nice

@handsomematt handsomematt merged commit d493ab6 into handsomematt:master Dec 5, 2016
@MattJeanes
Copy link
Contributor

This is awesome man, thanks! 😄

@handsomematt
Copy link
Owner

Anyone know if this fixes any of the open issues?

@MattJeanes
Copy link
Contributor

@axelbm's comment on #9 suggests this is fixed now

@handsomematt
Copy link
Owner

Oops, seems he fixed that a while ago in a different PR. If someone could test if #3 is still an issue with these changes would be great.

@MattJeanes
Copy link
Contributor

I'll give it a bash in a minute

@MattJeanes
Copy link
Contributor

Doesn't look like that's fixed. Panel doesn't appear to move at all on the latest version when holding E and dragging the title bar. Tested using your 3d2dsample2.lua

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants