1
0
mirror of synced 2024-11-12 01:50:47 +01:00

Color tag in texts and descriptions for characters/puchis

This commit is contained in:
0auBSQ 2024-06-30 21:21:46 +09:00
parent 6dd6f06419
commit 1832fc2db9
7 changed files with 335 additions and 74 deletions

View File

@ -6,9 +6,12 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using SkiaSharp; using SkiaSharp;
using System.Text.RegularExpressions;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
using System.Drawing;
using static FDK.CSkiaSharpTextRenderer;
namespace FDK namespace FDK
{ {
@ -81,6 +84,126 @@ namespace FDK
paint.IsAntialias = true; paint.IsAntialias = true;
} }
internal struct SStringToken
{
public string s;
public Color TextColor;
public bool UseGradiant;
public Color GradiantTop;
public Color GradiantBottom;
public override string ToString()
{
if (UseGradiant == false)
return $"{s} (TextColor: {TextColor})";
return $"{s} (TextColor: {TextColor}, GradiantTop: {GradiantTop}, GradiantBottom: {GradiantBottom})";
}
}
private const string TagRegex = @"<(/?)([gc](?:\.#[0-9a-fA-F]{6})*?)>";
private string Purify(string input)
{
return Regex.Replace(input, TagRegex, "");
}
private List<SStringToken> Tokenize(string input, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor)
{
List<SStringToken> tokens = new List<SStringToken>();
Stack<string> tags = new Stack<string>();
Stack<SStringToken> tokenStack = new Stack<SStringToken>();
int lastPos = 0;
var tagRegex = new Regex(TagRegex);
var matches = tagRegex.Matches(input);
foreach (Match match in matches)
{
int pos = match.Index;
string text = input.Substring(lastPos, pos - lastPos);
// First
if (text.Length > 0)
{
SStringToken token = new SStringToken
{
s = text,
UseGradiant = tokenStack.Count > 0 && tokenStack.Peek().UseGradiant,
GradiantTop = (tokenStack.Count == 0) ? gradationTopColor : tokenStack.Peek().GradiantTop,
GradiantBottom = (tokenStack.Count == 0) ? gradationBottomColor : tokenStack.Peek().GradiantBottom,
TextColor = (tokenStack.Count == 0) ? fontColor : tokenStack.Peek().TextColor,
};
tokens.Add(token);
}
lastPos = pos + match.Length;
if (match.Groups[1].Value == "/")
{
if (tags.Count > 0) tags.Pop();
if (tokenStack.Count > 0) tokenStack.Pop();
}
else
{
tags.Push(match.Groups[2].Value);
SStringToken newToken = new SStringToken
{
UseGradiant = tokenStack.Count > 0 ? tokenStack.Peek().UseGradiant : false,
GradiantTop = (tokenStack.Count == 0) ? gradationTopColor : tokenStack.Peek().GradiantTop,
GradiantBottom = (tokenStack.Count == 0) ? gradationBottomColor : tokenStack.Peek().GradiantBottom,
TextColor = (tokenStack.Count == 0) ? fontColor : tokenStack.Peek().TextColor,
};
string[] _varSplit = match.Groups[2].Value.Split(".");
if (_varSplit.Length > 0)
{
switch (_varSplit[0])
{
case "g":
{
if (_varSplit.Length > 2)
{
newToken.UseGradiant = true;
newToken.GradiantTop = ColorTranslator.FromHtml(_varSplit[1]);
newToken.GradiantBottom = ColorTranslator.FromHtml(_varSplit[2]);
}
break;
}
case "c":
{
if (_varSplit.Length > 1)
{
newToken.TextColor = ColorTranslator.FromHtml(_varSplit[1]);
}
break;
}
}
}
tokenStack.Push(newToken);
}
}
// Last
if (lastPos < input.Length)
{
SStringToken token = new SStringToken
{
s = input.Substring(lastPos),
UseGradiant = tokenStack.Count > 0 && tokenStack.Peek().UseGradiant,
GradiantTop = (tokenStack.Count == 0) ? gradationTopColor : tokenStack.Peek().GradiantTop,
GradiantBottom = (tokenStack.Count == 0) ? gradationBottomColor : tokenStack.Peek().GradiantBottom,
TextColor = (tokenStack.Count == 0) ? fontColor : tokenStack.Peek().TextColor,
};
tokens.Add(token);
}
return tokens;
}
public SKBitmap DrawText(string drawstr, CFontRenderer.DrawMode drawMode, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor, int edge_Ratio, bool keepCenter) public SKBitmap DrawText(string drawstr, CFontRenderer.DrawMode drawMode, Color fontColor, Color edgeColor, Color? secondEdgeColor, Color gradationTopColor, Color gradationBottomColor, int edge_Ratio, bool keepCenter)
{ {
if (string.IsNullOrEmpty(drawstr)) if (string.IsNullOrEmpty(drawstr))
@ -90,62 +213,83 @@ namespace FDK
} }
string[] strs = drawstr.Split("\n"); string[] strs = drawstr.Split("\n");
List<SStringToken>[] tokens = new List<SStringToken>[strs.Length];
for (int i = 0; i < strs.Length; i++)
{
tokens[i] = Tokenize(strs[i], fontColor, edgeColor, secondEdgeColor, gradationTopColor, gradationBottomColor);
}
SKBitmap[] images = new SKBitmap[strs.Length]; SKBitmap[] images = new SKBitmap[strs.Length];
for (int i = 0; i < strs.Length; i++) { for (int i = 0; i < strs.Length; i++) {
SKRect bounds = new SKRect(); SKRect bounds = new SKRect();
int width = (int)Math.Ceiling(paint.MeasureText(strs[i], ref bounds)) + 50;
int width = (int)Math.Ceiling(paint.MeasureText(Purify(strs[i]), ref bounds)) + 50;
int height = (int)Math.Ceiling(paint.FontMetrics.Descent - paint.FontMetrics.Ascent) + 50; int height = (int)Math.Ceiling(paint.FontMetrics.Descent - paint.FontMetrics.Ascent) + 50;
//少し大きめにとる(定数じゃない方法を考えましょう) //少し大きめにとる(定数じゃない方法を考えましょう)
SKBitmap bitmap = new SKBitmap(width, height, SKColorType.Rgba8888, SKAlphaType.Premul); SKBitmap bitmap = new SKBitmap(width, height, SKColorType.Rgba8888, SKAlphaType.Premul);
SKCanvas canvas = new SKCanvas(bitmap); SKCanvas canvas = new SKCanvas(bitmap);
if (drawMode.HasFlag(CFontRenderer.DrawMode.Edge)) int x_offset = 0;
foreach (SStringToken tok in tokens[i])
{ {
int token_width = (int)Math.Ceiling(paint.MeasureText(tok.s, ref bounds));
SKPath path = paint.GetTextPath(strs[i], 25, -paint.FontMetrics.Ascent + 25); if (drawMode.HasFlag(CFontRenderer.DrawMode.Edge))
if (secondEdgeColor != null)
{ {
SKPaint secondEdgePaint = new SKPaint();
secondEdgePaint.StrokeWidth = paint.TextSize * 8 / edge_Ratio; SKPath path = paint.GetTextPath(tok.s, 25 + x_offset, -paint.FontMetrics.Ascent + 25);
secondEdgePaint.StrokeJoin = SKStrokeJoin.Round;
secondEdgePaint.Color = new SKColor(secondEdgeColor.Value.R, secondEdgeColor.Value.G, secondEdgeColor.Value.B, secondEdgeColor.Value.A); if (secondEdgeColor != null)
secondEdgePaint.Style = SKPaintStyle.Stroke; {
secondEdgePaint.IsAntialias = true; SKPaint secondEdgePaint = new SKPaint();
canvas.DrawPath(path, secondEdgePaint); secondEdgePaint.StrokeWidth = paint.TextSize * 8 / edge_Ratio;
secondEdgePaint.StrokeJoin = SKStrokeJoin.Round;
secondEdgePaint.Color = new SKColor(secondEdgeColor.Value.R, secondEdgeColor.Value.G, secondEdgeColor.Value.B, secondEdgeColor.Value.A);
secondEdgePaint.Style = SKPaintStyle.Stroke;
secondEdgePaint.IsAntialias = true;
canvas.DrawPath(path, secondEdgePaint);
}
SKPaint edgePaint = new SKPaint();
edgePaint.StrokeWidth = paint.TextSize * (secondEdgeColor == null ? 8 : 4) / edge_Ratio;
edgePaint.StrokeJoin = SKStrokeJoin.Round;
edgePaint.Color = new SKColor(edgeColor.R, edgeColor.G, edgeColor.B, edgeColor.A);
edgePaint.Style = SKPaintStyle.Stroke;
edgePaint.IsAntialias = true;
canvas.DrawPath(path, edgePaint);
} }
SKPaint edgePaint = new SKPaint(); if (tok.UseGradiant)
edgePaint.StrokeWidth = paint.TextSize * (secondEdgeColor == null ? 8 : 4) / edge_Ratio; {
edgePaint.StrokeJoin = SKStrokeJoin.Round; //https://docs.microsoft.com/ja-jp/xamarin/xamarin-forms/user-interface/graphics/skiasharp/effects/shaders/linear-gradient
edgePaint.Color = new SKColor(edgeColor.R, edgeColor.G, edgeColor.B, edgeColor.A); paint.Shader = SKShader.CreateLinearGradient(
edgePaint.Style = SKPaintStyle.Stroke; new SKPoint(0, 25),
edgePaint.IsAntialias = true; new SKPoint(0, height - 25),
canvas.DrawPath(path, edgePaint); new SKColor[] {
new SKColor(tok.GradiantTop.R, tok.GradiantTop.G, tok.GradiantTop.B, tok.GradiantTop.A),
new SKColor(tok.GradiantBottom.R, tok.GradiantBottom.G, tok.GradiantBottom.B, tok.GradiantBottom.A) },
new float[] { 0, 1 },
SKShaderTileMode.Clamp);
paint.Color = new SKColor(0xffffffff);
}
else
{
paint.Shader = null;
paint.Color = new SKColor(tok.TextColor.R, tok.TextColor.G, tok.TextColor.B);
}
canvas.DrawText(tok.s, 25 + x_offset, -paint.FontMetrics.Ascent + 25, paint);
x_offset += token_width;
} }
if (drawMode.HasFlag(CFontRenderer.DrawMode.Gradation))
{
//https://docs.microsoft.com/ja-jp/xamarin/xamarin-forms/user-interface/graphics/skiasharp/effects/shaders/linear-gradient
paint.Shader = SKShader.CreateLinearGradient(
new SKPoint(0, 25),
new SKPoint(0, height - 25),
new SKColor[] {
new SKColor(gradationTopColor.R, gradationTopColor.G, gradationTopColor.B, gradationTopColor.A),
new SKColor(gradationBottomColor.R, gradationBottomColor.G, gradationBottomColor.B, gradationBottomColor.A) },
new float[] { 0, 1 },
SKShaderTileMode.Clamp);
paint.Color = new SKColor(0xffffffff);
}
else
{
paint.Shader = null;
paint.Color = new SKColor(fontColor.R, fontColor.G, fontColor.B);
}
canvas.DrawText(strs[i], 25, -paint.FontMetrics.Ascent + 25, paint);
canvas.Flush(); canvas.Flush();
images[i] = bitmap; images[i] = bitmap;

Binary file not shown.

View File

@ -8725,6 +8725,15 @@ namespace TJAPlayer3
} }
break; break;
} }
case "Heya_DescriptionTextOrigin":
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Heya_DescriptionTextOrigin[i] = int.Parse(strSplit[i]);
}
break;
}
#endregion #endregion
#region OnlineLounge #region OnlineLounge
@ -11059,6 +11068,7 @@ namespace TJAPlayer3
public int[] Heya_Side_Menu_Y = new int[] { -80, -10, 60, 130, 200, 270, 340, 410, 480, 550, 620, 690, 760 }; public int[] Heya_Side_Menu_Y = new int[] { -80, -10, 60, 130, 200, 270, 340, 410, 480, 550, 620, 690, 760 };
public int[] Heya_Side_Menu_Font_Offset = new int[] { 0, 14 }; public int[] Heya_Side_Menu_Font_Offset = new int[] { 0, 14 };
public int[] Heya_InfoSection = new int[] { 620, 560 }; public int[] Heya_InfoSection = new int[] { 620, 560 };
public int[] Heya_DescriptionTextOrigin = new int[] { 0, 0 };
public int Heya_Font_Scale = 14; public int Heya_Font_Scale = 14;
#endregion #endregion

