• Advertisement
  • entries
    359
  • comments
    237
  • views
    189008

Progress? Pff!

Sign in to follow this  

57 views

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;


Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement