Skip to content

Commit

Permalink
Добавь круглые углы
Browse files Browse the repository at this point in the history
  • Loading branch information
prifio committed Dec 23, 2015
1 parent f8c4908 commit c2595d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
20 changes: 17 additions & 3 deletions CH replayreader/coins hokke/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public static void Main()
Application.SetCompatibleTextRenderingDefault(false);
var MainForm = new Form1();
MainForm.Show();

Z.clwidth = MainForm.ClientSize.Width;
Z.clheight = MainForm.ClientSize.Height;

var oup = System.IO.File.OpenText("replay.chrpl");
x = new List<int[]>();
y = new List<int[]>();
Expand Down Expand Up @@ -66,6 +70,16 @@ public static void prd(long tick)
public static void getgrp1(System.Drawing.Graphics g)
{
g.Clear(System.Drawing.Color.White);

g.FillRectangle(System.Drawing.Brushes.Maroon, 0, 0, Z.radangl, Z.radangl);
g.FillEllipse(System.Drawing.Brushes.White, 1, 0, Z.radangl * 2, Z.radangl * 2);
g.FillRectangle(System.Drawing.Brushes.Maroon, Z.clwidth - Z.radangl, 0, Z.radangl, Z.radangl);
g.FillEllipse(System.Drawing.Brushes.White, Z.clwidth - 2 * Z.radangl - 1, 0, Z.radangl * 2, Z.radangl * 2);
g.FillRectangle(System.Drawing.Brushes.Maroon, 0, Z.clheight - Z.radangl, Z.radangl, Z.radangl);
g.FillEllipse(System.Drawing.Brushes.White, 1, Z.clheight - 2 * Z.radangl - 1, Z.radangl * 2, Z.radangl * 2);
g.FillRectangle(System.Drawing.Brushes.Maroon, Z.clwidth - Z.radangl, Z.clheight - Z.radangl, Z.radangl, Z.radangl);
g.FillEllipse(System.Drawing.Brushes.White, Z.clwidth - 2 * Z.radangl - 1, Z.clheight - 2 * Z.radangl - 1, Z.radangl * 2, Z.radangl * 2);

g.FillRectangle(System.Drawing.Brushes.Red, 0, 532 / 2 - 50, 3, 100);
g.FillRectangle(System.Drawing.Brushes.Red, 790, 532 / 2 - 50, 3, 100);
for (int i = 0; i < 4; i++)
Expand All @@ -79,7 +93,7 @@ public static void getgrp1(System.Drawing.Graphics g)
g.DrawImage(Z.tcoin[nh].picob, xh - Z.tcoin[nh].r, yh - Z.tcoin[nh].r, 2 * Z.tcoin[nh].r, 2 * Z.tcoin[nh].r);
}
var f = new System.Drawing.Font("Arial", 30);
g.DrawString(ysk.ToString(), f, System.Drawing.Brushes.Black, 0, 0);
g.DrawString(ysk.ToString(), f, System.Drawing.Brushes.Black, 60, 0);
//
//g.DrawString(Z.ch1.ToString() + " : " + Z.ch2.ToString(), f, System.Drawing.Brushes.Black, 793 / 2 - 40, 5);
}
Expand Down Expand Up @@ -121,8 +135,8 @@ public cointype(int r1, int m1, int s1, string n, string fileor, string filere,
r = r1;
stoim = s1;
name = n;
picob = Image.FromFile(fileor + ras);
picre = Image.FromFile(filere + ras);
picob = Image.FromFile("textures\\" + fileor + ras);
picre = Image.FromFile("textures\\" + filere + ras);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion CH replayreader/coins hokke/global_vars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Z
new cointype(27, 627, 100, "Loonie (1 CAD)","1cdo","1cdr"),
new cointype(28, 692, 200, "Toonie (2 CAD)","2cdo","2cdr")
};

public static int radangl = 100;
public static int clwidth, clheight;
}
}

0 comments on commit c2595d3

Please sign in to comment.