8 Commits over 642 Days - 0.00cph!
DragDrop Server RPCs
Fix cui_test command blocking "Exit" button due to UpdateLabel being full screen
Allow button colors when hovered / pressed to be modified
Add JSON API for Draggables & Slots, add parent options to transform
Added the JSON API required to setup & update Draggables & Slots.
Also added the ability to reparent & order a transform if called via an update call, this is needed to allow reparenting a Draggable
fixed GetComponent for slot
Draggable Component
Slot Component
Draggable Test Json
Update Init fix
Fix Illegal Swapping, Prevent DragRPC
Fix a potential illegal swap when a panel inside a restricted slot was swapped with a non-slotted panel.
Changed DragRPC to not send when a swap/attach operation fails & the panel will reset to its last position,
the change was made because in those situations, a player didnt intend to drag the panel, they intended to attach it.
Fix DragRPC on attachment fail
fixed attachement fail sending a DragRPC, also properly sets the position of panels that can be dropped anywhere
Fix example
Add Callbacks (Used by Animation)
More Robust LimitToParent Approach
the previous approach used offsets, only modifying the position if the new position would be within bounds. this caused awkward behaviour where the dragged object would stop long before its actual bounds.
this was also framerate dependant as it would make bigger leaps on lower framerates, making it more likely that the new position would have been out of bounds and increasing the apparent distance from its bounds
after actually testing the PR in game i've realized it is safe to just use the absolute position (anchor + offset) and to constrain that to the rect with respect to the padding.
Updated Test after rust client testing
adding default sprites and changed some images to use Image instead
Fix parent issues (caching & anchoring)
the draggable now consider's both the parent's position and scale instead of just its scale when determining if its bounds need to be recached - this solves an issue with animated elements having cached old bounds
the anchor now also gets parented based on the parentLimitIndex, previously it was parented to the draggable's initial parent which brought with it unwanted behaviour when that parent was moving
Merge branch 'Facepunch:master' into DragnDrop
Move example to Test folder
Merge branch 'Facepunch:master' into DragnDrop
Merge branch 'master' into DragnDrop
Merge branch 'master' into DragnDrop
Merge pull request #55 from Kulltero/DragnDrop
Adding Drag & Drop Support via Draggables & Slots
Rename Slot -> DraggableSlot to avoid naming conflict, fix compile errors / warnings
Get rid of javascript style braces
Merge branch 'drag_drop'
Get rid of javascript style braces
Rename Slot -> DraggableSlot to avoid naming conflict, fix compile errors / warnings
Add JSON API for Draggables & Slots, add parent options to transform
Added the JSON API required to setup & update Draggables & Slots.
Also added the ability to reparent & order a transform if called via an update call, this is needed to allow reparenting a Draggable
fixed GetComponent for slot
Draggable Component
Slot Component
Draggable Test Json
Update Init fix
Fix Illegal Swapping, Prevent DragRPC
Fix a potential illegal swap when a panel inside a restricted slot was swapped with a non-slotted panel.
Changed DragRPC to not send when a swap/attach operation fails & the panel will reset to its last position,
the change was made because in those situations, a player didnt intend to drag the panel, they intended to attach it.
Fix DragRPC on attachment fail
fixed attachement fail sending a DragRPC, also properly sets the position of panels that can be dropped anywhere
Fix example
Add Callbacks (Used by Animation)
More Robust LimitToParent Approach
the previous approach used offsets, only modifying the position if the new position would be within bounds. this caused awkward behaviour where the dragged object would stop long before its actual bounds.
this was also framerate dependant as it would make bigger leaps on lower framerates, making it more likely that the new position would have been out of bounds and increasing the apparent distance from its bounds
after actually testing the PR in game i've realized it is safe to just use the absolute position (anchor + offset) and to constrain that to the rect with respect to the padding.
Updated Test after rust client testing
adding default sprites and changed some images to use Image instead
Fix parent issues (caching & anchoring)
the draggable now consider's both the parent's position and scale instead of just its scale when determining if its bounds need to be recached - this solves an issue with animated elements having cached old bounds
the anchor now also gets parented based on the parentLimitIndex, previously it was parented to the draggable's initial parent which brought with it unwanted behaviour when that parent was moving
Merge branch 'Facepunch:master' into DragnDrop
Move example to Test folder
Merge branch 'Facepunch:master' into DragnDrop
Merge branch 'master' into DragnDrop
Merge branch 'master' into DragnDrop
Merge pull request #55 from Kulltero/DragnDrop
Adding Drag & Drop Support via Draggables & Slots
Refactor ServerImage.cs to return sprites directly & use ImageRequest class for pending image requests from the server
Update with fixes from Rust repo