🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Progress? Pff!

Published July 29, 2006
Advertisement
Eh, I've been putting off actual moe work for some reason. Partly I've been busy/tired/interrupted a bit, and partly I don't have a nice plan for doing stuff. Plans are good, even if they're intangible or procrastinated.

Anyways, I've been meaning to get my UI a bit more fleshed out and presentable, so I poked a little at it tonight and started up a test/screenshot app. Unfortunately, not a few of the cool stuff (auto-arranging objects, status groups, timed objects, canvases) don't screenshot well. Plus, my UI doesn't support dragging so I can't effectively implement sliders so common in others' screenies.

Here's the first little bit, along with the code that set it up. It's a little more verbose than others', partly because C# is verbose, partly because of the auto-arrangement abstraction.



        RORoot.GUIRoot.Bindings.kbBind(Keys.F12, Graphics.basero.Renderable.ScreenshotCamera.Capture, Support.UIBindings.InputModifiers.ims.IM_NORMAL);        BaseRO bg = ImageManager.MainManager.Load("solid");        bg.Color = System.Drawing.Color.Black.ToArgb();        bg.ReRect(new IdenticalRect(RORoot.GUIRoot.tblr));        bg.PushOnto(RORoot.GUIRoot);        ImageRO a, b, c, d;        BaseRO e, f, g;        a = ImageManager.MainManager.Load("Cow") as ImageRO;        a.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(a, RORoot.GUIRoot, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftTop, 4, 4);        b = ImageManager.MainManager.Load("Cow") as ImageRO;        b.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(b, a, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop);        b.RotateCW();        c = ImageManager.MainManager.Load("Cow") as ImageRO;        c.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(c, b, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop);        c.RotateCW();        c.RotateCW();        d = ImageManager.MainManager.Load("Cow") as ImageRO;        d.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(d, c, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop);        d.FlipY();        e = ImageManager.MainManager.Load("Cow");        e.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(e, a, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom);        e.Color = System.Drawing.Color.Red.ToArgb();        f = ImageManager.MainManager.Load("Cow");        f.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(f, e, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop);        f.Color = System.Drawing.Color.Green.ToArgb();        g = ImageManager.MainManager.Load("Cow");        g.ReRect(new StaticRect(System.Drawing.Rectangle.FromLTRB(0, 0, 32, 32)));        TiedRect.Tie(g, f, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop);        g.Color = System.Drawing.Color.Blue.ToArgb();        a.PushOnto(RORoot.GUIRoot);        b.PushOnto(RORoot.GUIRoot);        c.PushOnto(RORoot.GUIRoot);        d.PushOnto(RORoot.GUIRoot);        e.PushOnto(RORoot.GUIRoot);        f.PushOnto(RORoot.GUIRoot);        g.PushOnto(RORoot.GUIRoot);        TextRO norm,ital,bold,italbold;         norm= FontManager.MainManager.Load("NTR16") as TextRO;        norm.SrcText = new StoredText("Moo...");        TiedRect.Tie(norm, e, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom).Sizing=norm.BoundingBox;        norm.PushOnto(RORoot.GUIRoot);        norm.Color = System.Drawing.Color.SkyBlue.ToArgb();        ital = FontManager.MainManager.Load("NTR16I") as TextRO;        ital.SrcText = norm.SrcText;        TiedRect.Tie(ital, norm, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom).Sizing=ital.BoundingBox;        ital.PushOnto(RORoot.GUIRoot);        ital.Color = norm.Color;        bold = FontManager.MainManager.Load("NTR16B") as TextRO;        bold.SrcText = norm.SrcText;        TiedRect.Tie(bold,ital, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom).Sizing=bold.BoundingBox;        bold.PushOnto(RORoot.GUIRoot);        bold.Color = norm.Color;        italbold = FontManager.MainManager.Load("NTR16IB") as TextRO;        italbold.SrcText = norm.SrcText;        TiedRect.Tie(italbold, bold, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom).Sizing=italbold.BoundingBox;        italbold.PushOnto(RORoot.GUIRoot);        italbold.Color = norm.Color;        Support.ActiveStatusGroups.ActiveStatusGroup RadioButtonGroup = new Support.ActiveStatusGroups.ActiveStatusGroup();        SquareToggle ST1, ST2, ST3;        ST1 = new SquareToggle();        ST2 = new SquareToggle();        ST3 = new SquareToggle();        RadioButtonGroup.Add(ST1);        RadioButtonGroup.Add(ST2);        RadioButtonGroup.Add(ST3);        ST1.BGColor = System.Drawing.Color.Black.ToArgb();        ST1.BorderColor = System.Drawing.Color.SkyBlue.ToArgb();        ST1.Color2 = System.Drawing.Color.Goldenrod.ToArgb();        ST2.BGColor = System.Drawing.Color.Black.ToArgb();        ST2.BorderColor = System.Drawing.Color.SkyBlue.ToArgb();        ST2.Color2 = System.Drawing.Color.Goldenrod.ToArgb();        ST3.BGColor = System.Drawing.Color.Black.ToArgb();        ST3.BorderColor = System.Drawing.Color.SkyBlue.ToArgb();        ST3.Color2 = System.Drawing.Color.Goldenrod.ToArgb();        ST1.ReRect(new StaticRect(new System.Drawing.Rectangle(0, 0, 16, 16)));        ST2.ReRect(new StaticRect(new System.Drawing.Rectangle(0, 0, 16, 16)));        ST3.ReRect(new StaticRect(new System.Drawing.Rectangle(0, 0, 16, 16)));        TiedRect.Tie(ST1, italbold, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.LeftBottom, 0, 4);        TiedRect.Tie(ST2, ST1, TiedRect.TiePoints.LeftCenter, TiedRect.TiePoints.RightBottom, 4, 0);        TiedRect.Tie(ST3, ST2, TiedRect.TiePoints.LeftCenter, TiedRect.TiePoints.RightBottom, 4, 0);        ST1.PushOnto(RORoot.GUIRoot);        ST2.PushOnto(RORoot.GUIRoot);        ST3.PushOnto(RORoot.GUIRoot);        TextRO ORB = FontManager.MainManager.Load("RaisedArial24") as TextRO;        ORB.SrcText = new StoredText("(Offset radio buttons)");        TiedRect.Tie(ORB, ST3, TiedRect.TiePoints.LeftCenter, TiedRect.TiePoints.RightTop, 8, 0).Sizing = ORB.BoundingBox;        ORB.Color = System.Drawing.Color.SkyBlue.ToArgb();        ORB.Color2 = System.Drawing.Color.SlateBlue.ToArgb();        ORB.PushOnto(RORoot.GUIRoot);        TextRO kanji = FontManager.MainManager.Load("Kanji") as TextRO;                char duck = (char)40219;        char tree = (char)26408;        kanji.SrcText = new StoredText(tree.ToString());        TiedRect.Tie(kanji, d, TiedRect.TiePoints.LeftTop, TiedRect.TiePoints.RightTop, 32, 0).Sizing = kanji.BoundingBox;        kanji.PushOnto(RORoot.GUIRoot);        kanji.Color = norm.Color;
Next Entry Borders
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement