Verse Library verse

01 Snippet

Provides helper functions to quickly generate UI margins and anchors for easier Fortnite Creative interface layout.

extracted-snippets/community/snippets/LzW5/fortnite-easy-margin-control/01-snippet.verse

# Source URL: https://dev.epicgames.com/community/snippets/LzW5/fortnite-easy-margin-control
# Local doc:  epic-docs/community/snippets/LzW5/fortnite-easy-margin-control.md
  using { /Fortnite.com/Devices }
  using { /Verse.org/Simulation }
  using { /UnrealEngine.com/Temporary/Diagnostics }
  using { /UnrealEngine.com/Temporary/UI }
  using { /UnrealEngine.com/Temporary/SpatialMath }
  #Created By 'strelloke' from IC_studio_X
  Anchors(Minmum : vector2, Maximum : vector2):anchors=return anchors{Minimum:= Minmum, Maximum:= Maximum}
  Anchors(MinmumX : float, MinmumY : float, MaximumX : float, MaximumY : float):anchors=return Anchors(vector2{X:=MinmumX, Y:=MinmumY}, vector2{X:=MaximumX, Y:=MaximumY})
  Margin := module:
  MarginFunction<public>(TLeft : float, TTop : float, TRight : float, TBottom : float):margin = return margin{Left:= TLeft, Top:= TTop, Right:= TRight, Bottom:= TBottom}
  All<public>(TAll : float): margin = return MarginFunction(TAll, TAll, TAll, TAll)
  HorizontalVertical<public>(THorizontal : float, TVertical : float): margin = return MarginFunction(THorizontal, TVertical, THorizontal, TVertical)
  Horizontal<public>(THorizontal : float): margin = return MarginFunction(THorizontal, 0.0, THorizontal, 0.0)
  Vertical<public>(TVertical : float): margin = return MarginFunction(0.0, TVertical, 0.0, TVertical)
  Left<public>(TLeft : float):margin = return MarginFunction(TLeft, 0.0, 0.0, 0.0)
  Top<public>(TTop : float):margin = return MarginFunction(0.0, TTop, 0.0, 0.0)
  Right<public>(TRight : float):margin = return MarginFunction(0.0, 0.0, TRight, 0.0)
  Bottom<public>(TBottom : float):margin = return MarginFunction(0.0, 0.0, 0.0, TBottom)
  NotLeft<public>(NotTLeft : float):margin = return MarginFunction(0.0, NotTLeft, NotTLeft, NotTLeft)
  NotTop<public>(NotTTop : float):margin = return MarginFunction(NotTTop, 0.0, NotTTop, NotTTop)
  NotRight<public>(NotTRight : float):margin = return MarginFunction(NotTRight, NotTRight, 0.0, NotTRight)
  NotBottom<public>(NotTBottom : float):margin = return MarginFunction(NotTBottom, NotTBottom, NotTBottom, 0.0)

  Expand code  Copy full snippet(31 lines long)
* ```
  |  |  |
  | --- | --- |
  |  | #Created By 'strelloke' from IC_studio_X |

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in