示例#1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Kyu by Vrien Studios...");
            Console.WriteLine("Loading Art Resources");
            Resx.Classes.Resources.GetAllDirs(Directory.GetCurrentDirectory() + "\\resx", new string[] { });

            screenClass screenDim = new screenClass();

            foreach (string str in Resx.Classes.Resources.dirs)
            {
                Console.WriteLine(str);
            }

            Resx.Classes.Resources.LoadImages();
            handle = new KyuWIN.WinComponents.FHandle(800, 800, new Point(0, 0), "VTest", false);
            Bitmap   bg = new Bitmap(handle.xOffset, handle.yOffset);
            Graphics b  = Graphics.FromImage(bg);

            b.Clear(Color.Black);
            FObject fobj = new FObject(0, 0, bg);

            fobj.onMouseHover += Fobj_onMouseHover;
            handle.AddFObject(fobj);
            fobj.DrawStringCenter("Thank you for playing!\nClick to Continue");
            fobj.DrawString(0, 0, "Beta");

            fobj.onClick += Fobj_onClick;
        }
示例#2
0
        public DropDownMenu(Bitmap theme, Bitmap dArrow, String[] items, int x, int y, int spacing)
        {
            this.theme  = theme;
            this.dArrow = dArrow;
            this.Items  = items;
            itemsText   = new FObject[items.Length];

            int row = y + spacing;

            this.x = x;
            this.y = y;

            Bitmap bm = new Bitmap(theme.Width, theme.Height);

            for (uint idx = 0; idx < items.Length; idx++)
            {
                FObject t = new FObject(0, row, theme);
                row             = row + spacing;
                t.onMouseHover += T_onMouseHover;
                t.DrawStringCenter(items[idx]);
                itemsText[idx] = t;
            }

            font = new Font(FontFamily.GenericSansSerif, 12);

            a = Graphics.FromImage(bm);
            a.DrawImage(theme, 0, 0);
            _base = new FObject(x, y, bm);
            _base.DrawStringCenter(items[0]);
            _base.onClick += _base_onClick;

            baseT = new FObject(x, y, theme);
            baseT.DrawStringCenter(items[0]);

            Bitmap bp = new Bitmap(theme.Width, row);

            a = Graphics.FromImage(bp);
            a.DrawImage(_base.window, 0, 0);
            foreach (FObject fobj in itemsText)
            {
                a.DrawImage(fobj.window, fobj.x, fobj.y);
            }
            _open = bp;
        }
示例#3
0
        public ChoiceList(int x, int y, int spacing, string[] choices, Bitmap choiceBackground, bool animated = false, int timing = 10)
        {
            List <FObject> fobL = new List <FObject>();

            foreach (string choice in choices)
            {
                FObject fobj = new FObject(x, y, choiceBackground);
                fobj.DrawStringCenter(choice);
                fobj.ChangeOpacity(0.5f);

                if (animated == true)
                {
                    fobj.AnimatedOpacityChange(0.95);
                }
                fobL.Add(fobj);
                y += spacing;
            }
            this.choices = fobL.ToArray();
        }
示例#4
0
        public void selectItem(int i)
        {
            _base.ClearText();
            _base.DrawStringCenter(Items[i]);
            baseT.ClearText();
            baseT.DrawStringCenter(Items[i]);

            Bitmap bp = new Bitmap(_open.Width, _open.Height);

            a = Graphics.FromImage(bp);
            a.DrawImage(baseT.window, 0, 0);
            foreach (FObject fobj in itemsText)
            {
                a.DrawImage(fobj.window, fobj.x, fobj.y);
            }
            _open = bp;

            if (onItemSelect != null)
            {
                onItemSelect(Items[i]);
            }
        }