AngeliA
Search Results for

    Show / Hide Table of Contents

    Struct GUIScrollScope

    Scope that make GUI elements inside scrolls

    Implements
    IDisposable
    Examples
    using AngeliA;
    
    namespace AngeliaGame;
    
    public class Example {
    
    	static Int2 ScrollPos;
    
    	[OnGameUpdate]
    	internal static void OnGameUpdate () {
    
    		var cameraRect = Renderer.CameraRect;
    
    		using (var scroll = new GUIScrollScope(cameraRect, ScrollPos, new Int2(0, -4096), new Int2(0, 4096))) {
    			ScrollPos = scroll.Position;
    
    			Renderer.Draw(BuiltInSprite.ICON_ENTITY, cameraRect.x + 1024, cameraRect.y, 0, 0, 0, 512, 512);
    			Renderer.Draw(BuiltInSprite.ICON_ENTITY, cameraRect.x + 1024, cameraRect.y + 1024, 0, 0, 0, 512, 512);
    			Renderer.Draw(BuiltInSprite.ICON_ENTITY, cameraRect.x + 1024, cameraRect.y + 2048, 0, 0, 0, 512, 512);
    
    		}
    
    	}
    
    }

    Constructors

    GUIScrollScope(IRect, Int2, Int2, Int2, bool, bool, int)

    Scope that make GUI elements inside scrolls

    Declaration
    public GUIScrollScope(IRect rect, Int2 position, Int2 min, Int2 max, bool mouseWheelForVertical = true, bool reverseMouseWheel = false, int layer = -2147483648)
    Parameters
    Type Name Description
    IRect rect

    Content rect position in global space

    Int2 position

    Scroll position in global space

    Int2 min

    Minimal limitation for the scrolling

    Int2 max

    Maximal limitation for the scrolling

    bool mouseWheelForVertical

    True if the mouse wheel control vertical scroll instead of horizontal

    bool reverseMouseWheel

    True if the mouse wheel scroll should reverse in direction

    int layer

    Which render layer does it scrolls

    Fields

    CellCount

    Declaration
    public readonly int CellCount

    Layer

    Declaration
    public readonly int Layer

    MousePosShift

    Declaration
    public readonly Int2 MousePosShift

    Position

    Declaration
    public readonly Int2 Position

    PrevMouseInputIgnoring

    Declaration
    public readonly bool PrevMouseInputIgnoring

    Rect

    Declaration
    public readonly IRect Rect

    Methods

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค