Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qubqub committed Sep 9, 2023
1 parent 6ee008b commit a16bf30
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 179 deletions.
9 changes: 6 additions & 3 deletions Controls/TransparentLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public TransparentLabel() {
public Image RoundIcon { get; set; }
public bool UseShareCode { get; set; }
public int SecondProgress { get; set; }
public int SecondProgressLines { get; set; }
public int OverlaySetting { get; set; }
public void Draw(Graphics g) {
if (!this.DrawVisible) { return; }
if (this.PlatformIcon != null) {
Expand Down Expand Up @@ -86,8 +86,11 @@ public void Draw(Graphics g) {
}

if (!string.IsNullOrEmpty(this.Text)) {
if (this.Name.Equals("lblPlayers")) {
if (this.SecondProgress > 0 && this.SecondProgressLines > 0) this.FillRoundedRectangleF(g, new Pen(this.GetComplementaryColor(brFore.Color, 95)), new SolidBrush(this.GetComplementaryColor(brFore.Color, 95)), this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width * this.SecondProgress / 60f, this.ClientRectangle.Height * this.SecondProgressLines, 4f);
if ((this.Name.Equals("lblPlayers") && (this.OverlaySetting == 0 || this.OverlaySetting == 1 || this.OverlaySetting == 4 || this.OverlaySetting == 5)) ||
(this.Name.Equals("lblFastest") && this.OverlaySetting == 2) ||
(this.Name.Equals("lblFinals") && this.OverlaySetting == 3) ||
(this.Name.Equals("lblDuration") && this.OverlaySetting == 6)) {
if (this.SecondProgress > 0) this.FillRoundedRectangleF(g, new Pen(this.GetComplementaryColor(brFore.Color, 95)), new SolidBrush(this.GetComplementaryColor(brFore.Color, 95)), this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width * this.SecondProgress / 60f, this.ClientRectangle.Height * 2, 4f);
}
this.DrawOutlineText(g, this.ClientRectangle, null, brFore, this.Font.FontFamily, this.Font.Style, this.Font.Size * this.GetFontSizeFactor(), this.Text, stringFormat);
}
Expand Down
6 changes: 6 additions & 0 deletions Entities/Multilingual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "Color round name based on round type (Ctrl + R)"},
{"settings_auto_change_profile", "Automatically change to linked profile (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "Shading the server's flag image to display"},
{"settings_diaplay_current_time", "Display the current time while waiting"},
{"settings_custom_overlay_font", "Custom Overlay Font"},
{"settings_select_font", "Select Font"},
{"settings_reset_font", "Reset Font"},
Expand Down Expand Up @@ -739,6 +740,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "Colorer la manche selon son type (Ctrl + R)"},
{"settings_auto_change_profile", "Passer automatiquement sur le profil lié (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "Ombrage de l'image du drapeau du serveur à afficher"},
{"settings_diaplay_current_time", "Affiche l'heure actuelle en attendant"},
{"settings_custom_overlay_font", "Police d'écriture"},
{"settings_select_font", "Changer"},
{"settings_reset_font", "Réinitialiser"},
Expand Down Expand Up @@ -1165,6 +1167,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "라운드 유형별 색상 배지 표시 (Ctrl + R)"},
{"settings_auto_change_profile", "연동된 프로필로 자동 변경 (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "서버의 국기 이미지를 음영 처리해서 표시"},
{"settings_diaplay_current_time", "대기하는 동안 현재 시간을 표시"},
{"settings_custom_overlay_font", "사용자 정의 글꼴"},
{"settings_select_font", "글꼴 선택"},
{"settings_reset_font", "글꼴 초기화"},
Expand Down Expand Up @@ -1592,6 +1595,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "ラウンドタイプ別に色を変更する (Ctrl + R)"},
{"settings_auto_change_profile", "リンク先のプロファイルに自動で変更する (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "サーバーの旗のイメージを網掛けして表示します"},
{"settings_diaplay_current_time", "待機中に現在時刻を表示します"},
{"settings_custom_overlay_font", "カスタムフォント"},
{"settings_select_font", "フォント選択"},
{"settings_reset_font", "リセット"},
Expand Down Expand Up @@ -2018,6 +2022,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "按照关卡类型显示颜色 (Ctrl + R)"},
{"settings_auto_change_profile", "自动改变为链接的个人资料 (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "对要显示的服务器标志图像进行着色"},
{"settings_diaplay_current_time", "等待时显示当前时间"},
{"settings_custom_overlay_font", "自定义浮窗字体"},
{"settings_select_font", "选择字体"},
{"settings_reset_font", "重置字体"},
Expand Down Expand Up @@ -2444,6 +2449,7 @@ public static class Multilingual {
{"settings_color_round_name_based_on_round_type", "按照關卡類型顯示顏色 (Ctrl + R)"},
{"settings_auto_change_profile", "自動改變為鏈接的個人資料 (Ctrl + Shift + Z)"},
{"settings_shade_the_flag_image", "對要顯示的服務器標誌圖像進行著色"},
{"settings_diaplay_current_time", "等待時顯示當前時間"},
{"settings_custom_overlay_font", "自定義浮窗字體"},
{"settings_select_font", "選擇字體"},
{"settings_reset_font", "重置字體"},
Expand Down
1 change: 1 addition & 0 deletions Entities/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class UserSettings {
public bool ColorByRoundType { get; set; }
public bool AutoChangeProfile { get; set; }
public bool ShadeTheFlagImage { get; set; }
public bool DisplayCurrentTime { get; set; }
public int PreviousWins { get; set; }
public int WinsFilter { get; set; }
public int FastestFilter { get; set; }
Expand Down
Loading

0 comments on commit a16bf30

Please sign in to comment.