View File

@ -527,28 +527,8 @@ namespace TJAPlayer3
{ {
using (SKCanvas canvas = new SKCanvas(lyrictex)) using (SKCanvas canvas = new SKCanvas(lyrictex))
{ {
//canvas.Clear(Color.Transparent);
canvas.Clear(); canvas.Clear();
/*
int x = 0;
int y = 0;
for (int i = 0; i < textures.Count; i++)
{
int tempwidth = (10 * TJAPlayer3.Skin.Game_Lyric_FontSize / TJAPlayer3.Skin.Font_Edge_Ratio * 2) * (textures[i].Count - 1);
x = (max_width - width[i]) / 2;
for (int j = 0; j < textures[i].Count; j++)
{
canvas.DrawBitmap(textures[i][j], x + tempwidth, y + ((height[i] - textures[i][j].Height) / 2) + (rubyheightoffset[i] / 2));
tempwidth += textures[i][j].Width - (10 * TJAPlayer3.Skin.Game_Lyric_FontSize / TJAPlayer3.Skin.Font_Edge_Ratio * 4) + 2 - j; // i don't know why this works, please don't ask me why this works
// disabled ruby width adjustment by コミ's request, original code below
// textures[i][j].Width - (10 * TJAPlayer3.Skin.Game_Lyric_FontSize / TJAPlayer3.Skin.Font_Edge_Ratio * 4) + 2 - j - rubywidthoffset[i][j];
}
y += height[i] - rubyheightoffset[i];
}
*/
int y = 0; int y = 0;
for (int i = 0; i < textures.Count; i++) for (int i = 0; i < textures.Count; i++)
{ {

View File

@ -0,0 +1,112 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FDK;
using static TJAPlayer3.CActSelect曲リスト;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
class CHeyaDisplayAssetInformations
{
private static TitleTextureKey? ttkDescription = null;
private static String ToHex(System.Drawing.Color c) => $"#{c.R:X2}{c.G:X2}{c.B:X2}";
private static int XOrigin
{
get
{
return TJAPlayer3.Skin.Heya_DescriptionTextOrigin[0];
}
}
private static int YOrigin
{
get
{
return TJAPlayer3.Skin.Heya_DescriptionTextOrigin[1];
}
}
public static void DisplayCharacterInfo(CCachedFontRenderer pf, CCharacter character)
{
string description = "";
description += ("Name: " + character.metadata.tGetName() + "\n");
description += ("Rarity: " + "<c." + ToHex(HRarity.tRarityToColor(character.metadata.Rarity)) + ">" + character.metadata.Rarity + "</c>" + "\n");
if (character.metadata.tGetDescription() != "") description += character.metadata.tGetDescription() + "\n";
description += ("Author: " + character.metadata.tGetAuthor() + "\n\n");
var gaugeType = character.effect.Gauge;
if (gaugeType == "Normal")
{
description += "Gauge Type: Normal\n";
description += "Finish the play within the clear zone to pass the song!\n";
}
else if (gaugeType == "Hard")
{
description += "Gauge Type: <c.#ff4444>Hard</c>\n";
description += "The gauge starts full and sharply depletes at each miss!\nBe careful, if the gauge value reachs 0, the play is automatically failed!\n";
}
else if (gaugeType == "Extreme")
{
description += "Gauge Type: <c.#360404>Extreme</c>\n";
description += "The gauge starts full and sharply depletes at each miss!\nA strange power seems to reduce the margin of error progressively through the song...\n";
}
var bombFactor = character.effect.BombFactor;
if (bombFactor < 10) description += $"Bomb Factor: {bombFactor}% of notes converted to mines in Minesweeper\n";
else if (bombFactor < 25) description += $"Bomb Factor: <c.#b0b0b0>{bombFactor}</c>% of notes converted to mines in Minesweeper\n";
else description += $"Bomb Factor: <c.#6b6b6b>{bombFactor}</c>% of notes converted to mines in Minesweeper\n";
var fuseFactor = character.effect.FuseRollFactor;
if (fuseFactor < 10) description += $"Fuse Factor: {fuseFactor}% of balloons converted to fuse rolls in Minesweeper\n";
else if (fuseFactor < 25) description += $"Fuse Factor: <c.#b474c4>{fuseFactor}</c>% of balloons converted to fuse rolls in Minesweeper\n";
else description += $"Fuse Factor: <c.#7c009c>{fuseFactor}</c>% of balloons converted to fuse rolls in Minesweeper\n";
description += $"Coin multiplier: x{character.effect.GetCoinMultiplier()}";
if (ttkDescription is null || ttkDescription.str文字 != description)
{
ttkDescription = new TitleTextureKey(description, pf, Color.White, Color.Black, 1000);
}
TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(ttkDescription).t2D描画(XOrigin, YOrigin);
}
public static void DisplayPuchicharaInfo(CCachedFontRenderer pf, CPuchichara puchi)
{
string description = "";
description += ("Name: " + puchi.metadata.tGetName() + "\n");
description += ("Rarity: " + "<c." + ToHex(HRarity.tRarityToColor(puchi.metadata.Rarity)) + ">" + puchi.metadata.Rarity + "</c>" + "\n");
if (puchi.metadata.tGetDescription() != "") description += puchi.metadata.tGetDescription() + "\n";
description += ("Author: " + puchi.metadata.tGetAuthor() + "\n\n");
if (puchi.effect.AllPurple) description += "All big notes become <c.#c800ff>Swap</c> notes\n";
if (puchi.effect.ShowAdlib) description += "<c.#c4ffe2>ADLib</c> notes become visible\n";
if (puchi.effect.Autoroll > 0) description += $"Automatic <c.#ffff00>Rolls</c> at {puchi.effect.Autoroll} hits/s\n";
if (puchi.effect.SplitLane) description += "<c.#ff4040>Split</c> <c.#4053ff>Lanes</c>\n";
description += $"Coin multiplier: x{puchi.effect.GetCoinMultiplier()}";
if (ttkDescription is null || ttkDescription.str文字 != description)
{
ttkDescription = new TitleTextureKey(description, pf, Color.White, Color.Black, 1000);
}
TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(ttkDescription).t2D描画(XOrigin, YOrigin);
}
public static void DisplayNameplateTitleInfo(CCachedFontRenderer pf)
{
}
public static void DisplayDanplateInfo(CCachedFontRenderer pf)
{
}
}
}

View File

@ -66,17 +66,20 @@ namespace TJAPlayer3
amount += TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles.Count; amount += TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles.Count;
this.ttkDanTitles = new TitleTextureKey[amount]; this.ttkDanTitles = new TitleTextureKey[amount];
this.sDanTitles = new string[amount];
// Silver Shinjin (default rank) always avaliable by default // Silver Shinjin (default rank) always avaliable by default
this.ttkDanTitles[0] = new TitleTextureKey("新人", this.pfHeyaFont, Color.White, Color.Black, 1000); this.ttkDanTitles[0] = new TitleTextureKey("新人", this.pfHeyaFont, Color.White, Color.Black, 1000);
this.sDanTitles[0] = "新人";
int idx = 1; int idx = 1;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles != null) if (TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles != null)
{ {
foreach (var item in TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles) foreach (var item in TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles)
{ {
this.sDanTitles[idx] = item.Key;
if (item.Value.isGold == true) if (item.Value.isGold == true)
this.ttkDanTitles[idx] = new TitleTextureKey(item.Key, this.pfHeyaFont, Color.Gold, Color.Black, 1000); this.ttkDanTitles[idx] = new TitleTextureKey($"<g.#FFE34A.#EA9622>{item.Key}</g>", this.pfHeyaFont, Color.Gold, Color.Black, 1000);
else else
this.ttkDanTitles[idx] = new TitleTextureKey(item.Key, this.pfHeyaFont, Color.White, Color.Black, 1000); this.ttkDanTitles[idx] = new TitleTextureKey(item.Key, this.pfHeyaFont, Color.White, Color.Black, 1000);
idx++; idx++;
@ -410,7 +413,7 @@ namespace TJAPlayer3
int danGrade = 0; int danGrade = 0;
if (pos > 0) if (pos > 0)
{ {
danGrade = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[pos].str文字].clearStatus; danGrade = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.sDanTitles[pos]].clearStatus;
} }
var scroll = DrawSide_Menu(i + (TJAPlayer3.Skin.Heya_Side_Menu_Count / 2)); var scroll = DrawSide_Menu(i + (TJAPlayer3.Skin.Heya_Side_Menu_Count / 2));
@ -481,16 +484,30 @@ namespace TJAPlayer3
#endregion #endregion
#region [Unlockable information zone] #region [Description area]
if (iCurrentMenu >= 0) if (iCurrentMenu >= 0)
{ {
#region [Unlockable information zone]
if (this.ttkInfoSection != null && this.ttkInfoSection.str文字 != "") if (this.ttkInfoSection != null && this.ttkInfoSection.str文字 != "")
TJAPlayer3.Tx.Heya_Box?.t2D描画(0, 0); TJAPlayer3.Tx.Heya_Box?.t2D描画(0, 0);
if (this.ttkInfoSection != null) if (this.ttkInfoSection != null)
TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(this.ttkInfoSection) TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(this.ttkInfoSection)
.t2D拡大率考慮上中央基準描画(TJAPlayer3.Skin.Heya_InfoSection[0], TJAPlayer3.Skin.Heya_InfoSection[1]); .t2D拡大率考慮上中央基準描画(TJAPlayer3.Skin.Heya_InfoSection[0], TJAPlayer3.Skin.Heya_InfoSection[1]);
#endregion
#region [Asset description]
if (this.ttkInfoSection == null || this.ttkInfoSection.str文字 == "")
{
if (iCurrentMenu == 0) CHeyaDisplayAssetInformations.DisplayPuchicharaInfo(this.pfHeyaFont, TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent]);
if (iCurrentMenu == 1) CHeyaDisplayAssetInformations.DisplayCharacterInfo(this.pfHeyaFont, TJAPlayer3.Tx.Characters[iCharacterCurrent]);
}
#endregion
} }
#endregion #endregion
@ -541,6 +558,8 @@ namespace TJAPlayer3
#endregion #endregion
#region [ Inputs ] #region [ Inputs ]
if (TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.RightArrow) || if (TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.RightArrow) ||
@ -657,11 +676,11 @@ namespace TJAPlayer3
if (iDanTitleCurrent > 0) if (iDanTitleCurrent > 0)
{ {
iG = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[iDanTitleCurrent].str文字].isGold; iG = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.sDanTitles[iDanTitleCurrent]].isGold;
cs = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.ttkDanTitles[iDanTitleCurrent].str文字].clearStatus; cs = TJAPlayer3.SaveFileInstances[iPlayer].data.DanTitles[this.sDanTitles[iDanTitleCurrent]].clearStatus;
} }
TJAPlayer3.SaveFileInstances[iPlayer].data.Dan = this.ttkDanTitles[iDanTitleCurrent].str文字; TJAPlayer3.SaveFileInstances[iPlayer].data.Dan = this.sDanTitles[iDanTitleCurrent];
TJAPlayer3.SaveFileInstances[iPlayer].data.DanGold = iG; TJAPlayer3.SaveFileInstances[iPlayer].data.DanGold = iG;
TJAPlayer3.SaveFileInstances[iPlayer].data.DanType = cs; TJAPlayer3.SaveFileInstances[iPlayer].data.DanType = cs;
@ -985,6 +1004,7 @@ namespace TJAPlayer3
private CCachedFontRenderer pfHeyaFont; private CCachedFontRenderer pfHeyaFont;
private TitleTextureKey[] ttkDanTitles; private TitleTextureKey[] ttkDanTitles;
private string[] sDanTitles;
private TitleTextureKey[] ttkTitles; private TitleTextureKey[] ttkTitles;
private int[] titlesKeys; private int[] titlesKeys;

View File

@ -1,6 +1,7 @@
using FDK; using FDK;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -85,7 +86,8 @@ namespace TJAPlayer3
txTitle[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(title, pfTitle, Color.Black, Color.Empty, 1000)); txTitle[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(title, pfTitle, Color.Black, Color.Empty, 1000));
txName[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(name, pfName[player], Color.White, Color.Black, 1000)); txName[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(name, pfName[player], Color.White, Color.Black, 1000));
txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(dan, pfdan, Color.White, Color.Black, 1000)); if (TJAPlayer3.SaveFileInstances[player].data.DanGold) txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey($"<g.#FFE34A.#EA9622>{dan}</g>", pfdan, Color.White, Color.Black, 1000));
else txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(dan, pfdan, Color.White, Color.Black, 1000));
} }
@ -176,13 +178,6 @@ namespace TJAPlayer3
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null) if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{ {
this.txdan[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Dan_Offset[0], y + TJAPlayer3.Skin.NamePlate_Dan_Offset[1]); this.txdan[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Dan_Offset[0], y + TJAPlayer3.Skin.NamePlate_Dan_Offset[1]);
if (TJAPlayer3.SaveFileInstances[player].data.DanGold)
{
TJAPlayer3.Tx.NamePlateBase.b乗算合成 = true;
tNamePlateDisplayNamePlateBase(x, y, 11);
TJAPlayer3.Tx.NamePlateBase.b乗算合成 = false;
}
} }
// Title text // Title text