mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 06:17:43 +01:00
Merge branch 'master' into csupdate-master
This commit is contained in:
commit
b52024d927
3 changed files with 22 additions and 22 deletions
|
|
@ -420,13 +420,13 @@ internal unsafe class UiDebug
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
Service<SeStringRenderer>.Get().Draw(textInputComponent->AtkComponentInputBase.RawString);
|
Service<SeStringRenderer>.Get().Draw(textInputComponent->AtkComponentInputBase.RawString);
|
||||||
|
|
||||||
ImGui.Text("Text1: "u8);
|
// ImGui.Text("Text1: "u8);
|
||||||
ImGui.SameLine();
|
// ImGui.SameLine();
|
||||||
Service<SeStringRenderer>.Get().Draw(textInputComponent->UnkText01);
|
// Service<SeStringRenderer>.Get().Draw(textInputComponent->UnkText01);
|
||||||
|
//
|
||||||
ImGui.Text("Text2: "u8);
|
// ImGui.Text("Text2: "u8);
|
||||||
ImGui.SameLine();
|
// ImGui.SameLine();
|
||||||
Service<SeStringRenderer>.Get().Draw(textInputComponent->UnkText02);
|
// Service<SeStringRenderer>.Get().Draw(textInputComponent->UnkText02);
|
||||||
|
|
||||||
ImGui.Text("AvailableLines: "u8);
|
ImGui.Text("AvailableLines: "u8);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
|
||||||
|
|
@ -89,20 +89,14 @@ internal unsafe class ComponentNodeTree : ResNodeTree
|
||||||
{
|
{
|
||||||
case TextInput:
|
case TextInput:
|
||||||
var textInputComponent = (AtkComponentTextInput*)this.Component;
|
var textInputComponent = (AtkComponentTextInput*)this.Component;
|
||||||
ImGui.Text(
|
ImGui.Text($"InputBase Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.EvaluatedString.StringPtr))}");
|
||||||
$"InputBase Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.EvaluatedString.StringPtr))}");
|
ImGui.Text($"InputBase Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.RawString.StringPtr))}");
|
||||||
ImGui.Text(
|
// TODO: Reenable when unknowns have been unprivated / named
|
||||||
$"InputBase Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.RawString.StringPtr))}");
|
// ImGui.Text($"Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText01.StringPtr))}");
|
||||||
ImGui.Text(
|
// ImGui.Text($"Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText02.StringPtr))}");
|
||||||
$"Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText01.StringPtr))}");
|
ImGui.Text($"AvailableLines: {Marshal.PtrToStringAnsi(new(textInputComponent->AvailableLines.StringPtr))}");
|
||||||
ImGui.Text(
|
ImGui.Text($"HighlightedAutoTranslateOptionColorPrefix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorPrefix.StringPtr))}");
|
||||||
$"Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText02.StringPtr))}");
|
ImGui.Text($"HighlightedAutoTranslateOptionColorSuffix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorSuffix.StringPtr))}");
|
||||||
ImGui.Text(
|
|
||||||
$"AvailableLines: {Marshal.PtrToStringAnsi(new(textInputComponent->AvailableLines.StringPtr))}");
|
|
||||||
ImGui.Text(
|
|
||||||
$"HighlightedAutoTranslateOptionColorPrefix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorPrefix.StringPtr))}");
|
|
||||||
ImGui.Text(
|
|
||||||
$"HighlightedAutoTranslateOptionColorSuffix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorSuffix.StringPtr))}");
|
|
||||||
break;
|
break;
|
||||||
case List:
|
case List:
|
||||||
case TreeList:
|
case TreeList:
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
|
||||||
using Dalamud.Data;
|
using Dalamud.Data;
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
using Dalamud.Game.Text;
|
using Dalamud.Game.Text;
|
||||||
|
|
||||||
using Lumina.Excel.Sheets;
|
using Lumina.Excel.Sheets;
|
||||||
using Lumina.Text;
|
using Lumina.Text;
|
||||||
using Lumina.Text.ReadOnly;
|
using Lumina.Text.ReadOnly;
|
||||||
|
|
@ -125,10 +126,15 @@ public static class ItemUtil
|
||||||
|
|
||||||
if (IsEventItem(itemId))
|
if (IsEventItem(itemId))
|
||||||
{
|
{
|
||||||
|
// Only English, German, and French have a Name field.
|
||||||
|
// For other languages, the Name is an empty string, and the Singular field should be used instead.
|
||||||
|
language ??= dataManager.Language;
|
||||||
|
var useSingular = language is not (ClientLanguage.English or ClientLanguage.German or ClientLanguage.French);
|
||||||
|
|
||||||
return dataManager
|
return dataManager
|
||||||
.GetExcelSheet<EventItem>(language)
|
.GetExcelSheet<EventItem>(language)
|
||||||
.TryGetRow(itemId, out var eventItem)
|
.TryGetRow(itemId, out var eventItem)
|
||||||
? eventItem.Name
|
? (useSingular ? eventItem.Singular : eventItem.Name)
|
||||||
: default;
|
: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue