亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dxmutgui.cs

?? 運用directX完成的坦克游戲雛形
?? CS
?? 第 1 頁 / 共 5 頁
字號:
            // Make sure there's a texture to create
            if ((tn.Filename == null) || (tn.Filename.Length == 0))
                return;

            // Find the texture
            string path = Utility.FindMediaFile(tn.Filename);

            // Create the new texture
            ImageInformation info = new ImageInformation();
            tn.Texture = TextureLoader.FromFile(device, path, D3DX.Default, D3DX.Default, D3DX.Default, Usage.None,
                Format.Unknown, Pool.Managed, (Filter)D3DX.Default, (Filter)D3DX.Default, 0, ref info);

            // Store dimensions
            tn.Width = (uint)info.Width;
            tn.Height = (uint)info.Height;

        }

        #region Device event callbacks
        /// <summary>
        /// Called when the device is created
        /// </summary>
        public void OnCreateDevice(Device d) 
        {
            // Store device
            device = d;

            // create fonts and textures
            for (int i = 0; i < fontCache.Count; i++)
                CreateFont(i);

            for (int i = 0; i < textureCache.Count; i++)
                CreateTexture(i);

            dialogSprite = new Sprite(d); // Create the sprite
        } 
        /// <summary>
        /// Called when the device is reset
        /// </summary>
        public void OnResetDevice(Device device)
        {
            foreach(FontNode fn in fontCache)
                fn.Font.OnResetDevice();

            if (dialogSprite != null)
                dialogSprite.OnResetDevice();
            
            // Create new state block
            dialogStateBlock = new StateBlock(device, StateBlockType.All);
        }

        /// <summary>
        /// Clear any resources that need to be lost
        /// </summary>
        public void OnLostDevice()
        {
            foreach(FontNode fn in fontCache)
            {
                if ( (fn.Font != null) && (!fn.Font.Disposed) )
                    fn.Font.OnLostDevice();
            }

            if (dialogSprite != null)
                dialogSprite.OnLostDevice();

            if (dialogStateBlock != null)
            {
                dialogStateBlock.Dispose();
                dialogStateBlock = null;
            }
        }
        
        /// <summary>
        /// Destroy any resources and clear the caches
        /// </summary>
        public void OnDestroyDevice()
        {
            foreach(FontNode fn in fontCache)
            {
                if (fn.Font != null)
                    fn.Font.Dispose();
            }
            
            foreach(TextureNode tn in textureCache)
            {
                if (tn.Texture != null)
                    tn.Texture.Dispose();
            }

            if (dialogSprite != null)
            {
                dialogSprite.Dispose();
                dialogSprite = null;
            }

            if (dialogStateBlock != null)
            {
                dialogStateBlock.Dispose();
                dialogStateBlock = null;
            }
        }

        #endregion
    }

    #endregion

    /// <summary>
    /// All controls must be assigned to a dialog, which handles
    /// input and rendering for the controls.
    /// </summary>
    public class Dialog
    {
        #region Static Data
        public const int WheelDelta = 120;
        public static readonly ColorValue WhiteColorValue = new ColorValue(0.82f, 0.96f, 0.15f, 1.0f); 
        public static readonly ColorValue TransparentWhite = new ColorValue(1.0f, 1.0f, 1.0f, 0.0f); 
        public static readonly ColorValue BlackColorValue = new ColorValue(0.97f, 0.62f, 0.21f, 1.0f); 
        private static Control controlFocus = null; // The control which has focus
        private static Control controlMouseOver = null; // The control which is hovered over
        private static Control controlMouseDown = null; // The control which the mouse was pressed on

        private static double timeRefresh = 0.0;
        /// <summary>Set the static refresh time</summary>
        public static void SetRefreshTime(float time) { timeRefresh = time; }
        #endregion

        #region Instance Data
        // Sample framework
        private Framework parent = null; 
        public Framework SampleFramework { get { return parent; } }

        // Vertex information
        private CustomVertex.TransformedColoredTextured[] vertices;

        // Timing
        private double timeLastRefresh;

        // Control/Elements
        private ArrayList controlList = new ArrayList();
        private ArrayList defaultElementList = new ArrayList();

        // Captions
        private bool hasCaption;
        private string caption;
        private int captionHeight;
        private Element captionElement;
        private bool isDialogMinimized;

        // Dialog information
        private int dialogX, dialogY, width, height;
        // Colors
        private ColorValue topLeftColor, topRightColor, bottomLeftColor, bottomRightColor;
        
        // Fonts/Textures
        private ArrayList textureList = new ArrayList(); // Index into texture cache
        private ArrayList fontList = new ArrayList(); // Index into font cache

        // Dialogs
        private Dialog nextDialog;
        private Dialog prevDialog;

        // User Input control
        private bool usingNonUserEvents;
        private bool usingKeyboardInput;
        private bool usingMouseInput;
        #endregion

        #region Simple Properties/Methods
        /// <summary>Is the dilaog using non user events</summary>
        public bool IsUsingNonUserEvents { get { return usingNonUserEvents; } set { usingNonUserEvents = value; } }
        /// <summary>Is the dilaog using keyboard input</summary>
        public bool IsUsingKeyboardInput { get { return usingKeyboardInput; } set { usingKeyboardInput = value; } }
        /// <summary>Is the dilaog using mouse input</summary>
        public bool IsUsingMouseInput { get { return usingMouseInput; } set { usingMouseInput = value; } }
        /// <summary>Is the dilaog minimized</summary>
        public bool IsMinimized { get { return isDialogMinimized; } set { isDialogMinimized = value; } }
        /// <summary>Called to set dialog's location</summary>
        public void SetLocation(int x, int y) { dialogX = x; dialogY = y; UpdateVertices(); }
        /// <summary>The dialog's location</summary>
        public System.Drawing.Point Location { 
            get {return new System.Drawing.Point(dialogX, dialogY); } 
            set { dialogX = value.X; dialogY = value.Y; UpdateVertices(); } 
        }

        /// <summary>Called to set dialog's size</summary>
        public void SetSize(int w, int h) { width = w; height = h; UpdateVertices();}
        /// <summary>Dialogs width</summary>
        public int Width { get { return width; } set { width = value; } }
        /// <summary>Dialogs height</summary>
        public int Height { get { return height; } set { height = value; } }
        /// <summary>Called to set dialog's caption</summary>
        public void SetCaptionText(string text) { caption = text; }
        /// <summary>The dialog's caption height</summary>
        public int CaptionHeight { get { return captionHeight; } set { captionHeight = value; } }
        /// <summary>Called to set dialog's caption enabled state</summary>
        public void SetCaptionEnabled(bool isEnabled) { hasCaption = isEnabled; }
        /// <summary>Called to set dialog's border colors</summary>
        public void SetBackgroundColors(ColorValue topLeft, ColorValue topRight, ColorValue bottomLeft, ColorValue bottomRight) 
        { 
            topLeftColor = topLeft; topRightColor = topRight; bottomLeftColor = bottomLeft; bottomRightColor = bottomRight;
            UpdateVertices();
        }
        /// <summary>Called to set dialog's border colors</summary>
        public void SetBackgroundColors(ColorValue allCorners) { SetBackgroundColors(allCorners, allCorners, allCorners, allCorners); }

        #endregion

        /// <summary>
        /// Create a new instance of the dialog class
        /// </summary>
        public Dialog(Framework sample)
        {
            parent = sample; // store this for later use
            // Initialize to default state
            dialogX = 0; dialogY = 0; width = 0; height = 0;
            hasCaption = false; isDialogMinimized = false; 
            caption = string.Empty;
            captionHeight = 18;

            topLeftColor = topRightColor = bottomLeftColor = bottomRightColor = new ColorValue();

            timeLastRefresh = 0.0f;
            
            nextDialog = this; // Only one dialog
            prevDialog = this;  // Only one dialog

            usingNonUserEvents = false;
            usingKeyboardInput = false;
            usingMouseInput = true;

            InitializeDefaultElements();
        }

        /// <summary>
        /// Initialize the default elements for this dialog
        /// </summary>
        private void InitializeDefaultElements()
        {
            SetTexture(0, "UI\\DXUTControls.dds");
            SetFont(0, "Arial", 14, FontWeight.Normal);

            //-------------------------------------
            // Element for the caption
            //-------------------------------------
            captionElement = new Element();
            captionElement.SetFont(0, WhiteColorValue, DrawTextFormat.Left | DrawTextFormat.VerticalCenter);
            captionElement.SetTexture(0, System.Drawing.Rectangle.FromLTRB(17, 269, 241, 287),new ColorValue(0.988f,0.89f,0.73f,1.0f));
            captionElement.TextureColor.States[(int)ControlState.Normal] = new ColorValue(0.988f,0.89f,0.73f,1.0f);
            captionElement.FontColor.States[(int)ControlState.Normal] = new ColorValue(0.988f,0.89f,0.73f,1.0f);
            // Pre-blend as we don't need to transition the state
            captionElement.TextureColor.Blend(ControlState.Normal, 10.0f);
            captionElement.FontColor.Blend(ControlState.Normal, 10.0f);

            Element e = new Element();

            //-------------------------------------
            // StaticText
            //-------------------------------------
            e.SetFont(0);
            e.FontColor.States[(int)ControlState.Disabled] = new ColorValue(0.75f, 0.75f, 0.75f, 0.75f);
            // Assign the element
            SetDefaultElement(ControlType.StaticText, StaticText.TextElement, e);

            //-------------------------------------
            // Button - Button
            //-------------------------------------
            e.SetTexture(0, System.Drawing.Rectangle.FromLTRB(0, 0, 136, 54));
            e.SetFont(0);
            e.TextureColor.States[(int)ControlState.Normal] = new ColorValue(1.0f, 1.0f, 1.0f, 0.55f);
            e.TextureColor.States[(int)ControlState.Pressed] = new ColorValue(1.0f, 1.0f, 1.0f, 0.85f);
            e.FontColor.States[(int)ControlState.MouseOver] = BlackColorValue;
            // Assign the element
            SetDefaultElement(ControlType.Button, Button.ButtonLayer, e);

            //-------------------------------------
            // Button - Fill Layer
            //-------------------------------------
            e.SetTexture(0, System.Drawing.Rectangle.FromLTRB(136, 0, 252, 54), TransparentWhite);
            e.TextureColor.States[(int)ControlState.MouseOver] = new ColorValue(1.0f, 1.0f, 1.0f, 0.6f);
            e.TextureColor.States[(int)ControlState.Pressed] = new ColorValue(0,0,0, 0.25f);
            e.TextureColor.States[(int)ControlState.Focus] = new ColorValue(1.0f, 1.0f, 1.0f, 0.05f);
            // Assign the element
            SetDefaultElement(ControlType.Button, Button.FillLayer, e);


            //-------------------------------------
            // CheckBox - Box
            //-------------------------------------
            e.SetTexture(0, System.Drawing.Rectangle.FromLTRB(0, 54, 27, 81));
            e.SetFont(0, WhiteColorValue, DrawTextFormat.Left | DrawTextFormat.VerticalCenter);
            e.FontColor.States[(int)ControlState.Disabled] = new ColorValue(0.8f, 0.8f, 0.8f, 0.8f);
            e.TextureColor.States[(int)ControlState.Normal] = new ColorValue(1.0f, 1.0f, 1.0f, 0.55f);
            e.TextureColor.States[(int)ControlState.Focus] = new ColorValue(1.0f, 1.0f, 1.0f, 0.8f);
            e.TextureColor.States[(int)ControlState.Pressed] = WhiteColorValue;
            // Assign the element
            SetDefaultElement(ControlType.CheckBox, Checkbox.BoxLayer, e);

            //-------------------------------------
            // CheckBox - Check
            //-------------------------------------
            e.SetTexture(0, System.Drawing.Rectangle.FromLTRB(27, 54, 54, 81));
            // Assign the element
            SetDefaultElement(ControlType.CheckBox, Checkbox.CheckLayer, e);

            //-------------------------------------
            // RadioButton - Box
            //-------------------------------------
            e.SetTexture(0, System.Drawing.Rectangle.FromLTRB(54, 54, 81, 81));
            e.SetFont(0, WhiteColorValue, DrawTextFormat.Left | DrawTextFormat.VerticalCenter);
            e.FontColor.States[(int)ControlState.Disabled] = new ColorValue(0.8f, 0.8f, 0.8f, 0.8f);
            e.TextureColor.States[(int)ControlState.Normal] = new ColorValue(1.0f, 1.0f, 1.0f, 0.55f);
            e.TextureColor.States[(int)ControlState.Focus] = new ColorValue(1.0f, 1.0f, 1.0f, 0.8f);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品欧美| 九一久久久久久| 欧美在线一二三| 亚洲国产成人av网| 3atv一区二区三区| 韩国三级中文字幕hd久久精品| 久久综合久久综合久久综合| 国产成人欧美日韩在线电影| 国产精品福利在线播放| 在线一区二区三区四区| 日韩中文字幕亚洲一区二区va在线| 日韩欧美电影一区| 风间由美中文字幕在线看视频国产欧美| 欧美激情一区二区三区| 色妞www精品视频| 偷拍日韩校园综合在线| 精品区一区二区| www.日韩av| 亚洲6080在线| 国产亚洲精品aa午夜观看| 色悠悠久久综合| 美女精品一区二区| 亚洲色图视频网| 日韩一区二区免费电影| 国产高清无密码一区二区三区| 亚洲女与黑人做爰| 日韩欧美国产综合一区| www.亚洲人| 男男视频亚洲欧美| 国产精品久久久久7777按摩| 欧美群妇大交群的观看方式| 成人免费精品视频| 肉肉av福利一精品导航| 国产欧美日韩综合| 制服视频三区第一页精品| eeuss影院一区二区三区| 日本不卡的三区四区五区| 国产精品美女一区二区三区 | 日本三级韩国三级欧美三级| 久久精品一区四区| 欧美日韩电影在线| thepron国产精品| 男男成人高潮片免费网站| 亚洲美女屁股眼交3| 久久久久久黄色| 欧美久久久影院| 色久综合一二码| 国产盗摄视频一区二区三区| 欧美a一区二区| 一区二区三区久久久| 国产精品美女久久久久av爽李琼| 欧美一级国产精品| 欧美亚洲动漫精品| a美女胸又www黄视频久久| 国产久卡久卡久卡久卡视频精品| 午夜精品免费在线观看| 亚洲精品视频在线观看免费| 国产日韩精品一区| 亚洲精品一区二区三区四区高清| 欧美日韩专区在线| 色94色欧美sute亚洲线路二| 成人免费电影视频| 国产成人h网站| 国产美女一区二区| 国产一区二区美女| 老司机精品视频导航| 视频一区视频二区中文| 亚洲免费在线看| 亚洲欧美激情小说另类| 国产精品久久久久久久久果冻传媒 | 日韩免费一区二区| 欧美精品自拍偷拍动漫精品| 欧美亚男人的天堂| 欧美在线free| 欧美亚洲综合另类| 欧美视频一区在线| 欧美日韩一区二区三区视频| 欧美日韩色一区| 精品视频全国免费看| 欧美欧美欧美欧美首页| 7777精品伊人久久久大香线蕉的 | 26uuu另类欧美| 久久久精品日韩欧美| 久久综合九色综合97婷婷女人 | 欧美私模裸体表演在线观看| 欧美视频一区在线观看| 69久久99精品久久久久婷婷| 日韩欧美成人午夜| 国产午夜精品一区二区三区嫩草 | 中文字幕av一区 二区| 久久久三级国产网站| 国产日韩欧美精品电影三级在线 | 伊人性伊人情综合网| 亚洲第一久久影院| 免费av网站大全久久| 国产精品一区二区在线播放 | 久久婷婷色综合| 亚洲欧洲精品一区二区三区| 亚洲同性gay激情无套| 午夜电影一区二区| 精品一区免费av| eeuss影院一区二区三区 | 美女视频黄 久久| 国产盗摄一区二区三区| 色婷婷综合久久久中文字幕| 欧美日韩国产美| 久久只精品国产| 亚洲欧美国产毛片在线| 图片区日韩欧美亚洲| 国产精品影视在线观看| 91蜜桃在线观看| 欧美一区二区私人影院日本| 国产无人区一区二区三区| 亚洲综合av网| 激情文学综合网| 色婷婷久久久亚洲一区二区三区 | 成人国产亚洲欧美成人综合网| 色婷婷一区二区| 欧美va亚洲va| 亚洲尤物在线视频观看| 国内精品免费**视频| 日本韩国视频一区二区| 久久久蜜桃精品| 亚洲1区2区3区4区| 成人精品gif动图一区| 日韩亚洲电影在线| 亚洲裸体在线观看| 国产精品一二三区在线| 51精品视频一区二区三区| 国产精品美女久久久久久| 午夜av一区二区三区| 99精品欧美一区二区三区小说| 欧美一区日本一区韩国一区| 亚洲视频电影在线| 国产在线播放一区二区三区| 欧美日本视频在线| 国产精品久久久久久久久快鸭| 琪琪久久久久日韩精品| 在线观看一区二区视频| 中文字幕亚洲在| 国产成人午夜精品影院观看视频| 欧美一区二区福利在线| 亚洲综合丁香婷婷六月香| 9人人澡人人爽人人精品| 欧美麻豆精品久久久久久| 日韩欧美国产午夜精品| 一区二区在线观看免费视频播放| 国产高清视频一区| 精品国精品国产尤物美女| 三级一区在线视频先锋| 在线观看免费视频综合| 亚洲精品自拍动漫在线| 成人在线一区二区三区| 久久影院午夜论| 久久精品国产999大香线蕉| 欧美日韩一区中文字幕| 一区二区三区四区国产精品| 不卡av免费在线观看| 欧美国产一区在线| 国产宾馆实践打屁股91| 久久久国产午夜精品| 国内不卡的二区三区中文字幕| 欧美一二三区精品| 欧美96一区二区免费视频| 欧美精品国产精品| 天天av天天翘天天综合网 | 性做久久久久久| 欧美色爱综合网| 日韩av中文字幕一区二区| 69堂精品视频| 久99久精品视频免费观看| 精品国产乱码91久久久久久网站| 久久精品二区亚洲w码| 久久一区二区三区国产精品| 国产一区二区三区av电影| 国产欧美日韩综合精品一区二区| 国产成人精品三级| 亚洲欧美日韩国产手机在线 | 欧美日本国产视频| 蜜乳av一区二区三区| 久久久久久久国产精品影院| 国产成人精品影院| 亚洲欧美日韩电影| 欧美日韩国产欧美日美国产精品| 日韩av午夜在线观看| 久久品道一品道久久精品| 国产91在线观看| 亚洲蜜臀av乱码久久精品 | 一本到高清视频免费精品| 亚洲一区中文在线| 日韩一级精品视频在线观看| 精品一区二区免费视频| 国产精品你懂的| 欧美日韩日本视频| 国产一区日韩二区欧美三区| 国产精品不卡视频| 911精品产国品一二三产区| 精品一区二区三区在线观看国产| 国产嫩草影院久久久久| 欧美在线播放高清精品|