static public int get_slider(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); pushValue(l, true); pushValue(l, self.slider); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int ScrollPageDown(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); self.ScrollPageDown(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int Adjust(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); System.Single a1; checkType(l, 2, out a1); self.Adjust(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_enabled(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); bool v; checkType(l, 2, out v); self.enabled = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_direction(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); UnityEngine.Experimental.UIElements.Slider.Direction v; checkEnum(l, 2, out v); self.direction = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int PropagateEnabled(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller self = (UnityEngine.Experimental.UIElements.Scroller)checkSelf(l); UnityEngine.Experimental.UIElements.VisualContainer a1; checkType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); self.PropagateEnabled(a1, a2); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public ScrollView(Vector2 horizontalScrollerValues, Vector2 verticalScrollerValues) { this.horizontalScrollerValues = horizontalScrollerValues; this.verticalScrollerValues = verticalScrollerValues; contentViewport = new VisualElement() { name = "ContentViewport" }; contentViewport.clippingOptions = ClippingOptions.ClipContents; shadow.Add(contentViewport); // Basic content container; its constraints should be defined in the USS file m_ContentContainer = new VisualElement() { name = "ContentView" }; contentViewport.Add(m_ContentContainer); horizontalScroller = new Scroller(horizontalScrollerValues.x, horizontalScrollerValues.y, (value) => { scrollOffset = new Vector2(value, scrollOffset.y); UpdateContentViewTransform(); }, Slider.Direction.Horizontal) { name = "HorizontalScroller", persistenceKey = "HorizontalScroller" }; shadow.Add(horizontalScroller); verticalScroller = new Scroller(verticalScrollerValues.x, verticalScrollerValues.y, (value) => { scrollOffset = new Vector2(scrollOffset.x, value); UpdateContentViewTransform(); }, Slider.Direction.Vertical) { name = "VerticalScroller", persistenceKey = "VerticalScroller" }; shadow.Add(verticalScroller); RegisterCallback <WheelEvent>(OnScrollWheel); contentContainer.RegisterCallback <PostLayoutEvent>(OnGeometryChanged); }
public ScrollView() { contentViewport = new VisualElement() { name = "ContentViewport" }; contentViewport.style.overflow = StyleEnums.Overflow.Hidden; shadow.Add(contentViewport); // Basic content container; its constraints should be defined in the USS file AssignContentContainer(new VisualElement { name = "ContentView" }); const int defaultMinScrollValue = 0; const int defaultMaxScrollValue = 100; horizontalScroller = new Scroller(defaultMinScrollValue, defaultMaxScrollValue, (value) => { scrollOffset = new Vector2(value, scrollOffset.y); UpdateContentViewTransform(); }, SliderDirection.Horizontal) { name = "HorizontalScroller", persistenceKey = "HorizontalScroller", visible = false }; shadow.Add(horizontalScroller); verticalScroller = new Scroller(defaultMinScrollValue, defaultMaxScrollValue, (value) => { scrollOffset = new Vector2(scrollOffset.x, value); UpdateContentViewTransform(); }, SliderDirection.Vertical) { name = "VerticalScroller", persistenceKey = "VerticalScroller", visible = false }; shadow.Add(verticalScroller); RegisterCallback <WheelEvent>(OnScrollWheel); scrollOffset = Vector2.zero; }
static public int constructor(IntPtr l) { try { UnityEngine.Experimental.UIElements.Scroller o; System.Single a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); System.Action <System.Single> a3; LuaDelegation.checkDelegate(l, 4, out a3); UnityEngine.Experimental.UIElements.Slider.Direction a4; checkEnum(l, 5, out a4); o = new UnityEngine.Experimental.UIElements.Scroller(a1, a2, a3, a4); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }