public void OnAction(Entity entity)
        {
            if ((entity.Mask & MASK) == MASK)
            {
                ComponentUI ui = entity.GetComponent <ComponentUI>();
                if (!ui.enabled)
                {
                    return;
                }
                ComponentTransform transform = entity.transform;

                Draw(transform.GetTransformMatrix(), ui.Geometry, ui);
            }
        }
 public void UpdateInputs(ComponentUI ui)
 {
     foreach (var e in ui.MouseEvents)
     {
         _view.FireMouseEvent(e);
     }
     foreach (var e in ui.ScrollEvents)
     {
         _view.FireScrollEvent(e);
     }
     foreach (var e in ui.KeyboardEvents)
     {
         _view.FireKeyEvent(e);
     }
 }
        //public event EventHandler<Geometry> CropGeometryChanged;

        public VASComponent(LiveSplitState state)
        {
            Log.Info("Establishing Video Auto Splitter, standby...");

            State = state;

            ComponentUI = new ComponentUI(this);

            CropGeometries      = new Dictionary <string, Geometry>();
            BasicSettingsState  = new Dictionary <string, bool>();
            CustomSettingsState = new Dictionary <string, dynamic>();

            Scanner = new Scanner(this);

            FSWatcher          = new FileSystemWatcher();
            FSWatcher.Changed += (sender, args) => {
                ProfileCleanup();
                ProfileChanged?.Invoke(this, GameProfile);
            };

            Scanner.NewResult += (sender, dm) => RunScript(sender, dm);
        }
        public void Draw(Matrix4 model, Geometry geometry, ComponentUI material)
        {
            GL.UseProgram(material.Shader.ShaderProgramID);
            // set texture
            GL.Uniform1(material.Shader.uniform_stex, 0);
            GL.ActiveTexture(TextureUnit.Texture0);
            GL.BindTexture(TextureTarget.Texture2D, material.Texture.TextureID);

            // send tint color
            if (material.Shader.uniform_tint_color != -1)
            {
                GL.Uniform4(material.Shader.uniform_tint_color, material.tintColor);
            }

            // MVP matrices
            GL.UniformMatrix4(material.Shader.uniform_mat_model, false, ref model);
            GL.UniformMatrix4(material.Shader.uniform_mat_view, false, ref view);
            GL.UniformMatrix4(material.Shader.uniform_mat_proj, false, ref projection);

            geometry.Render();

            GL.BindVertexArray(0);
            GL.UseProgram(0);
        }
Esempio n. 5
0
 public ScrollBarDecorator(ComponentUI component)
     : base(component)
 {
 }
 /// <summary>
 /// 构造函数.
 /// </summary>
 /// <param name="component"> 注入抽象构件类型的对象 </param>
 public ComponentDecorator(ComponentUI component)
 {
     this.component = component;
 }
 public BlackBorderDecorator(ComponentUI component)
     : base(component)
 {
 }
Esempio n. 8
0
 /// <summary>
 /// Sets the look and feel delegate for this component.
 /// </summary>
 protected void setUI(ComponentUI @newUI)
 {
 }