-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
################################################################################ | ||
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 | ||
################################################################################ | ||
|
||
/src/DTSDebug | ||
/src/DTS_Addon/bin/Debug | ||
/src/DTS_Addon/obj/Debug | ||
/src/DTS_zh/bin/Debug | ||
/src/KSP_zh/bin/Debug | ||
/src/KSP_zh/obj/Debug | ||
/src/DTS_zh/obj/Debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!--一条记录创建一个Config--> | ||
<Configs> | ||
<!--战略--> | ||
<Config url="Squad/Contracts/Contracts/Contracts"> | ||
<Nodes> | ||
<Node name="Base"> | ||
<Nodes> | ||
<Node name="PART_REQUEST"> | ||
<Values> | ||
<Value name="Title"><![CDATA[一Have a research lab at the outpost]]></Value> | ||
</Values> | ||
</Node> | ||
<Node name="PART_REQUEST"> | ||
<Values> | ||
<Value name="Title"><![CDATA[二Have a viewing cupola at the outpost]]></Value> | ||
</Values> | ||
</Node> | ||
</Nodes> | ||
|
||
</Node> | ||
|
||
</Nodes> | ||
</Config> | ||
</Configs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
|
||
using System.Text; | ||
|
||
using UnityEngine; | ||
|
||
namespace DTS_Addon.SuperTool | ||
{ | ||
[KSPAddon(KSPAddon.Startup.EveryScene, false)] | ||
public class xFontTool : MonoBehaviour | ||
{ | ||
void OnGUI() | ||
{ | ||
//a = GUI.TextField(new Rect(50, 50, 100, 20), a); | ||
|
||
//if (GUI.Button(new Rect(50, 75, 100, 20), "3423")) | ||
//{ | ||
// var go = GameObject.Find("ProgressBar"); | ||
// go.transform.localScale = new Vector3(1, 5, 1); | ||
// go.transform.position = new Vector3(go.transform.position.x, go.transform.position.y, go.transform.position.z); | ||
//} | ||
if (SuperTools.UIxFontTool == true) | ||
{ | ||
xFont.XFont.IsWatch = true; | ||
xFontWindow = GUI.Window(104, xFontWindow, CxFontWindow, "汉化监视"); | ||
} | ||
else | ||
{ | ||
xFont.XFont.IsWatch = false; | ||
} | ||
|
||
} | ||
|
||
public List<Node> Nodes; | ||
|
||
Rect xFontWindow = new Rect(100, 100, 400, 400); | ||
Vector2 scrollPosition; | ||
|
||
|
||
void CxFontWindow(int id) | ||
{ | ||
|
||
GUI.DragWindow(new Rect(0, 0, 380, 30)); | ||
|
||
GUI.Label(new Rect(10, 20, 400, 20), xFont.XFont.FindStr); | ||
GUI.Label(new Rect(10, 40, 400, 20), xFont.XFont.xFontStr); | ||
GUI.Label(new Rect(10, 60, 400, 20), xFont.XFont.xTextStr); | ||
GUI.Label(new Rect(10, 80, 400, 20), xFont.XFont.AllStr); | ||
|
||
//开始滚动视图 | ||
scrollPosition = GUI.BeginScrollView(new Rect(5, 100, 390, 295), scrollPosition, new Rect(0, 0, 370, (xFont.XFont.sts.Length + xFont.XFont.strs.Length) * 20)); | ||
|
||
int index = 0; | ||
GUI.Label(new Rect(0, index * 20, 370, 20), "SpriteText:" + xFont.XFont.sts.Length.ToString()); | ||
index++; | ||
foreach (var item in xFont.XFont.sts) | ||
{ | ||
GUI.TextField(new Rect(0, index * 20, 350, 20), item.name + ":" + item.Text); | ||
if (GUI.Button(new Rect (350,index *20,20,20),"+")) | ||
{ | ||
File.AppendAllText("GameData/DTS_zh/App.txt", item.Text); | ||
} | ||
|
||
index++; | ||
} | ||
GUI.Label(new Rect(0, index * 20, 370, 20), "SpriteTextRich:" + xFont.XFont.sts.Length.ToString()); | ||
index++; | ||
foreach (var item in xFont.XFont.strs) | ||
{ | ||
GUI.TextField(new Rect(0, index * 20, 350, 20), item.name + ":" + item.Text); | ||
if (GUI.Button(new Rect(350, index * 20, 20, 20), "+")) | ||
{ | ||
File.AppendAllText("GameData/DTS_zh/App.txt", item.Text); | ||
} | ||
index++; | ||
} | ||
|
||
//结束滚动视图 | ||
GUI.EndScrollView(); | ||
|
||
} | ||
} | ||
} |