Esempio n. 1
0
 static extern private void tguiCustomWidgetForBindings_setDrawCallback(IntPtr cPointer, [MarshalAs(UnmanagedType.FunctionPtr)] CallbackCustomWidgetDraw func);
Esempio n. 2
0
        private void InitCustomWidgetCallbacks()
        {
            PositionChangedCallback = new CallbackCustomWidgetVector2f(OnPositionChanged);
            tguiCustomWidgetForBindings_setPositionChangedCallback(CPointer, PositionChangedCallback);

            SizeChangedCallback = new CallbackCustomWidgetVector2f(OnSizeChanged);
            tguiCustomWidgetForBindings_setSizeChangedCallback(CPointer, SizeChangedCallback);

            VisibleChangedCallback = new CallbackCustomWidgetBool(OnVisibleChanged);
            tguiCustomWidgetForBindings_setVisibleChangedCallback(CPointer, VisibleChangedCallback);

            EnableChangedCallback = new CallbackCustomWidgetBool(OnEnableChanged);
            tguiCustomWidgetForBindings_setEnableChangedCallback(CPointer, EnableChangedCallback);

            FocusChangedCallback = new CallbackCustomWidgetBool(OnFocusChanged);
            tguiCustomWidgetForBindings_setFocusChangedCallback(CPointer, FocusChangedCallback);

            CanGainFocusCallback = new CallbackCustomWidgetGetBool(OnCanGainFocus);
            tguiCustomWidgetForBindings_setCanGainFocusCallback(CPointer, CanGainFocusCallback);

            GetFullSizeCallback = new CallbackCustomWidgetGetVector2f(OnGetFullSize);
            tguiCustomWidgetForBindings_setGetFullSizeCallback(CPointer, GetFullSizeCallback);

            GetAbsolutePositionCallback = new CallbackCustomWidgetGetVector2f(OnGetAbsolutePosition);
            tguiCustomWidgetForBindings_setGetAbsolutePositionCallback(CPointer, GetAbsolutePositionCallback);

            GetWidgetOffsetCallback = new CallbackCustomWidgetGetVector2f(OnGetWidgetOffset);
            tguiCustomWidgetForBindings_setGetWidgetOffsetCallback(CPointer, GetWidgetOffsetCallback);

            UpdateCallback = new CallbackCustomWidgetUpdate(OnUpdate);
            tguiCustomWidgetForBindings_setUpdateCallback(CPointer, UpdateCallback);

            MouseOnWidgetCallback = new CallbackCustomWidgetMouseOnWidget(OnMouseOnWidget);
            tguiCustomWidgetForBindings_setMouseOnWidgetCallback(CPointer, MouseOnWidgetCallback);

            LeftMousePressedCallback = new CallbackCustomWidgetVector2f(OnLeftMousePressed);
            tguiCustomWidgetForBindings_setLeftMousePressedCallback(CPointer, LeftMousePressedCallback);

            LeftMouseReleasedCallback = new CallbackCustomWidgetVector2f(OnLeftMouseReleased);
            tguiCustomWidgetForBindings_setLeftMouseReleasedCallback(CPointer, LeftMouseReleasedCallback);

            RightMousePressedCallback = new CallbackCustomWidgetVector2f(OnRightMousePressed);
            tguiCustomWidgetForBindings_setRightMousePressedCallback(CPointer, RightMousePressedCallback);

            RightMouseReleasedCallback = new CallbackCustomWidgetVector2f(OnRightMouseReleased);
            tguiCustomWidgetForBindings_setRightMouseReleasedCallback(CPointer, RightMouseReleasedCallback);

            MouseMovedCallback = new CallbackCustomWidgetVector2f(OnMouseMoved);
            tguiCustomWidgetForBindings_setMouseMovedCallback(CPointer, MouseMovedCallback);

            KeyPressedCallback = new CallbackCustomWidgetKeyPressed(OnKeyPressed);
            tguiCustomWidgetForBindings_setKeyPressedCallback(CPointer, KeyPressedCallback);

            TextEnteredCallback = new CallbackCustomWidgetTextEntered(OnTextEntered);
            tguiCustomWidgetForBindings_setTextEnteredCallback(CPointer, TextEnteredCallback);

            MouseWheelScrolledCallback = new CallbackCustomWidgetMouseWheelScrolled(OnMouseWheelScrolled);
            tguiCustomWidgetForBindings_setMouseWheelScrolledCallback(CPointer, MouseWheelScrolledCallback);

            MouseNoLongerOnWidgetCallback = new CallbackCustomWidgetVoid(OnMouseNoLongerOnWidget);
            tguiCustomWidgetForBindings_setMouseNoLongerOnWidgetCallback(CPointer, MouseNoLongerOnWidgetCallback);

            LeftMouseButtonNoLongerDownCallback = new CallbackCustomWidgetVoid(OnLeftMouseButtonNoLongerDown);
            tguiCustomWidgetForBindings_setLeftMouseButtonNoLongerDownCallback(CPointer, LeftMouseButtonNoLongerDownCallback);

            MouseEnteredWidgetCallback = new CallbackCustomWidgetVoid(OnMouseEnteredWidget);
            tguiCustomWidgetForBindings_setMouseEnteredWidgetCallback(CPointer, MouseEnteredWidgetCallback);

            MouseLeftWidgetCallback = new CallbackCustomWidgetVoid(OnMouseLeftWidget);
            tguiCustomWidgetForBindings_setMouseLeftWidgetCallback(CPointer, MouseLeftWidgetCallback);

            RendererChangedCallback = new CallbackCustomWidgetRenderer(OnRendererChanged);
            tguiCustomWidgetForBindings_setRendererChangedCallback(CPointer, RendererChangedCallback);

            DrawCallback = new CallbackCustomWidgetDraw(ProcessOnDrawCallback);
            tguiCustomWidgetForBindings_setDrawCallback(CPointer, DrawCallback);
        }