update layout

master
reng 3 years ago
parent 8a8b7eae7a
commit 8024428887
  1. 20
      03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/Main-1-Intro.unity
  2. 4
      03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/Main-5-Postcard.unity
  3. 31
      03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/ThaiAdjust.cs

@ -830,10 +830,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19"
m_text: START
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 03bb15ef7ad46ec48aff332feb8ce724, type: 2}
m_sharedMaterial: {fileID: 7910913602227019456, guid: 03bb15ef7ad46ec48aff332feb8ce724,
m_fontAsset: {fileID: 11400000, guid: f101d65fcacbc3c4894c0658b75abed3, type: 2}
m_sharedMaterial: {fileID: -329485177201057125, guid: f101d65fcacbc3c4894c0658b75abed3,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -864,7 +864,7 @@ MonoBehaviour:
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 16
m_fontStyle: 17
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -1877,10 +1877,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0E23\u0E30\u0E1A\u0E32\u0E22\u0E2A\u0E35"
m_text: Coloring
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 03bb15ef7ad46ec48aff332feb8ce724, type: 2}
m_sharedMaterial: {fileID: 7910913602227019456, guid: 03bb15ef7ad46ec48aff332feb8ce724,
m_fontAsset: {fileID: 11400000, guid: 25926ab1c3fc54a41bc3babca7b0791a, type: 2}
m_sharedMaterial: {fileID: 2326978606804711938, guid: 25926ab1c3fc54a41bc3babca7b0791a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -3587,10 +3587,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Eng
m_text: "\u0E44\u0E17\u0E22"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: f101d65fcacbc3c4894c0658b75abed3, type: 2}
m_sharedMaterial: {fileID: -329485177201057125, guid: f101d65fcacbc3c4894c0658b75abed3,
m_fontAsset: {fileID: 11400000, guid: 03bb15ef7ad46ec48aff332feb8ce724, type: 2}
m_sharedMaterial: {fileID: 7910913602227019456, guid: 03bb15ef7ad46ec48aff332feb8ce724,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}

@ -2757,7 +2757,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -460, y: -758.4}
m_AnchoredPosition: {x: -253, y: -758.4}
m_SizeDelta: {x: 749.6, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1273949110
@ -2853,7 +2853,7 @@ MonoBehaviour:
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 17
m_HorizontalAlignment: 2
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0

@ -23,32 +23,23 @@ namespace UltraCombos.Marvel.DrawHeroes
{
// fix();
}
private string StringToHexString(string s, Encoding encode)
{
byte[] b = encode.GetBytes(s);
string result = string.Empty;
for (int i = 0; i < b.Length; i++)
{
if(i%2==0) result+="\\x";
result += Convert.ToString(b[i], 16);
}
Debug.Log(result);
return result;
}
void fix(){
var current=I2.Loc.LocalizationManager.CurrentLanguage;
// Debug.Log(current);
if(current!="Thai") return;
var text=GetComponent<TMP_Text>();
// string unicodeString=StringToHexString(text.text, Encoding.UTF8);
if(current!="Thai"){
text.margin=new Vector4(0,0,0,0);
return;
}
var adjust=ThaiFontAdjuster.Adjust(text.text);
text.fontStyle ^= FontStyles.Bold;
// text.margin.Set(0,0,-30,0);
bool isBold = (text.fontStyle & FontStyles.Bold) != 0;
if(isBold)
text.fontStyle ^= FontStyles.Bold;
text.margin=text.margin+new Vector4(0,-text.fontSize*.3f,0,0);
text.SetText(adjust);

Loading…
Cancel
Save