diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml
index a7c75b5..1c9ae52 100644
--- a/.github/workflows/msbuild.yml
+++ b/.github/workflows/msbuild.yml
@@ -293,6 +293,7 @@ jobs:
- name: 提交给 SignPath 签名
id: signpath
+ timeout-minutes: 30
uses: signpath/github-action-submit-signing-request@v1.1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
@@ -409,7 +410,7 @@ jobs:
$size3 = (Get-Item $uploadFile3).Length
$content = @"
- "Insider": {
+ "${{ steps.softwareChannel.outputs.VALUE }}": {
"edition_date": "${{ steps.softwareDate.outputs.VALUE }}",
"edition_code": "",
"hash": {
@@ -606,6 +607,8 @@ jobs:
- name: Upload to WebDAV with rclone
id: upload_webdav
+ timeout-minutes: 60
+ continue-on-error: true
shell: pwsh
run: |
if ("${{ secrets.WEBDAV_API_TOKEN }}" -ne "")
@@ -618,7 +621,7 @@ jobs:
# 开始上传
Write-Host "开始上传到 WebDAV..."
Write-Host "进度将每 10 秒更新一次"
- Write-Host "超时时间: 5 分钟"
+ Write-Host "超时时间: 15 分钟"
Write-Host "目标路径: /Inkeys/PackageHistory/$Env:GITHUB_REF_NAME"
Write-Host ""
@@ -629,7 +632,7 @@ jobs:
--progress `
--transfers 1 `
--checkers 1 `
- --timeout 5m `
+ --timeout 30s `
--contimeout 30s `
--retries 3 `
--retries-sleep 5s `
diff --git a/PptCOM/PptCOM.cs b/PptCOM/PptCOM.cs
index 335771e..a70da6a 100644
--- a/PptCOM/PptCOM.cs
+++ b/PptCOM/PptCOM.cs
@@ -71,7 +71,7 @@ public class PptCOMServer : IPptCOMServer
private unsafe int* pptTotalPage;
private unsafe int* pptCurrentPage;
- private int polling = 0; // 结束界面轮询
+ private int polling = 0; // 结束界面轮询(0正常页 1/2末页或结束放映页)(2设定为运行一次不被检查的翻页,虽然我也不知道当时写这个是为了特判什么情况Hhh)
private DateTime updateTime; // 更新时间点
private bool bindingEvents;
@@ -98,7 +98,7 @@ public unsafe bool Initialization(int* TotalPage, int* CurrentPage, bool autoClo
}
public string CheckCOM()
{
- string ret = "20250508a";
+ string ret = "20250714a";
try
{
@@ -124,10 +124,18 @@ private unsafe void SlideShowChange(Microsoft.Office.Interop.PowerPoint.SlideSho
{
updateTime = DateTime.Now;
- if (pptActWindow.View.Slide.SlideIndex >= pptActDoc.Slides.Count) polling = 1;
- else polling = 0;
+ try
+ {
+ *pptCurrentPage = pptActWindow.View.Slide.SlideIndex;
- *pptCurrentPage = pptActWindow.View.Slide.SlideIndex;
+ if (pptActWindow.View.Slide.SlideIndex >= pptActDoc.Slides.Count) polling = 1;
+ else polling = 0;
+ }
+ catch
+ {
+ *pptCurrentPage = -1;
+ polling = 1;
+ }
}
private unsafe void SlideShowBegin(Microsoft.Office.Interop.PowerPoint.SlideShowWindow Wn)
@@ -135,12 +143,20 @@ private unsafe void SlideShowBegin(Microsoft.Office.Interop.PowerPoint.SlideShow
updateTime = DateTime.Now;
pptActWindow = Wn;
- if (pptActWindow.View.Slide.SlideIndex >= pptActDoc.Slides.Count) polling = 1;
- else polling = 0;
+ try
+ {
+ if (pptActWindow.View.Slide.SlideIndex >= pptActDoc.Slides.Count) polling = 1;
+ else polling = 0;
+ }
+ catch
+ {
+ // Begin 事件定在结束放映页的小丑情况(虽然不可能有这种情况)
+ polling = 1;
+ }
// 获取页数
- *pptCurrentPage = pptActWindow.View.Slide.SlideIndex;
*pptTotalPage = pptActDoc.Slides.Count;
+ *pptCurrentPage = pptActWindow.View.Slide.SlideIndex;
}
private unsafe void SlideShowShowEnd(Microsoft.Office.Interop.PowerPoint.Presentation Wn)
@@ -407,7 +423,10 @@ public unsafe void NextSlideShow(int check)
// 下一页
if (polling != 0)
{
- if (polling == 2) pptActWindow.View.Next();
+ if (polling == 2)
+ {
+ pptActWindow.View.Next();
+ }
else if (polling == 1)
{
int currentPageTemp = -1;
@@ -419,11 +438,17 @@ public unsafe void NextSlideShow(int check)
{
currentPageTemp = -1;
}
- if (currentPageTemp != -1) pptActWindow.View.Next();
+ if (currentPageTemp != -1)
+ {
+ pptActWindow.View.Next();
+ }
}
polling = 1;
}
- else pptActWindow.View.Next();
+ else
+ {
+ pptActWindow.View.Next();
+ }
}
catch
{
diff --git a/README_EN.md b/README_EN.md
index 0932dd2..c481005 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -1,7 +1,4 @@
-
-We are sorry to inform you that the internationalization language of the program itself is not yet complete and has not been added to the program.
-**We will complete it as soon as possible!**
**Copyright(©) 2023-2025 AlanCRL(Chen YunLam) Studio**
@@ -15,7 +12,7 @@ The backup repository is located at [GitCode](https://gitcode.com/alan16356/Inke
# 智绘教Inkeys
[简体中文](README.md) | **English**
-[Download from Github Release Assets](https://github.com/Alan-CRL/IDT/releases) | **[Official Website(Chinese)](https://www.inkeys.top)** | FAQ
+[Download from Github Release Assets](https://github.com/Alan-CRL/IDT/releases) | **[Official Website](https://en.inkeys.top)** | FAQ
[](https://qm.qq.com/cgi-bin/qm/qr?k=9V2l83dc0yP4UYeDF-NkTX0o7_TcYqlh&jump_from=webapi&authKey=LsLLUhb1KSzHYbc8k5nCQDqTtRcRUCEE3j+DdR9IgHaF/7JF7LLpY191hsiYEBz6)  
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtConfiguration.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtConfiguration.cpp"
index 7ab738e..5d613a7 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtConfiguration.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtConfiguration.cpp"
@@ -117,8 +117,8 @@ bool ReadSetting()
setlist.configurationSetting.enable = setlistVal["ConfigurationSetting"]["Enable"].asBool();
}
- if (setlistVal.isMember("SelectLanguage") && setlistVal["SelectLanguage"].isBool())
- setlist.selectLanguage = setlistVal["SelectLanguage"].asBool();
+ if (setlistVal.isMember("SelectLanguage") && setlistVal["SelectLanguage"].isInt())
+ setlist.selectLanguage = setlistVal["SelectLanguage"].asInt();
if (setlistVal.isMember("StartUp") && setlistVal["StartUp"].isBool())
setlist.startUp = setlistVal["StartUp"].asBool();
if (setlistVal.isMember("SettingGlobalScale") && setlistVal["SettingGlobalScale"].isDouble())
@@ -184,8 +184,8 @@ bool ReadSetting()
if (setlistVal["Performance"].isMember("PreparationQuantity") && setlistVal["Performance"]["PreparationQuantity"].isInt())
setlist.performanceSetting.preparationQuantity = setlistVal["Performance"]["PreparationQuantity"].asInt();
- if (setlistVal["Performance"].isMember("SuperDrawBeta") && setlistVal["Performance"]["SuperDrawBeta"].isBool())
- setlist.performanceSetting.superDraw = setlistVal["Performance"]["SuperDrawBeta"].asBool();
+ if (setlistVal["Performance"].isMember("SuperDrawBeta2") && setlistVal["Performance"]["SuperDrawBeta2"].isBool())
+ setlist.performanceSetting.superDraw = setlistVal["Performance"]["SuperDrawBeta2"].asBool();
}
if (setlistVal.isMember("Preset") && setlistVal["Preset"].isObject())
{
@@ -421,7 +421,7 @@ bool WriteSetting()
{
setlistVal["Performance"]["PreparationQuantity"] = Json::Value(setlist.performanceSetting.preparationQuantity);
- setlistVal["Performance"]["SuperDrawBeta"] = Json::Value(setlist.performanceSetting.superDraw);
+ setlistVal["Performance"]["SuperDrawBeta2"] = Json::Value(setlist.performanceSetting.superDraw);
}
{
setlistVal["Preset"]["MemoryWidth"] = Json::Value(setlist.presetSetting.memoryWidth);
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtConfiguration.h" "b/\346\231\272\347\273\230\346\225\231/IdtConfiguration.h"
index fae7714..32d9cf0 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtConfiguration.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtConfiguration.h"
@@ -22,6 +22,9 @@ struct SetListStruct
#pragma region 常规
int selectLanguage;
+ // en-US 0
+ // zh-CN 1
+ // zh-TW 2
bool startUp;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtD2DPreparation.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtD2DPreparation.cpp"
index 3366596..6892126 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtD2DPreparation.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtD2DPreparation.cpp"
@@ -11,7 +11,7 @@ void D2DStarup()
// 创建 D2D 工厂
D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, &D2DFactory);
- // 创建 DC Render 并指定软件加速(因为比硬件加速快,不知道为啥)
+ // 创建 DC Render 并指定软件加速(因为比硬件加速快,不知道为啥,现在知道了qaq)
D2DProperty = D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE::D2D1_RENDER_TARGET_TYPE_SOFTWARE,
D2D1::PixelFormat(
DXGI_FORMAT_B8G8R8A8_UNORM,
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtDrawpad.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtDrawpad.cpp"
index a29a4b2..772f15e 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtDrawpad.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtDrawpad.cpp"
@@ -60,8 +60,11 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
}
else if (IsHotkeyDown && !(KeyBoradDown[VK_CONTROL] || KeyBoradDown[VK_LCONTROL] || KeyBoradDown[VK_RCONTROL]) && !(KeyBoradDown[VK_LWIN] || KeyBoradDown[VK_RWIN]) && !(KeyBoradDown[VK_MENU] || KeyBoradDown[VK_LMENU] || KeyBoradDown[VK_RMENU])) IsHotkeyDown = false;
- // 按键反馈
- if (ppt_show != NULL && !CheckEndShow.isChecking)
+ // 全局状态变量
+ bool checkEndShowIsChecking = CheckEndShow.isChecking;
+
+ // PPT模式:按键反馈
+ if (ppt_show != NULL && !checkEndShowIsChecking)
{
// 检查按下的键
switch (pKeyInfo->vkCode)
@@ -103,7 +106,7 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
}
}
}
- // 传递拦截
+ // 传递拦截(主要是快捷键)
if (stateMode.StateModeSelect != StateModeSelectEnum::IdtSelection && !penetrate.select)
{
ExMessage msgKey = {};
@@ -118,7 +121,6 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
hiex::g_vecWindows[index].vecMessage.push_back(msgKey);
lg_vecWindows_vecMessage_sm.unlock();
- if (ppt_show != NULL && !CheckEndShow.isChecking)
{
switch (pKeyInfo->vkCode)
{
@@ -168,6 +170,10 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
case VK_NUMPAD7:
case VK_NUMPAD8:
case VK_NUMPAD9:
+ {
+ // 为后续单个字母做快捷键做用户体验准备
+ return 1;
+ }
case VK_NEXT: // PgDn
case VK_PRIOR: // PgUp
@@ -179,67 +185,13 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
case VK_BACK: // Backsapce
case VK_RETURN: // Enter
case VK_ESCAPE: // 退出
-
- {
- return 1;
- }
-
- default:
- break;
- }
- }
- else
- {
- switch (pKeyInfo->vkCode)
- {
- case 0x30:
- case 0x31:
- case 0x32:
- case 0x33:
- case 0x34:
- case 0x35:
- case 0x36:
- case 0x37:
- case 0x38:
- case 0x39:
- case 0x41:
- case 0x42:
- case 0x43:
- case 0x44:
- case 0x45:
- case 0x46:
- case 0x47:
- case 0x48:
- case 0x49:
- case 0x4A:
- case 0x4B:
- case 0x4C:
- case 0x4D:
- case 0x4E:
- case 0x4F:
- case 0x50:
- case 0x51:
- case 0x52:
- case 0x53:
- case 0x54:
- case 0x55:
- case 0x56:
- case 0x57:
- case 0x58:
- case 0x59:
- case 0x5A:
- case VK_NUMPAD0:
- case VK_NUMPAD1:
- case VK_NUMPAD2:
- case VK_NUMPAD3:
- case VK_NUMPAD4:
- case VK_NUMPAD5:
- case VK_NUMPAD6:
- case VK_NUMPAD7:
- case VK_NUMPAD8:
- case VK_NUMPAD9:
{
- return 1;
+ // PPT 模式下,拦截按键并进行转译:支持长安翻页
+ if (ppt_show != NULL && !checkEndShowIsChecking)
+ {
+ return 1;
+ }
+ else break;
}
default:
@@ -265,7 +217,7 @@ LRESULT CALLBACK DrawpadHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
return 1;
}
*/
- // 穿透所需的额外情况
+ // 穿透所需的额外情况(穿透模式下禁用 Ctrl + E,用于关闭穿透)
else if (penetrate.select && (KeyBoradDown[VK_CONTROL] || KeyBoradDown[VK_LCONTROL] || KeyBoradDown[VK_RCONTROL]) && (BYTE)pKeyInfo->vkCode == (BYTE)0x45)
{
ExMessage msgKey = {};
@@ -397,7 +349,7 @@ void KeyboardInteraction()
}
}
- // 定格 Q
+ // 定格 Ctrl + Q
if (m.vkcode == (BYTE)0x51 && m.prevdown && m.message == WM_KEYDOWN)
{
while (1)
@@ -423,7 +375,7 @@ void KeyboardInteraction()
this_thread::sleep_for(chrono::milliseconds(10));
}
}
- // 穿透 E
+ // 穿透 Ctrl + E
if (m.vkcode == (BYTE)0x45 && m.prevdown && m.message == WM_KEYDOWN)
{
while (1)
@@ -451,8 +403,8 @@ void KeyboardInteraction()
}
}
- // 撤回 Z
- if (m.vkcode == (BYTE)0x5A && m.message == WM_KEYDOWN)
+ // 撤回 Ctrl + Z
+ if (m.vkcode == (BYTE)0x5A && m.prevdown && m.message == WM_KEYDOWN)
{
while (1)
{
@@ -739,13 +691,15 @@ void MultiFingerDrawing(LONG pid, TouchMode initialMode, StateModeClass stateInf
{
//chrono::high_resolution_clock::time_point reckon;
//reckon = chrono::high_resolution_clock::now();
+
if (!setlist.performanceSetting.superDraw)
{
- //this_thread::sleep_for(chrono::milliseconds(1));
- this_thread::yield();
+ this_thread::sleep_for(chrono::milliseconds(1));
}
+
//double tmp = chrono::duration
(chrono::high_resolution_clock::now() - reckon).count();
//cerr << tmp << "ms" << endl;
+
continue;
}
}
@@ -1137,7 +1091,9 @@ void MultiFingerDrawing(LONG pid, TouchMode initialMode, StateModeClass stateInf
{
if (mode.pt.x == pointInfo.previousX && mode.pt.y == pointInfo.previousY)
{
- if (!setlist.performanceSetting.superDraw) this_thread::sleep_for(chrono::milliseconds(1));
+ if (setlist.performanceSetting.superDraw) this_thread::yield();
+ else this_thread::sleep_for(chrono::milliseconds(1));
+
continue;
}
}
@@ -1409,7 +1365,9 @@ void MultiFingerDrawing(LONG pid, TouchMode initialMode, StateModeClass stateInf
// 过滤未动触摸点
if (mode.pt.x == pointInfo.previousX && mode.pt.y == pointInfo.previousY)
{
- if (!setlist.performanceSetting.superDraw) this_thread::yield();
+ if (setlist.performanceSetting.superDraw) this_thread::yield();
+ else this_thread::sleep_for(chrono::milliseconds(1));
+
continue;
}
@@ -1669,7 +1627,8 @@ void DrawpadDrawing()
if (offSignal) goto DrawpadDrawingEnd;
}
- if (setlist.performanceSetting.superDraw) timeBeginPeriod(1);
+ // 设置全局高精度
+ timeBeginPeriod(1);
{
if (PptInfoStateBuffer.TotalPage != -1 && ppt_switch_count != 0 && PptImg.IsSaved[PptInfoStateBuffer.CurrentPage])
@@ -1835,7 +1794,8 @@ void DrawpadDrawing()
break;
}
- if (setlist.performanceSetting.superDraw) timeBeginPeriod(1);
+ // 设置全局高精度
+ timeBeginPeriod(1);
if (setlist.regularSetting.avoidFullScreen) SetWindowPos(drawpad_window, NULL, MainMonitor.rcMonitor.left, MainMonitor.rcMonitor.top, MainMonitor.MonitorWidth, MainMonitor.MonitorHeight, SWP_NOZORDER | SWP_NOACTIVATE);
nRet = GetWindowLongPtrW(drawpad_window, GWL_EXSTYLE);
@@ -1964,12 +1924,7 @@ void DrawpadDrawing()
}
else if (PptInfoStateBuffer.TotalPage != temp_totalpage && temp_totalpage == -1)
{
- stateMode.StateModeSelect = StateModeSelectEnum::IdtSelection;
- //choose.select = true;
-
- //brush.select = false;
- //rubber.select = false;
- penetrate.select = false;
+ ChangeStateModeToSelection();
}
PptInfoStateBuffer.CurrentPage = temp_currentpage;
PptInfoStateBuffer.TotalPage = temp_totalpage;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtFloating.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtFloating.cpp"
index 9400919..e797872 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtFloating.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtFloating.cpp"
@@ -4378,7 +4378,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/PaintThickness/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/PaintThickness/height"].v);
}
- graphics.DrawString(L"粗\n细", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Thinkness").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
hiex::EasyX_Gdiplus_FillRoundRect(UIControl[L"RoundRect/PaintThicknessPrompt/x"].v, UIControl[L"RoundRect/PaintThicknessPrompt/y"].v, min(UIControl[L"RoundRect/PaintThickness/x"].v + 97 - UIControl[L"RoundRect/PaintThicknessPrompt/x"].v, UIControl[L"RoundRect/PaintThicknessPrompt/width"].v), min(UIControl[L"RoundRect/PaintThickness/y"].v + 72 - UIControl[L"RoundRect/PaintThicknessPrompt/y"].v, UIControl[L"RoundRect/PaintThicknessPrompt/height"].v), max(10, UIControl[L"RoundRect/PaintThicknessPrompt/ellipseheight"].v - max(0, UIControl[L"RoundRect/PaintThicknessPrompt/width"].v - 60) * 2), max(10, UIControl[L"RoundRect/PaintThicknessPrompt/ellipseheight"].v - max(0, UIControl[L"RoundRect/PaintThicknessPrompt/height"].v - 60) * 2), UIControlColor[L"RoundRect/PaintThicknessPrompt/frame"].v, UIControlColor[L"RoundRect/PaintThicknessPrompt/fill"].v, 2, true, SmoothingModeHighQuality, &background);
@@ -4459,7 +4459,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/PaintBrush/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/PaintBrush/height"].v);
}
- graphics.DrawString(L"画笔", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Pen").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
{
ChangeColor(floating_icon[11], UIControlColor[L"Image/FluorescentBrush/words_color"].v);
@@ -4476,7 +4476,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/FluorescentBrush/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/FluorescentBrush/height"].v);
}
- graphics.DrawString(L"荧光笔", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Highlighter").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
{
@@ -4494,7 +4494,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/WriteBrush/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/WriteBrush/height"].v);
}
- graphics.DrawString(L"书写", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Write").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
{
ChangeColor(floating_icon[14], UIControlColor[L"Image/LineBrush/words_color"].v);
@@ -4511,7 +4511,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/LineBrush/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/LineBrush/height"].v);
}
- graphics.DrawString(L"直线", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Line").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
{
ChangeColor(floating_icon[15], UIControlColor[L"Image/RectangleBrush/words_color"].v);
@@ -4528,7 +4528,7 @@ void DrawScreen()
words_rect.right = LONG(words_rect.left + UIControl[L"Words/RectangleBrush/width"].v);
words_rect.bottom = LONG(words_rect.top + UIControl[L"Words/RectangleBrush/height"].v);
}
- graphics.DrawString(L"矩形", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Pen/Square").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
hiex::EasyX_Gdiplus_RoundRect(max(UIControl[L"RoundRect/BrushChoose/x"].v, UIControl[L"RoundRect/BrushBottom/x"].v + 5), UIControl[L"RoundRect/BrushChoose/y"].v, UIControl[L"RoundRect/BrushChoose/width"].v, UIControl[L"RoundRect/BrushChoose/height"].v, UIControl[L"RoundRect/BrushChoose/ellipseheight"].v, UIControl[L"RoundRect/BrushChoose/ellipsewidth"].v, UIControlColor[L"RoundRect/BrushChoose/frame"].v, 2, true, SmoothingModeHighQuality, &background);
@@ -4621,8 +4621,8 @@ void DrawScreen()
words_rect.right = LONG(UIControl[L"Words/choose/right"].v);
words_rect.bottom = LONG(UIControl[L"Words/choose/bottom"].v);
}
- if (stateMode.StateModeSelect == StateModeSelectEnum::IdtSelection) graphics.DrawString(get(i18n[i18nEnum::MainColumnSelect]).c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
- else graphics.DrawString(get(i18n[i18nEnum::MainColumnSelectClean]).c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ if (stateMode.StateModeSelect == StateModeSelectEnum::IdtSelection) graphics.DrawString(IW("UI/Centre/Select").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ else graphics.DrawString(IW("UI/Centre/SelectClean").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
//画笔
{
@@ -4638,7 +4638,7 @@ void DrawScreen()
words_rect.right = LONG(UIControl[L"Words/brush/right"].v);
words_rect.bottom = LONG(UIControl[L"Words/brush/bottom"].v);
}
- graphics.DrawString(get(i18n[i18nEnum::MainColumnPen]).c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Centre/Pen").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
WordBrush.SetColor(hiex::ConvertToGdiplusColor(UIControlColor[L"Words/brushSize/words_color"].v, true));
Gdiplus::Font gp_font_02(&HarmonyOS_fontFamily, 20, FontStyleRegular, UnitPixel);
@@ -4658,7 +4658,7 @@ void DrawScreen()
words_rect.right = LONG(UIControl[L"Words/rubber/right"].v);
words_rect.bottom = LONG(UIControl[L"Words/rubber/bottom"].v);
}
- graphics.DrawString(get(i18n[i18nEnum::MainColumnEraser]).c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Centre/Eraser").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
//选项
{
@@ -4675,7 +4675,7 @@ void DrawScreen()
words_rect.right = LONG(UIControl[L"Words/test/right"].v);
words_rect.bottom = LONG(UIControl[L"Words/test/bottom"].v);
}
- graphics.DrawString(get(i18n[i18nEnum::MainColumnOptions]).c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Centre/Options").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
// Customize
@@ -5106,7 +5106,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 8 + 40;
}
- graphics.DrawString(L"穿透", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Pierce").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
else
{
@@ -5123,7 +5123,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 8 + 40;
}
- graphics.DrawString(L"穿透", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Pierce").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
}
if ((int)state == 1)
@@ -5190,7 +5190,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 50 + 40;
}
- graphics.DrawString(L"定格", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Freeze").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
else
{
@@ -5207,7 +5207,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 50 + 40;
}
- graphics.DrawString(L"定格", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Freeze").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
}
else if (stateMode.StateModeSelect != StateModeSelectEnum::IdtSelection)
@@ -5229,7 +5229,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 50 + 40;
}
- graphics.DrawString(L"定格", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Freeze").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
else
{
@@ -5246,7 +5246,7 @@ void DrawScreen()
words_rect.right = floating_windows.width - 96 + 40 + 56;
words_rect.bottom = floating_windows.height - 256 + 50 + 40;
}
- graphics.DrawString(L"定格", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Freeze").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
}
}
@@ -5266,7 +5266,7 @@ void DrawScreen()
words_rect.right = (floating_windows.width - 96 + 30) + 66;
words_rect.bottom = (floating_windows.height - 55) + 42;
}
- graphics.DrawString(L"撤回", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Revoke").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
else if ((stateMode.StateModeSelect != StateModeSelectEnum::IdtSelection || (int)state == 1) && RecallImage.empty() && current_record_pointer <= total_record_pointer + 1 && practical_total_record_pointer)
{
@@ -5281,7 +5281,7 @@ void DrawScreen()
words_rect.right = (floating_windows.width - 96 + 30) + 66;
words_rect.bottom = (floating_windows.height - 55) + 42;
}
- graphics.DrawString(L"超级恢复", -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
+ graphics.DrawString(IW("UI/Operate/Recall").c_str(), -1, &gp_font, hiex::RECTToRectF(words_rect), &stringFormat, &WordBrush);
}
}
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtFreezeFrame.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtFreezeFrame.cpp"
index 975becb..a93b239 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtFreezeFrame.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtFreezeFrame.cpp"
@@ -3,6 +3,7 @@
#include "IdtConfiguration.h"
#include "IdtDisplayManagement.h"
#include "IdtDraw.h"
+#include "IdtI18n.h"
#include "IdtImage.h"
#include "IdtMagnification.h"
#include "IdtPlug-in.h"
@@ -228,8 +229,8 @@ void FreezeFrameWindow()
hiex::EasyX_Gdiplus_FillRoundRect((float)GetSystemMetrics(SM_CXSCREEN) / 2 - 160, (float)GetSystemMetrics(SM_CYSCREEN) - 200, 320, 50, 20, 20, RGBA(255, 255, 225, min(255, FreezeRecall)), RGBA(0, 0, 0, min(150, FreezeRecall)), 2, true, SmoothingModeHighQuality, &freeze_background);
wchar_t buffer[100];
- if (RecallImageTm.tm_mday == 0) swprintf_s(buffer, L"超级恢复");
- else swprintf_s(buffer, L"超级恢复 %02d月%02d日 %02d:%02d:%02d", RecallImageTm.tm_mon + 1, RecallImageTm.tm_mday, RecallImageTm.tm_hour, RecallImageTm.tm_min, RecallImageTm.tm_sec);
+ if (RecallImageTm.tm_mday == 0) swprintf_s(buffer, IW("UI/Operate/Recall").c_str());
+ else swprintf_s(buffer, (IW("UI/Operate/Recall") + L" %02d%02d %02d:%02d:%02d").c_str(), RecallImageTm.tm_mon + 1, RecallImageTm.tm_mday, RecallImageTm.tm_hour, RecallImageTm.tm_min, RecallImageTm.tm_sec);
Graphics graphics(GetImageHDC(&freeze_background));
Gdiplus::Font gp_font(&HarmonyOS_fontFamily, 22, FontStyleRegular, UnitPixel);
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtI18n.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtI18n.cpp"
index 5e7ace0..3249fac 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtI18n.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtI18n.cpp"
@@ -1,11 +1,9 @@
#include "IdtI18n.h"
#include "IdtText.h"
+#include "Inkeys/Json/IdtJson.h"
-wstring i18nIdentifying;
-unordered_map> i18n;
-
-bool loadI18n(int type, wstring path, wstring lang)
+bool I18n::load(int type, wstring path, wstring lang)
{
string jsonContent;
if (type == 1)
@@ -13,7 +11,7 @@ bool loadI18n(int type, wstring path, wstring lang)
int resNum = 246;
if (lang == L"zh-CN") resNum = 245;
if (lang == L"en-US") resNum = 246;
- //if (lang == L"zh-TW") resNum = ;
+ if (lang == L"zh-TW") resNum = 275;
HRSRC hRes = FindResourceW(NULL, MAKEINTRESOURCE(resNum), path.c_str());
HGLOBAL hMem = LoadResource(NULL, hRes);
@@ -31,104 +29,57 @@ bool loadI18n(int type, wstring path, wstring lang)
if (jsonContent.compare(0, 3, "\xEF\xBB\xBF") == 0) jsonContent = jsonContent.substr(3);
}
- istringstream jsonContentStream(jsonContent);
+ istringstream jsonContentStream(IdtJson::removeJsoncComments(jsonContent));
Json::CharReaderBuilder readerBuilder;
Json::Value i18nVal;
string jsonErr;
if (Json::parseFromStream(readerBuilder, jsonContentStream, &i18nVal, &jsonErr))
{
- if (i18nVal.isMember("Language") && i18nVal["Language"].isString()) i18nIdentifying = utf8ToUtf16(i18nVal["Language"].asString());
+ // 写锁,然后加载 i18n 内容
+ unique_lock lock(i18nWriteMutex);
- if (i18nVal.isMember("MainColumn") && i18nVal["MainColumn"].isObject())
- {
- if (i18nVal["MainColumn"].isMember("Centre") && i18nVal["MainColumn"]["Centre"].isObject())
- {
- if (i18nVal["MainColumn"]["Centre"].isMember("Select") && i18nVal["MainColumn"]["Centre"]["Select"].isString()) i18n[i18nEnum::MainColumnSelect] = utf8ToUtf16(i18nVal["MainColumn"]["Centre"]["Select"].asString());
- if (i18nVal["MainColumn"]["Centre"].isMember("SelectClean") && i18nVal["MainColumn"]["Centre"]["SelectClean"].isString()) i18n[i18nEnum::MainColumnSelectClean] = utf8ToUtf16(i18nVal["MainColumn"]["Centre"]["SelectClean"].asString());
- if (i18nVal["MainColumn"]["Centre"].isMember("Pen") && i18nVal["MainColumn"]["Centre"]["Pen"].isString()) i18n[i18nEnum::MainColumnPen] = utf8ToUtf16(i18nVal["MainColumn"]["Centre"]["Pen"].asString());
- if (i18nVal["MainColumn"]["Centre"].isMember("Eraser") && i18nVal["MainColumn"]["Centre"]["Eraser"].isString()) i18n[i18nEnum::MainColumnEraser] = utf8ToUtf16(i18nVal["MainColumn"]["Centre"]["Eraser"].asString());
- if (i18nVal["MainColumn"]["Centre"].isMember("Options") && i18nVal["MainColumn"]["Centre"]["Options"].isString()) i18n[i18nEnum::MainColumnOptions] = utf8ToUtf16(i18nVal["MainColumn"]["Centre"]["Options"].asString());
- }
- }
+ //i18n.clear();
+ flattenJson(i18nVal, "", i18n);
- if (i18nVal.isMember("LnkName") && i18nVal["LnkName"].isString())i18n[i18nEnum::LnkName] = utf8ToUtf16(i18nVal["LnkName"].asString());
+ lock.unlock();
- if (i18nVal.isMember("Settings") && i18nVal["Settings"].isObject())
{
- if (i18nVal["Settings"].isMember("Settings") && i18nVal["Settings"]["Settings"].isString())
- {
- i18n[i18nEnum::Settings] = i18nVal["Settings"]["Settings"].asString();
- i18n[i18nEnum::SettingsW] = utf8ToUtf16(i18nVal["Settings"]["Settings"].asString());
- }
-
- if (i18nVal["Settings"].isMember("Operate") && i18nVal["Settings"]["Operate"].isObject())
- {
- if (i18nVal["Settings"]["Operate"].isMember("Reset") && i18nVal["Settings"]["Operate"]["Reset"].isString()) i18n[i18nEnum::SettingsOperateReset] = i18nVal["Settings"]["Operate"]["Reset"].asString();
- if (i18nVal["Settings"]["Operate"].isMember("Repair") && i18nVal["Settings"]["Operate"]["Repair"].isString()) i18n[i18nEnum::SettingsOperateRepair] = i18nVal["Settings"]["Operate"]["Repair"].asString();
- if (i18nVal["Settings"]["Operate"].isMember("Copy") && i18nVal["Settings"]["Operate"]["Copy"].isString()) i18n[i18nEnum::SettingsOperateCopy] = i18nVal["Settings"]["Operate"]["Copy"].asString();
- }
-
- if (i18nVal["Settings"].isMember("Home") && i18nVal["Settings"]["Home"].isObject())
- {
- if (i18nVal["Settings"]["Home"].isMember("Home") && i18nVal["Settings"]["Home"]["Home"].isString()) i18n[i18nEnum::SettingsHome] = i18nVal["Settings"]["Home"]["Home"].asString();
- if (i18nVal["Settings"]["Home"].isMember("Prompt") && i18nVal["Settings"]["Home"]["Prompt"].isString()) i18n[i18nEnum::SettingsHomePrompt] = i18nVal["Settings"]["Home"]["Prompt"].asString();
- if (i18nVal["Settings"]["Home"].isMember("#1") && i18nVal["Settings"]["Home"]["#1"].isString()) i18n[i18nEnum::SettingsHome1] = i18nVal["Settings"]["Home"]["#1"].asString();
- if (i18nVal["Settings"]["Home"].isMember("#2") && i18nVal["Settings"]["Home"]["#2"].isString()) i18n[i18nEnum::SettingsHome2] = i18nVal["Settings"]["Home"]["#2"].asString();
- if (i18nVal["Settings"]["Home"].isMember("#3") && i18nVal["Settings"]["Home"]["#3"].isString()) i18n[i18nEnum::SettingsHome3] = i18nVal["Settings"]["Home"]["#3"].asString();
- }
-
- if (i18nVal["Settings"].isMember("Regular") && i18nVal["Settings"]["Regular"].isObject())
- {
- if (i18nVal["Settings"]["Regular"].isMember("Regular") && i18nVal["Settings"]["Regular"]["Regular"].isString()) i18n[i18nEnum::SettingsRegular] = i18nVal["Settings"]["Regular"]["Regular"].asString();
-
- if (i18nVal["Settings"]["Regular"].isMember("#1") && i18nVal["Settings"]["Regular"]["#1"].isString()) i18n[i18nEnum::SettingsRegular1] = i18nVal["Settings"]["Regular"]["#1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#1_1") && i18nVal["Settings"]["Regular"]["#1_1"].isString()) i18n[i18nEnum::SettingsRegular1_1] = i18nVal["Settings"]["Regular"]["#1_1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#1_2") && i18nVal["Settings"]["Regular"]["#1_2"].isString()) i18n[i18nEnum::SettingsRegular1_2] = i18nVal["Settings"]["Regular"]["#1_2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#2") && i18nVal["Settings"]["Regular"]["#2"].isString()) i18n[i18nEnum::SettingsRegular2] = i18nVal["Settings"]["Regular"]["#2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#2_1") && i18nVal["Settings"]["Regular"]["#2_1"].isString()) i18n[i18nEnum::SettingsRegular2_1] = i18nVal["Settings"]["Regular"]["#2_1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#2_2") && i18nVal["Settings"]["Regular"]["#2_2"].isString()) i18n[i18nEnum::SettingsRegular2_2] = i18nVal["Settings"]["Regular"]["#2_2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3") && i18nVal["Settings"]["Regular"]["#3"].isString()) i18n[i18nEnum::SettingsRegular3] = i18nVal["Settings"]["Regular"]["#3"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_1") && i18nVal["Settings"]["Regular"]["#3_1"].isString()) i18n[i18nEnum::SettingsRegular3_1] = i18nVal["Settings"]["Regular"]["#3_1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_2") && i18nVal["Settings"]["Regular"]["#3_2"].isString()) i18n[i18nEnum::SettingsRegular3_2] = i18nVal["Settings"]["Regular"]["#3_2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_3") && i18nVal["Settings"]["Regular"]["#3_3"].isString()) i18n[i18nEnum::SettingsRegular3_3] = i18nVal["Settings"]["Regular"]["#3_3"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_4") && i18nVal["Settings"]["Regular"]["#3_4"].isString()) i18n[i18nEnum::SettingsRegular3_4] = i18nVal["Settings"]["Regular"]["#3_4"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_5") && i18nVal["Settings"]["Regular"]["#3_5"].isString()) i18n[i18nEnum::SettingsRegular3_5] = i18nVal["Settings"]["Regular"]["#3_5"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_6") && i18nVal["Settings"]["Regular"]["#3_6"].isString()) i18n[i18nEnum::SettingsRegular3_6] = i18nVal["Settings"]["Regular"]["#3_6"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_7") && i18nVal["Settings"]["Regular"]["#3_7"].isString()) i18n[i18nEnum::SettingsRegular3_7] = i18nVal["Settings"]["Regular"]["#3_7"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_8") && i18nVal["Settings"]["Regular"]["#3_8"].isString()) i18n[i18nEnum::SettingsRegular3_8] = i18nVal["Settings"]["Regular"]["#3_8"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#3_9") && i18nVal["Settings"]["Regular"]["#3_9"].isString()) i18n[i18nEnum::SettingsRegular3_9] = i18nVal["Settings"]["Regular"]["#3_9"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#4") && i18nVal["Settings"]["Regular"]["#4"].isString()) i18n[i18nEnum::SettingsRegular4] = i18nVal["Settings"]["Regular"]["#4"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#4_1") && i18nVal["Settings"]["Regular"]["#4_1"].isString()) i18n[i18nEnum::SettingsRegular4_1] = i18nVal["Settings"]["Regular"]["#4_1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#4_2") && i18nVal["Settings"]["Regular"]["#4_2"].isString()) i18n[i18nEnum::SettingsRegular4_2] = i18nVal["Settings"]["Regular"]["#4_2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#4_3") && i18nVal["Settings"]["Regular"]["#4_3"].isString()) i18n[i18nEnum::SettingsRegular4_3] = i18nVal["Settings"]["Regular"]["#4_3"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#4_4") && i18nVal["Settings"]["Regular"]["#4_4"].isString()) i18n[i18nEnum::SettingsRegular4_4] = i18nVal["Settings"]["Regular"]["#4_4"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#5") && i18nVal["Settings"]["Regular"]["#5"].isString()) i18n[i18nEnum::SettingsRegular5] = i18nVal["Settings"]["Regular"]["#5"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#5_1") && i18nVal["Settings"]["Regular"]["#5_1"].isString()) i18n[i18nEnum::SettingsRegular5_1] = i18nVal["Settings"]["Regular"]["#5_1"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#5_2") && i18nVal["Settings"]["Regular"]["#5_2"].isString()) i18n[i18nEnum::SettingsRegular5_2] = i18nVal["Settings"]["Regular"]["#5_2"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#5_3") && i18nVal["Settings"]["Regular"]["#5_3"].isString()) i18n[i18nEnum::SettingsRegular5_3] = i18nVal["Settings"]["Regular"]["#5_3"].asString();
- if (i18nVal["Settings"]["Regular"].isMember("#5_4") && i18nVal["Settings"]["Regular"]["#5_4"].isString()) i18n[i18nEnum::SettingsRegular5_4] = i18nVal["Settings"]["Regular"]["#5_4"].asString();
- }
+ identifying = lang;
+ return true;
+ }
+ }
+ return false;
+}
+string I18n::getA(string x)
+{
+ return i18n[x];
+}
+wstring I18n::getW(string x)
+{
+ return utf8ToUtf16(i18n[x]);
+}
- if (i18nVal["Settings"].isMember("Update") && i18nVal["Settings"]["Update"].isObject())
- {
- if (i18nVal["Settings"]["Update"].isMember("Tip0") && i18nVal["Settings"]["Update"]["Tip0"].isString()) i18n[i18nEnum::SettingsUpdateTip0] = i18nVal["Settings"]["Update"]["Tip0"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip1") && i18nVal["Settings"]["Update"]["Tip1"].isString()) i18n[i18nEnum::SettingsUpdateTip1] = i18nVal["Settings"]["Update"]["Tip1"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip2") && i18nVal["Settings"]["Update"]["Tip2"].isString()) i18n[i18nEnum::SettingsUpdateTip2] = i18nVal["Settings"]["Update"]["Tip2"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip3") && i18nVal["Settings"]["Update"]["Tip3"].isString()) i18n[i18nEnum::SettingsUpdateTip3] = i18nVal["Settings"]["Update"]["Tip3"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip4") && i18nVal["Settings"]["Update"]["Tip4"].isString()) i18n[i18nEnum::SettingsUpdateTip4] = i18nVal["Settings"]["Update"]["Tip4"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip5") && i18nVal["Settings"]["Update"]["Tip5"].isString()) i18n[i18nEnum::SettingsUpdateTip5] = i18nVal["Settings"]["Update"]["Tip5"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip6") && i18nVal["Settings"]["Update"]["Tip6"].isString()) i18n[i18nEnum::SettingsUpdateTip6] = i18nVal["Settings"]["Update"]["Tip6"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip7") && i18nVal["Settings"]["Update"]["Tip7"].isString()) i18n[i18nEnum::SettingsUpdateTip7] = i18nVal["Settings"]["Update"]["Tip7"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip8") && i18nVal["Settings"]["Update"]["Tip8"].isString()) i18n[i18nEnum::SettingsUpdateTip8] = i18nVal["Settings"]["Update"]["Tip8"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip9") && i18nVal["Settings"]["Update"]["Tip9"].isString()) i18n[i18nEnum::SettingsUpdateTip9] = i18nVal["Settings"]["Update"]["Tip9"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip10") && i18nVal["Settings"]["Update"]["Tip10"].isString()) i18n[i18nEnum::SettingsUpdateTip10] = i18nVal["Settings"]["Update"]["Tip10"].asString();
- if (i18nVal["Settings"]["Update"].isMember("Tip11") && i18nVal["Settings"]["Update"]["Tip11"].isString()) i18n[i18nEnum::SettingsUpdateTip11] = i18nVal["Settings"]["Update"]["Tip11"].asString();
- if (i18nVal["Settings"]["Update"].isMember("#0") && i18nVal["Settings"]["Update"]["#0"].isString()) i18n[i18nEnum::SettingsUpdate0] = i18nVal["Settings"]["Update"]["#0"].asString();
- }
+void I18n::flattenJson(const Json::Value& node, const string& prefix, unordered_map& outMap)
+{
+ if (node.isString()) outMap[prefix] = node.asString();
+ else if (node.isObject())
+ {
+ for (const auto& key : node.getMemberNames())
+ {
+ string fullKey = prefix.empty() ? key : (prefix + "/" + key);
+ flattenJson(node[key], fullKey, outMap);
}
+ }
+}
+void IdtTest::PrintI18nMap()
+{
+ cout << "-------- I18n所有Key-Value --------" << endl;
- return true;
+ for (const auto& [key, val] : I18n::i18n)
+ {
+ cout << key << ": " << val << endl;
}
- return false;
+
+ cout << "-------- End --------" << endl;
}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtI18n.h" "b/\346\231\272\347\273\230\346\225\231/IdtI18n.h"
index 5387cf3..aa09b36 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtI18n.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtI18n.h"
@@ -2,72 +2,27 @@
#include "IdtMain.h"
-enum i18nEnum
-{
- MainColumnSelect,
- MainColumnSelectClean,
- MainColumnPen,
- MainColumnEraser,
- MainColumnOptions,
-
- LnkName,
+#define IA(x) I18n::getA(x)
+#define IW(x) I18n::getW(x)
- Settings,
- SettingsW,
- SettingsOperateReset,
- SettingsOperateRepair,
- SettingsOperateCopy,
+class I18n
+{
+public:
+ static inline wstring identifying;
+ static inline unordered_map i18n;
- SettingsHome,
- SettingsHomePrompt,
- SettingsHome1,
- SettingsHome2,
- SettingsHome3,
+ static bool load(int type, wstring path, wstring lang = L"en-US");
+ static string getA(string x);
+ static wstring getW(string x);
- SettingsRegular,
- SettingsRegular1,
- SettingsRegular1_1,
- SettingsRegular1_2,
- SettingsRegular2,
- SettingsRegular2_1,
- SettingsRegular2_2,
- SettingsRegular3,
- SettingsRegular3_1,
- SettingsRegular3_2,
- SettingsRegular3_3,
- SettingsRegular3_4,
- SettingsRegular3_5,
- SettingsRegular3_6,
- SettingsRegular3_7,
- SettingsRegular3_8,
- SettingsRegular3_9,
- SettingsRegular4,
- SettingsRegular4_1,
- SettingsRegular4_2,
- SettingsRegular4_3,
- SettingsRegular4_4,
- SettingsRegular5,
- SettingsRegular5_1,
- SettingsRegular5_2,
- SettingsRegular5_3,
- SettingsRegular5_4,
+private:
+ static inline mutex i18nWriteMutex;
+ static void flattenJson(const Json::Value& node, const string& prefix, unordered_map& outMap);
- SettingsUpdateTip0,
- SettingsUpdateTip1,
- SettingsUpdateTip2,
- SettingsUpdateTip3,
- SettingsUpdateTip4,
- SettingsUpdateTip5,
- SettingsUpdateTip6,
- SettingsUpdateTip7,
- SettingsUpdateTip8,
- SettingsUpdateTip9,
- SettingsUpdateTip10,
- SettingsUpdateTip11,
- SettingsUpdate0
+ I18n() = delete;
};
-extern wstring i18nIdentifying;
-extern unordered_map> i18n;
-
-bool loadI18n(int type, wstring path, wstring lang = L"en-US");
\ No newline at end of file
+namespace IdtTest
+{
+ void PrintI18nMap();
+}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtMain.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtMain.cpp"
index 92c72c2..f0dfa84 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtMain.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtMain.cpp"
@@ -45,7 +45,7 @@
#pragma comment(lib, "netapi32.lib")
wstring buildTime = __DATE__ L" " __TIME__; // 构建时间
-wstring editionDate = L"20250606a"; // 程序发布日期
+wstring editionDate = L"20250719a"; // 程序发布日期
wstring editionChannel = L"LTS"; // 程序发布通道
wstring userId; // 用户GUID
@@ -135,35 +135,47 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
}
// 防止重复启动
{
- // 检查启动标识
- // -Restart 强制启动一次
- // -WarnTry 强制启动一次,表明上一次遇到了错误
- // -CrashTry 表明上一次遇到了崩溃错误
+ // TODO 将为启动标识重写书写逻辑,运行存在多个并行的启动标识
+ // 示例
+ // -restart
+ // -path="..."
- wstring commandLineArgs(lpCmdLine);
+ // 相关标识
+ bool superTopComplete = false;
- bool superTopC = false;
- if (commandLineArgs.length() >= 11 && commandLineArgs.substr(0, 11) == L"-SuperTopC ")
{
- superTopC = true;
- if (commandLineArgs.length() >= 12) commandLineArgs = commandLineArgs.substr(11, commandLineArgs.length() - 11);
- else commandLineArgs = L"";
- }
+ vector args = CustomSplit::Run(GetCommandLineW(), L'*');
+ for (size_t i = 1; i < args.size(); i++)
+ {
+ bool addCommandLine = true;
- if (commandLineArgs == L"-Restart") launchState = LaunchStateEnum::Restart;
- else if (commandLineArgs == L"-WarnTry") launchState = LaunchStateEnum::WarnTry;
- else if (commandLineArgs == L"-CrashTry") launchState = LaunchStateEnum::CrashTry;
- else launchState = LaunchStateEnum::Normal;
+ wstring commandLine = args[i];
- if (commandLineArgs.length() >= 9 && commandLineArgs.substr(0, 9) == L"-SuperTop")
- {
- SurperTopMain(commandLineArgs.substr(10, commandLineArgs.length() - 10));
- return 0;
+ cout << utf16ToUtf8(commandLine) << endl;
+
+ if (commandLine == L"-Restart") LaunchState::restart = true;
+ else if (commandLine == L"-WarnTry") LaunchState::warnTry = true;
+ else if (commandLine == L"-CrashTry") LaunchState::crashTry = true;
+ else if (commandLine == L"-SuperTopComplete") superTopComplete = true, addCommandLine = false;
+ else if (commandLine.substr(0, 9) == L"-SuperTop")
+ {
+ addCommandLine = false;
+
+ wregex pattern(LR"(^[^*]*\*([^*]+)\*[^*]*$)");
+ wsmatch matches;
+ if (regex_match(commandLine, matches, pattern))
+ {
+ SurperTopMain(matches[1].str());
+ exit(0);
+ }
+ }
+
+ if (addCommandLine) LaunchState::commandLine += commandLine + L" ";
+ }
}
- //Testw(L"in \"" + commandLineArgs + L"\"");
#ifdef IDT_RELEASE
- if (launchState == LaunchStateEnum::Normal && !superTopC)
+ if (!LaunchState::restart && !LaunchState::warnTry && !LaunchState::crashTry && !superTopComplete)
{
wstring currentExeDirectory = GetCurrentExeDirectory();
{
@@ -195,7 +207,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
}
}
#endif
- if (launchState == LaunchStateEnum::CrashTry) CrashHandler::IsSecond(true);
+ if (LaunchState::crashTry) CrashHandler::IsSecond(true);
}
// 崩溃助手初始化
{
@@ -634,7 +646,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
}
}
- LaunchSurperTop();
+ LaunchSurperTop(LaunchState::commandLine);
}
break;
}
@@ -750,7 +762,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
IDTLogger->flush_on(spdlog::level::info);
IDTLogger->info("[主线程][IdtMain] 日志开始记录 " + utf16ToUtf8(editionDate) + " " + utf16ToUtf8(userId));
- if (launchState == LaunchStateEnum::CrashTry) IDTLogger->warn("[主线程][IdtMain] 发现程序先前发生过崩溃错误");
+ if (LaunchState::crashTry) IDTLogger->warn("[主线程][IdtMain] 发现程序先前发生过崩溃错误");
//logger->info("");
//logger->warn("");
@@ -840,7 +852,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
setlist.BrushRecover = true;
setlist.RubberRecover = false;
- setlist.regularSetting.moveRecover = true;
+ setlist.regularSetting.moveRecover = false;
setlist.regularSetting.clickRecover = false;
setlist.regularSetting.avoidFullScreen = true;
@@ -923,7 +935,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
{
// 获取系统默认语言标识符
- LANGID langId = GetSystemDefaultLangID();
+ LANGID langId = GetUserDefaultUILanguage();
// 获取主语言标识符
WORD primaryLangId = PRIMARYLANGID(langId);
// 获取子语言标识符
@@ -1012,9 +1024,11 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
{
// 先读取完整性的英语文件,在读取配置指定的语言文件
// 这样如果配置文件缺少某项也能用英语补齐
- //loadI18n(1, L"JSON", L"en-US");
- loadI18n(1, L"JSON", L"zh-CN");
- // TODO 允许切换到英语
+ I18n::load(1, L"JSON", L"en-US");
+
+ if (setlist.selectLanguage == 1) I18n::load(1, L"JSON", L"zh-CN");
+ else if (setlist.selectLanguage == 2) I18n::load(1, L"JSON", L"zh-TW");
+ else I18n::load(1, L"JSON", L"en-US");
IDTLogger->info("[主线程][IdtMain] I18N初始化完成");
}
@@ -1195,7 +1209,7 @@ int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPWSTR
{
IDTLogger->critical("[主线程][IdtMain] 程序意外退出:RealTimeStylus 触控库初始化失败。");
- if (launchState == LaunchStateEnum::WarnTry) MessageBox(NULL, L"Program unexpected exit: RealTimeStylus touch library initialization failed.(#4)\n程序意外退出:RealTimeStylus 触控库初始化失败。(#4)", L"Inkeys Error | 智绘教错误", MB_OK | MB_SYSTEMMODAL);
+ if (LaunchState::warnTry) MessageBox(NULL, L"Program unexpected exit: RealTimeStylus touch library initialization failed.(#4)\n程序意外退出:RealTimeStylus 触控库初始化失败。(#4)", L"Inkeys Error | 智绘教错误", MB_OK | MB_SYSTEMMODAL);
else ShellExecuteW(NULL, NULL, GetCurrentExePath().c_str(), L"-WarnTry", NULL, SW_SHOWNORMAL);
exit(0);
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtMain.h" "b/\346\231\272\347\273\230\346\225\231/IdtMain.h"
index a368e13..32d85a6 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtMain.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtMain.h"
@@ -194,6 +194,7 @@ void Testi(long long t);
void Testd(double t);
void Testw(wstring t);
void Testa(string t);
+#define IdtFalse false
// this_thread::sleep_for(chrono::milliseconds(int))
#endif
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtPlug-in.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtPlug-in.cpp"
index 969af5f..090c88e 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtPlug-in.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtPlug-in.cpp"
@@ -291,6 +291,7 @@ void NextPptSlides(int check)
{
try
{
+ //cout << check << endl;
PptCOMPto->NextSlideShow(check);
}
catch (_com_error)
@@ -3945,7 +3946,13 @@ bool IsPowerPointRunAsAdminSet()
bool CheckEndShowClass::Check()
{
if (isChecking == true) return false;
- isChecking = true;
+ // isChecking = true;
+
+ // 延迟0.5秒后放开键盘
+ auto delayed = async(launch::async, [&]() {
+ this_thread::sleep_for(std::chrono::milliseconds(500));
+ isChecking = true;
+ });
bool ret = (MessageBox(floating_window, L"Currently in drawing mode, continuing to end will clear the canvas.\nAre you sure you want to end the presentation?\n当前处于绘制模式,继续结束放映将会清空画布内容。\n确定结束放映?", L"Inkeys Tips | 智绘教提示", MB_SYSTEMMODAL | MB_OKCANCEL) == 1);
@@ -4036,16 +4043,16 @@ void ShortcutAssistantClass::SetShortcut()
if (setlist.shortcutAssistant.correctLnk)
{
- if (_waccess((DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk").c_str(), 0) == 0)
+ if (_waccess((DesktopPath + IW("Widget/LnkName") + L".lnk").c_str(), 0) == 0)
{
// 存在对应名称的 Lnk
- if (!IsShortcutPointingToDirectory(DesktopPath + get(i18n[i18nEnum::LnkName]) + L".lnk", GetCurrentExePath()))
+ if (!IsShortcutPointingToDirectory(DesktopPath + IW("Widget/LnkName") + L".lnk", GetCurrentExePath()))
{
// 不指向当前的程序路径
error_code ec;
- filesystem::remove(DesktopPath + get(i18n[i18nEnum::LnkName]) + L".lnk", ec);
+ filesystem::remove(DesktopPath + IW("Widget/LnkName") + L".lnk", ec);
- CreateShortcut(DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk", GetCurrentExePath());
+ CreateShortcut(DesktopPath + IW("Widget/LnkName").c_str() + L".lnk", GetCurrentExePath());
}
}
{
@@ -4053,13 +4060,13 @@ void ShortcutAssistantClass::SetShortcut()
{
if (filesystem::is_regular_file(entry) && entry.path().extension() == L".lnk")
{
- if (entry.path().wstring() != DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk" && IsShortcutPointingToDirectory(entry.path().wstring(), GetCurrentExePath()))
+ if (entry.path().wstring() != DesktopPath + IW("Widget/LnkName").c_str() + L".lnk" && IsShortcutPointingToDirectory(entry.path().wstring(), GetCurrentExePath()))
{
// 存在指向当前的程序路径的快捷方式,但是其名称并不正确
error_code ec;
filesystem::remove(entry.path().wstring(), ec);
- CreateShortcut(DesktopPath + get(i18n[i18nEnum::LnkName]) + L".lnk", GetCurrentExePath());
+ CreateShortcut(DesktopPath + IW("Widget/LnkName") + L".lnk", GetCurrentExePath());
}
}
}
@@ -4067,10 +4074,10 @@ void ShortcutAssistantClass::SetShortcut()
}
if (setlist.shortcutAssistant.createLnk)
{
- if (_waccess((DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk").c_str(), 0) == -1 ||
- !IsShortcutPointingToDirectory((DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk"), GetCurrentExePath()))
+ if (_waccess((DesktopPath + IW("Widget/LnkName").c_str() + L".lnk").c_str(), 0) == -1 ||
+ !IsShortcutPointingToDirectory((DesktopPath + IW("Widget/LnkName").c_str() + L".lnk"), GetCurrentExePath()))
{
- CreateShortcut(DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk", GetCurrentExePath());
+ CreateShortcut(DesktopPath + IW("Widget/LnkName").c_str() + L".lnk", GetCurrentExePath());
}
}
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtPlug-in.h" "b/\346\231\272\347\273\230\346\225\231/IdtPlug-in.h"
index 72cb5be..d8620c6 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtPlug-in.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtPlug-in.h"
@@ -248,7 +248,7 @@ class CheckEndShowClass
isChecking = false;
}
public:
- bool isChecking;
+ IdtAtomic isChecking;
bool Check();
};
extern CheckEndShowClass CheckEndShow;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtSetting.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtSetting.cpp"
index 2cd7f73..e07eff9 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtSetting.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtSetting.cpp"
@@ -191,8 +191,9 @@ void SettingMain()
{
IMAGE SettingSign;
- if (i18nIdentifying == L"zh-CN") idtLoadImage(&SettingSign, L"PNG", L"Home1_zh-CN", 700 * settingGlobalScale, 215 * settingGlobalScale, true);
- else idtLoadImage(&SettingSign, L"PNG", L"Home1_en-US", 700 * settingGlobalScale, 240 * settingGlobalScale, true);
+ if (I18n::identifying == L"zh-CN") idtLoadImage(&SettingSign, L"PNG", L"Home1_zh-CN", 700 * settingGlobalScale, 215 * settingGlobalScale, true);
+ else if (I18n::identifying == L"zh-TW") idtLoadImage(&SettingSign, L"PNG", L"Home1_zh-TW", 700 * settingGlobalScale, 215 * settingGlobalScale, true);
+ else idtLoadImage(&SettingSign, L"PNG", L"Home1_en-US", 700 * settingGlobalScale, 215 * settingGlobalScale, true);
{
int width = settingSign[1].width = SettingSign.getwidth();
int height = settingSign[1].height = SettingSign.getheight();
@@ -227,7 +228,8 @@ void SettingMain()
IM_ASSERT(ret);
}
- if (i18nIdentifying == L"zh-CN") idtLoadImage(&SettingSign, L"PNG", L"Home2_zh-CN", 770 * settingGlobalScale, 390 * settingGlobalScale, true);
+ if (I18n::identifying == L"zh-CN") idtLoadImage(&SettingSign, L"PNG", L"Home2_zh-CN", 770 * settingGlobalScale, 390 * settingGlobalScale, true);
+ else if (I18n::identifying == L"zh-TW") idtLoadImage(&SettingSign, L"PNG", L"Home2_zh-TW", 770 * settingGlobalScale, 390 * settingGlobalScale, true);
else idtLoadImage(&SettingSign, L"PNG", L"Home2_en-US", 770 * settingGlobalScale, 390 * settingGlobalScale, true);
{
int width = settingSign[2].width = SettingSign.getwidth();
@@ -560,7 +562,7 @@ void SettingMain()
font_cfg.FontDataOwnedByAtlas = false;
HRSRC hRes;
- if (i18nIdentifying == L"zh-TW") hRes = FindResource(NULL, MAKEINTRESOURCE(258), L"TTF");
+ if (I18n::identifying == L"zh-TW" && 0 /*在翻译彻底完成之前还不行*/) hRes = FindResource(NULL, MAKEINTRESOURCE(258), L"TTF");
else hRes = FindResource(NULL, MAKEINTRESOURCE(198), L"TTF");
HGLOBAL hMem = LoadResource(NULL, hRes);
void* pLock = LockResource(hMem);
@@ -582,6 +584,7 @@ void SettingMain()
0xeb90, 0xeb90, // 错误
0xe80f, 0xe80f, // 主页
+ 0xf2b7, 0xf2b7, // 语言
0xe7b8, 0xe7b8, // 常规
0xee56, 0xee56, // 绘制
0xe74e, 0xe74e, // 保存
@@ -847,18 +850,17 @@ void SettingMain()
enum settingTabEnum
{
tab1,
+ Language,
tabCICD,
tabConfiguration,
tab2,
tab3,
- tabSave,
tabPerformance,
tabPreset,
tab4,
tabComponent,
tab5,
tab6,
- tab7,
tab8,
tab9
};
@@ -883,7 +885,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
ImGui::SetCursorPos({ 20.0f * settingGlobalScale,14.0f * settingGlobalScale });
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
- ImGui::TextUnformatted(("\ue713 " + get(i18n[i18nEnum::Settings])).c_str());
+ ImGui::TextUnformatted(("\ue713 " + IA("SettingsUI/N")).c_str());
ImFontMain->Scale = 0.3f, PushFontNum++, ImGui::PushFont(ImFontMain);
ImGui::SetCursorPos({ 914 * settingGlobalScale,0.0f * settingGlobalScale });
@@ -929,14 +931,14 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button((" \ue80f " + get(i18n[i18nEnum::SettingsHome])).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab1;
+ if (ImGui::Button((" \ue80f " + IA("SettingsUI/Home/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab1;
}
- // 软件配置
+ // 语言
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,ImGui::GetCursorPosY() + 4.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tabConfiguration)
+ if (settingTab == settingTabEnum::Language)
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -956,14 +958,14 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue81e 软件配置", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabConfiguration;
+ if (ImGui::Button((" \uf2b7 " + IA("SettingsUI/Language/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::Language;
}
- // 软件版本
+ // 软件配置
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,ImGui::GetCursorPosY() + 4.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tab6)
+ if (settingTab == settingTabEnum::tabConfiguration)
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -983,27 +985,14 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue946 软件版本", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab6;
- }
-
- // --------------------
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 4.0f * settingGlobalScale);
-
- ImDrawList* draw_list = ImGui::GetWindowDrawList();
-
- ImVec2 p1 = ImVec2(35 * settingGlobalScale, ImGui::GetCursorPosY() - 1.0f * settingGlobalScale);
- ImVec2 p2 = ImVec2(135 * settingGlobalScale, ImGui::GetCursorPosY());
- ImU32 color = IM_COL32(229, 229, 229, 255);
-
- draw_list->AddRectFilled(p1, p2, color, 2.0f * settingGlobalScale);
+ if (ImGui::Button((" \ue81e " + IA("SettingsUI/Configuration/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabConfiguration;
}
- // 常规
+ // 软件版本
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,ImGui::GetCursorPosY() + 4.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tab2)
+ if (settingTab == settingTabEnum::tab6)
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -1023,14 +1012,27 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button((" \ue7b8 " + get(i18n[i18nEnum::SettingsRegular])).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab2;
+ if (ImGui::Button((" \ue946 " + IA("SettingsUI/Version/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab6;
}
- // 绘制
+ // --------------------
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 4.0f * settingGlobalScale);
+
+ ImDrawList* draw_list = ImGui::GetWindowDrawList();
+
+ ImVec2 p1 = ImVec2(35 * settingGlobalScale, ImGui::GetCursorPosY() - 1.0f * settingGlobalScale);
+ ImVec2 p2 = ImVec2(135 * settingGlobalScale, ImGui::GetCursorPosY());
+ ImU32 color = IM_COL32(229, 229, 229, 255);
+
+ draw_list->AddRectFilled(p1, p2, color, 2.0f * settingGlobalScale);
+ }
+
+ // 常规
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,ImGui::GetCursorPosY() + 4.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tab3)
+ if (settingTab == settingTabEnum::tab2)
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -1050,14 +1052,14 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \uee56 绘制", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab3;
+ if (ImGui::Button((" \ue7b8 " + IA("SettingsUI/Regular/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab2;
}
- // 性能
+ // 绘制
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,ImGui::GetCursorPosY() + 4.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tabSave)
+ if (settingTab == settingTabEnum::tab3)
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -1077,7 +1079,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue74e 保存", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabSave;
+ if (ImGui::Button((" \uee56 " + IA("SettingsUI/Draw/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab3;
}
// 性能
@@ -1104,7 +1106,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \uec4a 性能", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabPerformance;
+ if (ImGui::Button((" \uec4a " + IA("SettingsUI/Performance/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabPerformance;
}
// 预设
@@ -1131,7 +1133,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \uf259 预设", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabPreset;
+ if (ImGui::Button((" \uf259 " + IA("SettingsUI/Preset/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tabPreset;
}
// 插件
@@ -1158,7 +1160,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue74c 插件", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
+ if (ImGui::Button((" \ue74c " + IA("SettingsUI/PlugIn/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
{
settingPlugInTab = settingPlugInTabEnum::tabPlug1;
settingTab = settingTabEnum::tab4;
@@ -1189,7 +1191,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue70b 组件", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
+ if (ImGui::Button((" \ue70b " + IA("SettingsUI/Component/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
{
settingTab = settingTabEnum::tabComponent;
}
@@ -1219,7 +1221,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue765 快捷键", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab5;
+ if (ImGui::Button((" \ue765 " + IA("SettingsUI/HotKey/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab5;
}
// --------------------
@@ -1239,16 +1241,6 @@ void SettingMain()
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,490.0f * settingGlobalScale });
- if (settingTab == settingTabEnum::tab7)
- {
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 10));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(0, 0, 0, 10));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
-
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 0));
- }
- else
{
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 0));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 0, 0, 10));
@@ -1259,7 +1251,11 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue716 社区名片", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab7;
+ if (ImGui::Button((" \ue716 " + IA("SettingsUI/Community/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
+ {
+ if (I18n::identifying == L"zh-CN") ShellExecuteW(0, 0, L"https://www.inkeys.top/community.html", 0, 0, SW_SHOW);
+ else ShellExecuteW(0, 0, L"https://en.inkeys.top/community.html", 0, 0, SW_SHOW);
+ }
}
// 赞助我们
@@ -1286,7 +1282,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue789 赞助我们", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab8;
+ if (ImGui::Button((" \ue789 " + IA("SettingsUI/Sponsor/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale })) settingTab = settingTabEnum::tab8;
}
// --------------------
@@ -1302,7 +1298,7 @@ void SettingMain()
draw_list->AddRectFilled(p1, p2, color, 2.0f * settingGlobalScale);
}
- // 重启程序
+ // 重启软件
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,574.0f * settingGlobalScale });
@@ -1314,14 +1310,14 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 0));
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue72c 重启程序", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
+ if (ImGui::Button((" \ue72c " + IA("SettingsUI/RestartSoftware/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
{
test.select = false;
RestartProgram();
}
}
- // 关闭程序
+ // 关闭软件
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,614.0f * settingGlobalScale });
@@ -1333,14 +1329,14 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 0));
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
- if (ImGui::Button(" \ue711 关闭程序", { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
+ if (ImGui::Button((" \ue711 " + IA("SettingsUI/ExitSoftware/N")).c_str(), { 150.0f * settingGlobalScale,36.0f * settingGlobalScale }))
{
test.select = false;
CloseProgram();
}
}
- // 程序调测
+ // 调试软件
{
ImGui::SetCursorPos({ 10.0f * settingGlobalScale,660.0f * settingGlobalScale });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
@@ -1365,7 +1361,7 @@ void SettingMain()
}
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.5f, 0.5f));
- if (ImGui::Button("程序调测", { 150.0f * settingGlobalScale,30.0f * settingGlobalScale })) settingTab = settingTabEnum::tab9;
+ if (ImGui::Button(IA("SettingsUI/DebugSoftware/N").c_str(), { 150.0f * settingGlobalScale,30.0f * settingGlobalScale })) settingTab = settingTabEnum::tab9;
}
{
@@ -1399,7 +1395,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsHomePrompt]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Home/Prompt").c_str());
}
{
@@ -1474,7 +1470,8 @@ void SettingMain()
}
if (ImGui::Button("\uf900", { 50.0f * settingGlobalScale,50.0f * settingGlobalScale }))
{
- ShellExecuteW(0, 0, L"https://www.inkeys.top", 0, 0, SW_SHOW);
+ if (I18n::identifying == L"zh-CN") ShellExecuteW(0, 0, L"https://www.inkeys.top", 0, 0, SW_SHOW);
+ else ShellExecuteW(0, 0, L"https://en.inkeys.top", 0, 0, SW_SHOW);
}
}
{
@@ -1501,7 +1498,7 @@ void SettingMain()
ImGui::SetCursorPos({ Cx + 160.0f * settingGlobalScale,Cy + 390.0f * settingGlobalScale });
{
- ImFontMain->Scale = 1.0f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
ImGui::TextUnformatted("AlanCRL");
}
@@ -1509,7 +1506,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 0.7f));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsHome1]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Home/Developer").c_str());
}
{
@@ -1538,48 +1535,49 @@ void SettingMain()
}
{
{
- ImGui::SetCursorPos({ Cx + 468.0f * settingGlobalScale,Cy + 405.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 448.0f * settingGlobalScale,Cy + 405.0f * settingGlobalScale });
ImFontMain->Scale = 0.95f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
ImGui::TextUnformatted("\uf904");
- ImGui::SetCursorPos({ Cx + 520.0f * settingGlobalScale,Cy + 393.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 500.0f * settingGlobalScale,Cy + 393.0f * settingGlobalScale });
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsHome2]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Home/Group").c_str());
- ImGui::SetCursorPos({ Cx + 520.0f * settingGlobalScale,Cy + 418.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 500.0f * settingGlobalScale,Cy + 418.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 0.7f));
- if (ImGui::TextLink("618720802"))
+ if (ImGui::TextLink(IA("SettingsUI/Home/GroupE").c_str()))
{
- ShellExecuteW(0, 0, L"https://qm.qq.com/cgi-bin/qm/qr?k=9V2l83dc0yP4UYeDF-NkTX0o7_TcYqlh&jump_from=webapi&authKey=LsLLUhb1KSzHYbc8k5nCQDqTtRcRUCEE3j+DdR9IgHaF/7JF7LLpY191hsiYEBz6", 0, 0, SW_SHOW);
+ if (I18n::identifying == L"zh-CN") ShellExecuteW(0, 0, L"https://qm.qq.com/cgi-bin/qm/qr?k=9V2l83dc0yP4UYeDF-NkTX0o7_TcYqlh&jump_from=webapi&authKey=LsLLUhb1KSzHYbc8k5nCQDqTtRcRUCEE3j+DdR9IgHaF/7JF7LLpY191hsiYEBz6", 0, 0, SW_SHOW);
+ else ShellExecuteW(0, 0, L"https://github.com/Alan-CRL/Inkeys/discussions", 0, 0, SW_SHOW);
}
}
{
- ImGui::SetCursorPos({ Cx + 467.0f * settingGlobalScale,Cy + 460.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 447.0f * settingGlobalScale,Cy + 460.0f * settingGlobalScale });
ImFontMain->Scale = 0.95f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
ImGui::TextUnformatted("\uf905");
- ImGui::SetCursorPos({ Cx + 520.0f * settingGlobalScale,Cy + 462.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 500.0f * settingGlobalScale,Cy + 462.0f * settingGlobalScale });
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
- if (ImGui::TextLink(get(i18n[i18nEnum::SettingsHome3]).c_str()))
+ if (ImGui::TextLink(IA("SettingsUI/Home/BilibiliChannel").c_str()))
{
ShellExecuteW(0, 0, L"https://space.bilibili.com/1330313497", 0, 0, SW_SHOW);
}
}
{
- ImGui::SetCursorPos({ Cx + 467.0f * settingGlobalScale,Cy + 515.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 447.0f * settingGlobalScale,Cy + 515.0f * settingGlobalScale });
ImFontMain->Scale = 0.95f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
ImGui::TextUnformatted("\uf906");
- ImGui::SetCursorPos({ Cx + 520.0f * settingGlobalScale,Cy + 515.0f * settingGlobalScale });
+ ImGui::SetCursorPos({ Cx + 500.0f * settingGlobalScale,Cy + 515.0f * settingGlobalScale });
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, ImVec4(255 / 255.0f, 255 / 255.0f, 255 / 255.0f, 1.0f));
- if (ImGui::TextLink("问题/建议反馈"))
+ if (ImGui::TextLink(IA("SettingsUI/Home/FeedBack").c_str()))
{
ShellExecuteW(0, 0, L"https://www.wjx.cn/vm/mqNTTRL.aspx#", 0, 0, SW_SHOW);
}
@@ -1612,19 +1610,156 @@ void SettingMain()
break;
}
- // 软件配置
+ // 语言
+ case settingTabEnum::Language:
+ {
+ ImGui::SetCursorPos({ 170.0f * settingGlobalScale,40.0f * settingGlobalScale });
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(243, 243, 243, 255));
+ ImGui::BeginChild("语言", { (750.0f + 30.0f) * settingGlobalScale,608.0f * settingGlobalScale }, false);
+
+ ImGui::SetCursorPosY(10.0f * settingGlobalScale);
+ {
+ ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Language/N").c_str());
+ }
+
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f * settingGlobalScale);
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 255, 255, 0));
+ ImGui::BeginChild("语言#1", { 750.0f * settingGlobalScale,100.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+
+ {
+ ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
+ ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Language/UI/N").c_str());
+ }
+
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f * settingGlobalScale);
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
+ ImGui::BeginChild("语言", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+
+ float cursosPosY = 0;
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Language/UI/Select").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Language/UI/SelectE").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
+
+ vector vec;
+ vec.emplace_back(_strdup((IA("SettingsUI/Language/UI/Language/en-US")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Language/UI/Language/zh-CN")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Language/UI/Language/zh-TW")).c_str()));
+
+ {
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##语言", vec[SelectLanguage]))
+ {
+ for (int i = 0; i < vec.size(); i++)
+ {
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (SelectLanguage == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ SelectLanguage = i;
+ if (setlist.selectLanguage != SelectLanguage)
+ {
+ setlist.selectLanguage = SelectLanguage;
+ WriteSetting();
+
+ if (setlist.selectLanguage == 1) I18n::load(1, L"JSON", L"zh-CN");
+ else if (setlist.selectLanguage == 2) I18n::load(1, L"JSON", L"zh-TW");
+ else I18n::load(1, L"JSON", L"en-US");
+
+ if (MessageBox(setting_window, IW("SettingsUI/Language/UI/Warn").c_str(), L"Inkeys Tips | 智绘教提示", MB_OKCANCEL | MB_SYSTEMMODAL) == 1) RestartProgram();
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
+ }
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
+ }
+ for (char* ptr : vec) free(ptr), ptr = nullptr;
+ }
+
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ }
+
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ }
+
+ {
+ ImVec2 mouse_delta = ImGui::GetIO().MouseDelta;
+ ScrollWhenDraggingOnVoid(ImVec2(0.0f, -mouse_delta.y), ImGuiMouseButton_Left);
+ }
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ break;
+ }
+
+ // 配置保存
case settingTabEnum::tabConfiguration:
{
ImGui::SetCursorPos({ 170.0f * settingGlobalScale,40.0f * settingGlobalScale });
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(243, 243, 243, 255));
- ImGui::BeginChild("软件配置", { (750.0f + 30.0f) * settingGlobalScale,608.0f * settingGlobalScale }, false);
+ ImGui::BeginChild("配置保存", { (750.0f + 30.0f) * settingGlobalScale,608.0f * settingGlobalScale }, false);
ImGui::SetCursorPosY(10.0f * settingGlobalScale);
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("软件配置");
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/N").c_str());
}
{
@@ -1632,13 +1767,13 @@ void SettingMain()
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 255, 255, 0));
- ImGui::BeginChild("软件配置#1", { 750.0f * settingGlobalScale,130.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+ ImGui::BeginChild("配置保存#1", { 750.0f * settingGlobalScale,130.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
{
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("配置清理");
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/Clean/N").c_str());
}
{
@@ -1653,7 +1788,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("启用配置清理");
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/Clean/Enable").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -1692,7 +1827,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("软件将在启动时和保存配置时清理配置表。具体为删去多余配置项(和当前软件版本的配置项模板比较),这可能导致在软件降级再升级后和导入配置时会丢失部分配置项,这些配置项将会变为默认选项。");
+ ImGui::TextWrapped(IA("SettingsUI/Configuration/Clean/EnableE").c_str());
}
{
@@ -1718,6 +1853,163 @@ void SettingMain()
}
ImGui::EndChild();
}
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f * settingGlobalScale);
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 255, 255, 0));
+ ImGui::BeginChild("配置保存#2", { 750.0f * settingGlobalScale,175.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+
+ {
+ ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
+ ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/CanvasSave/N").c_str());
+ }
+
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f * settingGlobalScale);
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
+ ImGui::BeginChild("启用历史画布保存", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+
+ float cursosPosY = 0;
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/CanvasSave/Enable").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/CanvasSave/EnableE").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(0, 0, 0, 6));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 95, 184, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 95, 184, 230));
+ if (!SaveSetting.Enable)
+ {
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 155));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_BorderShadow, IM_COL32(0, 0, 0, 155));
+ }
+ else
+ {
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_BorderShadow, IM_COL32(0, 95, 184, 255));
+ }
+ ImGui::Toggle("##启用历史画布保存", &SaveSetting.Enable, config);
+
+ if (setlist.saveSetting.enable != SaveSetting.Enable)
+ {
+ setlist.saveSetting.enable = SaveSetting.Enable;
+ WriteSetting();
+ }
+ }
+
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ }
+ {
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5.0f * settingGlobalScale);
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
+ ImGui::BeginChild("保存时长", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+
+ float cursosPosY = 0;
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/CanvasSave/SaveTime/N").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
+ ImGui::TextUnformatted(IA("SettingsUI/Configuration/CanvasSave/SaveTime/E").c_str());
+ }
+ {
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
+
+ vector vec;
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/1d")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/3d")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/5d")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/10d")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/30d")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Configuration/CanvasSave/SaveTime/Never")).c_str()));
+
+ {
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##保存时长", vec[SaveSetting.SaveDays]))
+ {
+ for (int i = 0; i < vec.size(); i++)
+ {
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (SaveSetting.SaveDays == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ SaveSetting.SaveDays = i;
+ if (setlist.saveSetting.saveDays != SaveSetting.SaveDays)
+ {
+ setlist.saveSetting.saveDays = SaveSetting.SaveDays;
+ WriteSetting();
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
+ }
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
+ }
+ for (char* ptr : vec) free(ptr), ptr = nullptr;
+ }
+
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ }
+
+ {
+ if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
+ if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
+ while (PushFontNum) PushFontNum--, ImGui::PopFont();
+ }
+ ImGui::EndChild();
+ }
{
ImVec2 mouse_delta = ImGui::GetIO().MouseDelta;
@@ -1744,7 +2036,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("软件版本");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/N").c_str());
}
if (AutomaticUpdateState == AutomaticUpdateStateEnum::UpdateNew)
@@ -1765,7 +2057,7 @@ void SettingMain()
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("发现软件更新版本");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/ManualUpdate/N").c_str());
}
{
ImGui::SetCursorPos({ 630.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -1775,7 +2067,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("手动更新", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/Version/ManualUpdate/ManualUpdate").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
mandatoryUpdate = true;
AutomaticUpdateState = AutomaticUpdateStateEnum::UpdateObtainInformation;
@@ -1814,7 +2106,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextWrapped("检测到软件架构与系统架构不符,与系统架构不适应有可能会导致软件效率降低,并影响体验。建议在本页面下方“软件修复”模块中修复软件(启用“修复时修正软件架构”选项),或在页面底端手动选择目标架构并修复。");
+ ImGui::TextWrapped(IA("SettingsUI/Version/VersionTip").c_str());
}
{
@@ -1843,7 +2135,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("版本信息");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Info/N").c_str());
}
{
@@ -1861,13 +2153,13 @@ void SettingMain()
ImGui::SetCursorPosY(ImGui::GetCursorPosY());
wstring text;
{
- text += L"\n程序发布版本 " + editionDate + L"(" + editionChannel + L")";
- text += L"\n程序构建时间 " + buildTime;
- text += L"\n程序架构和系统架构 " + programArchitecture + L" | " + targetArchitecture;
+ text += L"\n" + IW("SettingsUI/Version/Info/ReleaseVersion") + L" " + editionDate + L"(" + editionChannel + L")";
+ text += L"\n" + IW("SettingsUI/Version/Info/ReleaseDate") + L" " + buildTime;
+ text += L"\n" + IW("SettingsUI/Version/Info/ReleaseArch") + L" " + programArchitecture + L" | " + targetArchitecture;
#ifdef IDT_RELEASE
- text += L"\n程序构建模式为发布版本(RELEASE)";
+ text += L"\n" + IW("SettingsUI/Version/Info/ReleaseTag");
#else
- text += L"\n程序构建模式为非发布调测版本(DEBUG)";
+ text += L"\n" + IW("SettingsUI/Version/Info/DebugTag");
#endif
}
@@ -1912,7 +2204,7 @@ void SettingMain()
if (settingCICD.url.empty())
{
int left_x = 10 * settingGlobalScale, right_x = 760 * settingGlobalScale;
- string temp = "此版本为手动构建";
+ string temp = IA("SettingsUI/Version/Info/ManualBuild");
float text_width = ImGui::CalcTextSize(temp.c_str()).x;
float text_indentation = ((right_x - left_x) - text_width) * 0.5f;
@@ -1923,8 +2215,8 @@ void SettingMain()
else
{
int left_x = 10 * settingGlobalScale, right_x = 760 * settingGlobalScale;
- string temp = "此版本为自动构建(CI/CD): ";
- string url = "自动构建详情信息";
+ string temp = IA("SettingsUI/Version/Info/AutoBuild");
+ string url = IA("SettingsUI/Version/Info/CICDInfo");
float text_width = ImGui::CalcTextSize((temp + url).c_str()).x;
float text_indentation = ((right_x - left_x) - text_width) * 0.5f;
@@ -1967,7 +2259,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("用户信息");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/UserInfo/N").c_str());
}
{
@@ -1982,14 +2274,14 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("复制用户ID");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/UserInfo/CopyUserId").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(("用户ID " + utf16ToUtf8(userId)).c_str());
+ ImGui::TextUnformatted((IA("SettingsUI/Version/UserInfo/UserId") + " " + utf16ToUtf8(userId)).c_str());
}
{
ImGui::SetCursorPos({ 630.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -1999,7 +2291,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("复制", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("Operate/Copy").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
OpenClipboard(NULL); // 打开剪切板
EmptyClipboard(); // 清空剪切板
@@ -2039,7 +2331,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("软件修复");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Repair/N").c_str());
}
{
@@ -2054,14 +2346,14 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("修复软件");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Repair/RepairSoftware").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("重新安装软件至所选通道的最新版本");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Repair/RepairSoftwareE").c_str());
}
{
ImGui::SetCursorPos({ 630.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -2071,7 +2363,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("修复", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("Operate/Repair").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
if (EnableFixWithChangeArchitecture)
{
@@ -2106,7 +2398,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("修复时修正软件架构");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Repair/RepairArch").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -2153,7 +2445,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("更新偏好");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Update/N").c_str());
}
{
@@ -2168,7 +2460,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("自动更新(静默)");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Update/AutoUpate").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -2241,7 +2533,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextWrapped("正式通道(LTS) 推送最新的稳定版本, 经过开发者和预览用户的验证, 具有较高的稳定性。(推荐)\n预览通道(Insider) 推送最新的功能版本, 稳定性一般或存在较多BUG, 且可能会被杀毒软件误报。");
+ ImGui::TextWrapped(IA("SettingsUI/Version/Update/ChannelTip").c_str());
}
{
@@ -2271,42 +2563,66 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("目标更新通道");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Update/Channel/N").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
int UpdateChannelMode;
vector vec;
- vec.emplace_back(_strdup((" " + string("正式通道(LTS)")).c_str()));
- vec.emplace_back(_strdup((" " + string("预览通道(Insider)")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Version/Update/Channel/LTS")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Version/Update/Channel/Insider")).c_str()));
if (setlist.UpdateChannel == "Insider") UpdateChannelMode = 1;
else UpdateChannelMode = 0;
- if (ImGui::Combo("##更新通道", &UpdateChannelMode, vec.data(), vec.size()))
{
- if ((UpdateChannelMode == 0 && setlist.UpdateChannel != "LTS") ||
- (UpdateChannelMode == 1 && setlist.UpdateChannel != "Insider"))
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##更新通道", vec[UpdateChannelMode]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- if (UpdateChannelMode == 1) setlist.UpdateChannel = "Insider";
- else setlist.UpdateChannel = "LTS";
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
- AutomaticUpdateState = AutomaticUpdateStateEnum::UpdateObtainInformation;
+ bool is_selected = (UpdateChannelMode == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ UpdateChannelMode = i;
+ if ((UpdateChannelMode == 0 && setlist.UpdateChannel != "LTS") ||
+ (UpdateChannelMode == 1 && setlist.UpdateChannel != "Insider"))
+ {
+ if (UpdateChannelMode == 1) setlist.UpdateChannel = "Insider";
+ else setlist.UpdateChannel = "LTS";
+ WriteSetting();
+
+ AutomaticUpdateState = AutomaticUpdateStateEnum::UpdateObtainInformation;
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
-
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -2329,46 +2645,71 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("目标更新架构");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Update/Arch/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("注意:和当前系统不一致的架构可能会导致软件无法启动或严重的性能问题。");
+ ImGui::TextUnformatted(IA("SettingsUI/Version/Update/Arch/E").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + string("64位")).c_str()));
- vec.emplace_back(_strdup((" " + string("32位")).c_str()));
- vec.emplace_back(_strdup((" " + string("Arm64")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Version/Update/Arch/64")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Version/Update/Arch/32")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Version/Update/Arch/Arm64")).c_str()));
int UpdateArchitecture, UpdateArchitectureEcho;
if (setlist.updateArchitecture == "win64") UpdateArchitecture = UpdateArchitectureEcho = 0;
else if (setlist.updateArchitecture == "arm64") UpdateArchitecture = UpdateArchitectureEcho = 2;
else UpdateArchitecture = UpdateArchitectureEcho = 1;
- if (ImGui::Combo("##目标更新架构", &UpdateArchitecture, vec.data(), vec.size()))
{
- if (UpdateArchitectureEcho != UpdateArchitecture)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##目标更新架构", vec[UpdateArchitecture]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- if (UpdateArchitecture == 0) setlist.updateArchitecture = "win64";
- else if (UpdateArchitecture == 2) setlist.updateArchitecture = "arm64";
- else setlist.updateArchitecture = "win32";
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
- WriteSetting();
+ bool is_selected = (UpdateArchitecture == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ UpdateArchitecture = i;
+ if (UpdateArchitectureEcho != UpdateArchitecture)
+ {
+ if (UpdateArchitecture == 0) setlist.updateArchitecture = "win64";
+ else if (UpdateArchitecture == 2) setlist.updateArchitecture = "arm64";
+ else setlist.updateArchitecture = "win32";
+
+ WriteSetting();
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -2428,7 +2769,7 @@ void SettingMain()
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("自动构建详情信息");
+ ImGui::TextUnformatted(IA("SettingsUI/CICD/N").c_str());
}
{
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
@@ -2472,7 +2813,7 @@ void SettingMain()
{
ImGui::TextUnformatted("");
- string temp = "构建仓库: ";
+ string temp = IA("SettingsUI/CICD/Repository") + ": ";
string url = utf16ToUtf8(settingCICD.repoUrl);
int left_x = 20 * settingGlobalScale, right_x = 750 * settingGlobalScale;
@@ -2490,16 +2831,16 @@ void SettingMain()
{
wstring text;
{
- text += L"构建分支: " + settingCICD.branch + L"\n";
- text += L"构建提交者: " + settingCICD.submitter + L"\n";
- text += L"构建时间: " + settingCICD.buildTime + L"\n";
+ text += IW("SettingsUI/CICD/Branch") + L": " + settingCICD.branch + L"\n";
+ text += IW("SettingsUI/CICD/Submitter") + L": " + settingCICD.submitter + L"\n";
+ text += IW("SettingsUI/CICD/BuildTime") + L": " + settingCICD.buildTime + L"\n";
text += L"\n";
- text += L"构建系统: " + settingCICD.buildOS + L"\n";
- text += L"构建系统版本: " + settingCICD.buildOSVersion + L"\n";
- text += L"运行器镜像系统: " + settingCICD.buildRunnerImageOS + L"\n";
- text += L"运行器镜像版本: " + settingCICD.buildRunnerImageVersion + L"\n";
+ text += IW("SettingsUI/CICD/BuildSystem") + L": " + settingCICD.buildOS + L"\n";
+ text += IW("SettingsUI/CICD/BuildSystemVersion") + L": " + settingCICD.buildOSVersion + L"\n";
+ text += IW("SettingsUI/CICD/RunnerImageSystem") + L": " + settingCICD.buildRunnerImageOS + L"\n";
+ text += IW("SettingsUI/CICD/RunnerImageVersion") + L": " + settingCICD.buildRunnerImageVersion + L"\n";
text += L"\n";
- text += L"MSBuild 版本: \n" + settingCICD.msBuildVersion + L"\n";
+ text += IW("SettingsUI/CICD/MSBuildVersion") + L"\n" + settingCICD.msBuildVersion + L"\n";
}
int left_x = 20 * settingGlobalScale, right_x = 750 * settingGlobalScale;
@@ -2573,88 +2914,9 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/N").c_str());
}
- /*
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f * settingGlobalScale);
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 255, 255, 0));
- ImGui::BeginChild("常规#1", { 750.0f * settingGlobalScale,100.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
-
- {
- ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular1]).c_str());
- }
-
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f * settingGlobalScale);
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
- ImGui::BeginChild("语言", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
-
- float cursosPosY = 0;
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular1_1]).c_str());
- }
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
- ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular1_2]).c_str());
- }
- {
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
-
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
-
- vector vec;
- vec.emplace_back(_strdup((" " + string("English(en-US)")).c_str()));
- vec.emplace_back(_strdup((" " + string("简体中文(zh-CN)")).c_str()));
- // vec.emplace_back(_strdup((" " + string("正體中文(zh-TW)")).c_str()));
-
- if (ImGui::Combo("##语言", &SelectLanguage, vec.data(), vec.size()))
- {
- if (setlist.selectLanguage != SelectLanguage)
- {
- setlist.selectLanguage = SelectLanguage;
- WriteSetting();
- }
- }
- for (char* ptr : vec) free(ptr), ptr = nullptr;
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- }
- */
{
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f * settingGlobalScale);
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
@@ -2666,7 +2928,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular2]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/StartUp/N").c_str());
}
{
@@ -2681,13 +2943,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular2_1]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/StartUp/AutoStart").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular2_2]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/StartUp/AutoStartE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -2735,14 +2997,14 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("创建桌面快捷方式");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/StartUp/Link/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("自动修正名称和创建快捷方式,请点击“更多选项”。");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/StartUp/Link/E").c_str());
}
{
ImGui::SetCursorPos({ 525.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -2752,7 +3014,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("创建", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("Operate/Create").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
wchar_t desktopPath[MAX_PATH];
wstring DesktopPath;
@@ -2761,10 +3023,10 @@ void SettingMain()
{
DesktopPath = wstring(desktopPath) + L"\\";
- if (_waccess((DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk").c_str(), 0) == -1 ||
- !shortcutAssistant.IsShortcutPointingToDirectory((DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk"), GetCurrentExePath()))
+ if (_waccess((DesktopPath + IW("Widget/LnkName") + L".lnk").c_str(), 0) == -1 ||
+ !shortcutAssistant.IsShortcutPointingToDirectory(DesktopPath + IW("Widget/LnkName") + L".lnk", GetCurrentExePath()))
{
- shortcutAssistant.CreateShortcut(DesktopPath + get(i18n[i18nEnum::LnkName]).c_str() + L".lnk", GetCurrentExePath());
+ shortcutAssistant.CreateShortcut(DesktopPath + IW("Widget/LnkName") + L".lnk", GetCurrentExePath());
}
}
}
@@ -2777,7 +3039,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("更多选项", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/Regular/StartUp/Link/More").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
settingPlugInTab = settingPlugInTabEnum::tabPlug3;
settingTab = settingTabEnum::tab4;
@@ -2810,7 +3072,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular3]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Appearance/N").c_str());
}
{
@@ -2825,36 +3087,61 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular3_1]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Appearance/Theme/N").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + get(i18n[i18nEnum::SettingsRegular3_3])).c_str()));
- vec.emplace_back(_strdup((" " + get(i18n[i18nEnum::SettingsRegular3_4])).c_str()));
- vec.emplace_back(_strdup((" " + get(i18n[i18nEnum::SettingsRegular3_5])).c_str()));
- vec.emplace_back(_strdup((" " + get(i18n[i18nEnum::SettingsRegular3_6])).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Appearance/Theme/Skip1")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Appearance/Theme/Skip2")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Appearance/Theme/Skip3")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Appearance/Theme/Skip4")).c_str()));
- if (ImGui::Combo("##主题", &SetSkinMode, vec.data(), vec.size()))
{
- if (setlist.SetSkinMode != SetSkinMode)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##主题", vec[SetSkinMode]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- setlist.SetSkinMode = SetSkinMode;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
- if (SetSkinMode == 0) setlist.SkinMode = 1;
- else setlist.SkinMode = SetSkinMode;
+ bool is_selected = (SetSkinMode == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ SetSkinMode = i;
+ if (setlist.SetSkinMode != SetSkinMode)
+ {
+ setlist.SetSkinMode = SetSkinMode;
+ WriteSetting();
+
+ if (SetSkinMode == 0) setlist.SkinMode = 1;
+ else setlist.SkinMode = SetSkinMode;
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -2878,13 +3165,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular3_7]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Appearance/SettingUIScale/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular3_8]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Appearance/SettingUIScale/E").c_str());
}
{
ImGui::SetCursorPos({ 435.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -2918,7 +3205,7 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(vformat(get(i18n[i18nEnum::SettingsRegular3_9]), make_format_args(SettingGlobalScale)).c_str());
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/Regular/Appearance/SettingUIScale/Ind"), make_format_args(SettingGlobalScale)).c_str());
ImGui::EndTooltip();
}
@@ -2932,7 +3219,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = format("{:.2f} 倍缩放", SettingGlobalScale);
+ string temp = vformat(IA("SettingsUI/Regular/Appearance/SettingUIScale/Ind"), make_format_args(SettingGlobalScale));
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 15.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -2965,7 +3252,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular4]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/N").c_str());
}
{
@@ -2980,7 +3267,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("置顶间隔");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/TopWindow/N").c_str());
}
cursosPosY = ImGui::GetCursorPosY();
{
@@ -2994,7 +3281,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("在非绘制模式下将按此间隔置顶窗口,落笔时暂停置顶窗口。更短的间隔可以更少地排除其他软件的窗口的干扰,但会占用更多的CPU资源。"); // 如果其他软件其他软件的窗口持续干扰,建议使用超级置顶插件。
+ ImGui::TextWrapped(IA("SettingsUI/Regular/Behavior/TopWindow/E").c_str());
}
{
@@ -3007,35 +3294,60 @@ void SettingMain()
cursosPosY = 0;
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 50.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 50.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + string("非常短(100ms)")).c_str()));
- vec.emplace_back(_strdup((" " + string("短(500ms)")).c_str()));
- vec.emplace_back(_strdup((" " + string("较短(1s)")).c_str()));
- vec.emplace_back(_strdup((" " + string("中等(3s)")).c_str()));
- vec.emplace_back(_strdup((" " + string("较长(5s)")).c_str()));
- vec.emplace_back(_strdup((" " + string("长(10s)")).c_str()));
- vec.emplace_back(_strdup((" " + string("非常长(30s)")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/100ms")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/500ms")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/1s")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/3s")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/5s")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/10s")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Behavior/TopWindow/30s")).c_str()));
- if (ImGui::Combo("##置顶间隔", &TopSleepTime, vec.data(), vec.size()))
{
- if (setlist.topSleepTime != TopSleepTime)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##置顶间隔", vec[TopSleepTime]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- setlist.topSleepTime = TopSleepTime;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (TopSleepTime == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ TopSleepTime = i;
+ if (setlist.topSleepTime != TopSleepTime)
+ {
+ setlist.topSleepTime = TopSleepTime;
+ WriteSetting();
- topWindowNow = true;
+ topWindowNow = true;
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -3059,13 +3371,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular4_1]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/RightClickClose").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular4_2]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/RightClickCloseE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -3111,7 +3423,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular4_3]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/DrawingRetract").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3151,7 +3463,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular4_4]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/ErasingRetract").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3191,7 +3503,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("拖动主栏时收起主栏");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/DraggingRetract").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3231,13 +3543,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("点击时收起主栏");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/CheckingRetract").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("仅在选择模式或穿透下,点击非主栏区域时生效。");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Behavior/CheckingRetractE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -3289,7 +3601,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsRegular5]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Tentative/N").c_str());
}
{
@@ -3304,7 +3616,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("避免全屏显示");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Tentative/AvoidFulScreen").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3343,7 +3655,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("重启软件生效。软件在非绘制模式下或穿透模式下将不会保持全屏显示。这可以保证拥有自动隐藏熟悉的任务栏可以正常升起,可能可以降低置顶窗口失败的概率,还可能可以改善任务栏无法被触摸的问题。");
+ ImGui::TextWrapped(IA("SettingsUI/Regular/Tentative/AvoidFulScreenE").c_str());
}
{
@@ -3373,41 +3685,66 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("教学安全选项");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Tentative/SafeMode/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("软件发生崩溃错误时所执行的操作。(启动过程发生错误依旧会引发提示)");
+ ImGui::TextUnformatted(IA("SettingsUI/Regular/Tentative/SafeMode/E").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + string("弹窗提示并重启软件")).c_str()));
- vec.emplace_back(_strdup((" " + string("静默重启软件")).c_str()));
- vec.emplace_back(_strdup((" " + string("交由系统崩溃过滤器处理")).c_str()));
- vec.emplace_back(_strdup((" " + string("直接关闭软件")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Tentative/SafeMode/Mode1")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Tentative/SafeMode/Mode2")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Tentative/SafeMode/Mode3")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Regular/Tentative/SafeMode/Mode4")).c_str()));
- if (ImGui::Combo("##教学安全选项", &RegularSetting.TeachingSafetyMode, vec.data(), vec.size()))
{
- if (setlist.regularSetting.teachingSafetyMode != RegularSetting.TeachingSafetyMode)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##教学安全选项", vec[RegularSetting.TeachingSafetyMode]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- setlist.regularSetting.teachingSafetyMode = RegularSetting.TeachingSafetyMode;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (RegularSetting.TeachingSafetyMode == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ RegularSetting.TeachingSafetyMode = i;
+ if (setlist.regularSetting.teachingSafetyMode != RegularSetting.TeachingSafetyMode)
+ {
+ setlist.regularSetting.teachingSafetyMode = RegularSetting.TeachingSafetyMode;
+ WriteSetting();
- CrashHandler::SetFlag(setlist.regularSetting.teachingSafetyMode);
+ CrashHandler::SetFlag(setlist.regularSetting.teachingSafetyMode);
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -3453,7 +3790,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘制");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/N").c_str());
}
{
@@ -3467,7 +3804,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘图效果优化");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/Effect/N").c_str());
}
{
@@ -3482,40 +3819,65 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘图设备");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/Effect/Device/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("我们将根据不同设备类型优化使用体验。");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/Effect/Device/E").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
+
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + string("触控屏幕")).c_str()));
- vec.emplace_back(_strdup((" " + string("鼠标或手写笔")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Draw/Effect/Device/Touch")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Draw/Effect/Device/MousePen")).c_str()));
- if (ImGui::Combo("##绘图设备", &PaintDevice, vec.data(), vec.size()))
{
- if (setlist.paintDevice != PaintDevice)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##绘图设备", vec[PaintDevice]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- setlist.paintDevice = PaintDevice;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (PaintDevice == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ PaintDevice = i;
+ if (setlist.paintDevice != PaintDevice)
+ {
+ setlist.paintDevice = PaintDevice;
+ WriteSetting();
- drawingScale = GetDrawingScale();
- stopTimingError = GetStopTimingError();
+ drawingScale = GetDrawingScale();
+ stopTimingError = GetStopTimingError();
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -3546,7 +3908,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("智能绘图");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/N").c_str());
}
{
@@ -3561,13 +3923,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("抬笔拉直直线");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/PenUp").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("现阶段只推荐在教学一体机上使用。");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/PenUpE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -3607,13 +3969,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("停留拉直直线");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/PenStay").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("绘制直线完成后按住一秒,直线将被拉直。");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/PenStayE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -3659,13 +4021,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("端点吸附");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/EndpointAdsorption").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("直线和矩形的端点将会在抬笔时吸附。");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/AIDraw/EndpointAdsorptionE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -3717,7 +4079,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘制行为");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/DrawBehavior/N").c_str());
}
{
@@ -3732,7 +4094,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("抬笔平滑笔迹");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/DrawBehavior/SoomthWriting").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3785,7 +4147,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("擦除行为");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/RubberThickness/N").c_str());
}
{
@@ -3800,38 +4162,63 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("橡皮粗细计算方式");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/RubberThickness/Calc/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("如果当前计算方式不满足条件,软件会继续尝试下一个。");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/RubberThickness/Calc/E").c_str());
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
vector vec;
- vec.emplace_back(_strdup((" " + string("压感粗细")).c_str()));
- vec.emplace_back(_strdup((" " + string("笔速粗细")).c_str()));
- vec.emplace_back(_strdup((" " + string("固定粗细")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Draw/RubberThickness/Calc/Mode3")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Draw/RubberThickness/Calc/Mode2")).c_str()));
+ vec.emplace_back(_strdup((IA("SettingsUI/Draw/RubberThickness/Calc/Mode1")).c_str()));
- if (ImGui::Combo("##橡皮粗细计算方式", &EraserMode, vec.data(), vec.size()))
{
- if (setlist.eraserSetting.eraserMode != EraserMode)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##橡皮粗细计算方式", vec[EraserMode]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- setlist.eraserSetting.eraserMode = EraserMode;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+
+ bool is_selected = (EraserMode == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ EraserMode = i;
+ if (setlist.eraserSetting.eraserMode != EraserMode)
+ {
+ setlist.eraserSetting.eraserMode = EraserMode;
+ WriteSetting();
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -3861,7 +4248,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("实验选项");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/Tentative/N").c_str());
}
{
@@ -3876,7 +4263,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘制时隐藏触控光标(BETA)");
+ ImGui::TextUnformatted(IA("SettingsUI/Draw/Tentative/HideCursor").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -3915,7 +4302,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("阻止触控光标(白色圆点)在画布上显示。但是当鼠标和触控笔信号出现时, 则会恢复显示鼠标光标/笔光标。");
+ ImGui::TextWrapped(IA("SettingsUI/Draw/Tentative/HideCursorE").c_str());
}
{
@@ -3955,165 +4342,6 @@ void SettingMain()
break;
}
- // 保存
- case settingTabEnum::tabSave:
- {
- ImGui::SetCursorPos({ 170.0f * settingGlobalScale,40.0f * settingGlobalScale });
-
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(243, 243, 243, 255));
- ImGui::BeginChild("保存", { (750.0f + 30.0f) * settingGlobalScale,608.0f * settingGlobalScale }, false);
-
- ImGui::SetCursorPosY(10.0f * settingGlobalScale);
- {
- ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("保存");
- }
-
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f * settingGlobalScale);
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 255, 255, 0));
- ImGui::BeginChild("保存#1", { 750.0f * settingGlobalScale,175.0f * settingGlobalScale }, false, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
-
- {
- ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("基础设置");
- }
-
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f * settingGlobalScale);
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
- ImGui::BeginChild("启用历史画布保存", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
-
- float cursosPosY = 0;
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("启用历史画布保存");
- }
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
- ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("存储在程序目录下 ScreenShot 文件夹内,并供“超级恢复”使用历史画布。");
- }
- {
- ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(0, 0, 0, 6));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(0, 0, 0, 15));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 95, 184, 255));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(0, 95, 184, 230));
- if (!SaveSetting.Enable)
- {
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 155));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_BorderShadow, IM_COL32(0, 0, 0, 155));
- }
- else
- {
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 255, 255, 255));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_BorderShadow, IM_COL32(0, 95, 184, 255));
- }
- ImGui::Toggle("##启用历史画布保存", &SaveSetting.Enable, config);
-
- if (setlist.saveSetting.enable != SaveSetting.Enable)
- {
- setlist.saveSetting.enable = SaveSetting.Enable;
- WriteSetting();
- }
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- }
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5.0f * settingGlobalScale);
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
- ImGui::BeginChild("保存时长", { 750.0f * settingGlobalScale,70.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
-
- float cursosPosY = 0;
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("保存时长");
- }
- {
- ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
- ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("超过设定时长后,在启动时清理过期的历史画布。");
- }
- {
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
-
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
-
- vector vec;
- vec.emplace_back(_strdup((" " + string("1天")).c_str()));
- vec.emplace_back(_strdup((" " + string("3天")).c_str()));
- vec.emplace_back(_strdup((" " + string("5天")).c_str()));
- vec.emplace_back(_strdup((" " + string("10天")).c_str()));
- vec.emplace_back(_strdup((" " + string("30天")).c_str()));
- vec.emplace_back(_strdup((" " + string("从不清理")).c_str()));
-
- if (ImGui::Combo("##保存时长", &SaveSetting.SaveDays, vec.data(), vec.size()))
- {
- if (setlist.saveSetting.saveDays != SaveSetting.SaveDays)
- {
- setlist.saveSetting.saveDays = SaveSetting.SaveDays;
- WriteSetting();
- }
- }
- for (char* ptr : vec) free(ptr), ptr = nullptr;
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
-
- {
- ImVec2 mouse_delta = ImGui::GetIO().MouseDelta;
- ScrollWhenDraggingOnVoid(ImVec2(0.0f, -mouse_delta.y), ImGuiMouseButton_Left);
- }
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- break;
- }
-
// 性能
case settingTabEnum::tabPerformance:
{
@@ -4126,7 +4354,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("性能");
+ ImGui::TextUnformatted(IA("SettingsUI/Performance/N").c_str());
}
{
@@ -4140,7 +4368,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("绘图模块");
+ ImGui::TextUnformatted(IA("SettingsUI/Performance/DrawMode/N").c_str());
}
{
@@ -4155,13 +4383,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("落笔预备");
+ ImGui::TextUnformatted(IA("SettingsUI/Performance/DrawMode/Prepare/N").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("越大则越多手指落下时更快开始绘制,但会占用更多内存。");
+ ImGui::TextUnformatted(IA("SettingsUI/Performance/DrawMode/Prepare/E").c_str());
}
{
ImGui::SetCursorPos({ 435.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -4194,7 +4422,7 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{:d} 指", PreparationQuantity).c_str());
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/Performance/DrawMode/Prepare/Ind"), make_format_args(PreparationQuantity)).c_str());
ImGui::EndTooltip();
}
@@ -4211,7 +4439,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = to_string(static_cast(PreparationQuantity)) + " 指";
+ string temp = vformat(IA("SettingsUI/Performance/DrawMode/Prepare/Ind"), make_format_args(PreparationQuantity));
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 15.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -4230,14 +4458,14 @@ void SettingMain()
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
- ImGui::BeginChild("高性能绘图", { 750.0f * settingGlobalScale,120.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
+ ImGui::BeginChild("极限性能绘图", { 750.0f * settingGlobalScale,120.0f * settingGlobalScale }, true, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
float cursosPosY = 0;
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("高性能绘图(BETA)");
+ ImGui::TextUnformatted(IA("SettingsUI/Performance/DrawMode/SuperDraw").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -4255,7 +4483,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 255, 255, 255));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_BorderShadow, IM_COL32(0, 95, 184, 255));
}
- ImGui::Toggle("##高性能绘图", &SuperDraw, config);
+ ImGui::Toggle("##极限性能绘图", &SuperDraw, config);
if (setlist.performanceSetting.superDraw != SuperDraw)
{
@@ -4270,13 +4498,13 @@ void SettingMain()
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0.0f);
- ImGui::BeginChild("高性能绘图-介绍", { 710.0f * settingGlobalScale,50.0f * settingGlobalScale }, false);
+ ImGui::BeginChild("极限性能绘图-介绍", { 710.0f * settingGlobalScale,50.0f * settingGlobalScale }, false);
{
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("在绘制模式下使用更多的系统资源进行绘图, 以及拥有更加精确的渲染间隔。 所有的额外性能开销都仅在绘制中产生(即非选择状态下)。 如果发现绘制延迟高、不跟手, 请关闭此选项。 对于 Windows 10 2004(不含)以下系统, 可能会在绘图时影响其他软件渲染间隔, 并带来更大的全局开销。");
+ ImGui::TextWrapped(IA("SettingsUI/Performance/DrawMode/SuperDrawE").c_str());
}
{
@@ -4328,7 +4556,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("预设");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/N").c_str());
}
{
@@ -4342,7 +4570,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("记忆");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Memory/N").c_str());
}
{
@@ -4357,13 +4585,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("记忆绘制粗细");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Memory/Thickness").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("在启动软件时使画笔与荧光笔的粗细和退出时一致。");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Memory/ThicknessE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -4403,13 +4631,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("记忆绘制颜色");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Memory/Color").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("在启动软件时使画笔与荧光笔的颜色和退出时一致。");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Memory/ColorE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -4462,7 +4690,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("预设(仅在未开启对应绘制记忆时生效)");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Preset/N").c_str());
}
{
@@ -4477,13 +4705,17 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("自适应绘制粗细");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Preset/AutoThickness").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted(format("在启动时,根据屏幕分辨率和物理尺寸自动设定推荐的绘制粗细。(画笔当前为{}px;荧光笔当前为{}px)", static_cast(stateMode.Pen.Brush1.widthPreset), static_cast(stateMode.Pen.Highlighter1.widthPreset)).c_str());
+
+ int x = static_cast(stateMode.Pen.Brush1.widthPreset);
+ int y = static_cast(stateMode.Pen.Highlighter1.widthPreset);
+
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/Preset/Preset/AutoThicknessE"), make_format_args(x, y)).c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -4530,7 +4762,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("预设画笔粗细");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Preset/Pen").c_str());
}
{
ImGui::SetCursorPos({ 225.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -4564,7 +4796,8 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{} px", static_cast(PresetSetting.DefaultBrush1Width)).c_str());
+ int x = static_cast(PresetSetting.DefaultBrush1Width);
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/Preset/Preset/PenInd"), make_format_args(x)).c_str());
ImGui::EndTooltip();
}
@@ -4578,7 +4811,8 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = to_string(static_cast(PresetSetting.DefaultBrush1Width)) + "px";
+ int x = static_cast(PresetSetting.DefaultBrush1Width);
+ string temp = vformat(IA("SettingsUI/Preset/Preset/PenInd"), make_format_args(x));
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 10.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -4598,7 +4832,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("预设荧光笔粗细");
+ ImGui::TextUnformatted(IA("SettingsUI/Preset/Preset/Highlighter").c_str());
}
{
ImGui::SetCursorPos({ 225.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -4632,7 +4866,8 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{} px", static_cast(PresetSetting.DefaultHighlighter1Width)).c_str());
+ int x = static_cast(PresetSetting.DefaultHighlighter1Width);
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/Preset/Preset/HighlighterInd"), make_format_args(x)).c_str());
ImGui::EndTooltip();
}
@@ -4646,7 +4881,8 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = to_string(static_cast(PresetSetting.DefaultHighlighter1Width)) + "px";
+ int x = static_cast(PresetSetting.DefaultHighlighter1Width);
+ string temp = vformat(IA("SettingsUI/Preset/Preset/HighlighterInd"), make_format_args(x));
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 10.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -4697,7 +4933,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("插件");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/N").c_str());
}
{
@@ -4714,14 +4950,14 @@ void SettingMain()
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("PPT演示助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/N").c_str());
}
{
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
{
- if (pptComVersion.substr(0, 7) == L"Error: ") ImGui::TextUnformatted("版本号未知(插件发生错误)");
+ if (pptComVersion.substr(0, 7) == L"Error: ") ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/VersionError").c_str());
else ImGui::TextUnformatted(utf16ToUtf8(pptComVersion).c_str());
}
}
@@ -4747,8 +4983,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("在幻灯片演示时提供演示控制按钮和画笔控制按钮。每页拥有独立画板,可以让笔迹固定在页面上。不影响原有功能和外接设备的使用,支持 Microsoft PowerPoint 和WPS。");
- //ImGui::TextWrapped("Provides presentation control buttons and pen control buttons during slideshow presentations. Each slide has an independent drawing board, allowing ink strokes to be fixed on the page. Does not affect existing functions and the use of external devices, supports both Microsoft PowerPoint and WPS.");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/PPTHelper/E").c_str());
}
{
@@ -4781,13 +5016,13 @@ void SettingMain()
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("超级置顶(BETA)");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/N").c_str());
}
{
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("20250505a");
+ ImGui::TextUnformatted("20250715a");
}
{
ImGui::SetCursorPos({ 630.0f * settingGlobalScale, 20.0f * settingGlobalScale });
@@ -4811,7 +5046,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("使用UiAccess技术在其他常规软件之上显示软件窗口,亦或是在任务栏、Alt+Tab、屏幕键盘、锁屏界面等上方显示软件窗口。仅支持Windows8及以上系统。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/SuperTop/E").c_str());
}
{
@@ -4844,7 +5079,7 @@ void SettingMain()
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("同类软件悬浮窗拦截助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/DesktopDrawpadBlocker/N").c_str());
}
{
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, ImGui::GetCursorPosY() });
@@ -4874,7 +5109,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("拦截屏幕上 希沃白板桌面悬浮窗 等同类软件悬浮窗。支持拦截常见同类软件悬浮窗,以及 PPT 小工具等 PPT 操控栏。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/DesktopDrawpadBlocker/E").c_str());
}
{
@@ -4907,7 +5142,7 @@ void SettingMain()
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("快捷方式保障助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/N").c_str());
}
{
ImGui::SetCursorPos({ 60.0f * settingGlobalScale, ImGui::GetCursorPosY() });
@@ -4937,8 +5172,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("在程序启动时确保已经创建的智绘教Inkeys快捷方式是有效的。因为程序更新会修改文件名称,这会导致快捷方式失效。可选的,如果桌面没有智绘教Inkeys的快捷方式,则创建一个。");
- //ImGui::TextWrapped("Ensure that the created shortcut for 智绘教Inkeys is valid at program startup. Because program updates modify file names, this can cause shortcuts to become invalid. Optionally, if there is no shortcut for 智绘教Inkeys on the desktop, create one.");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/LnkHelper/E").c_str());
}
{
@@ -4994,14 +5228,14 @@ void SettingMain()
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("PPT演示助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/N").c_str());
}
{
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
{
- if (pptComVersion.substr(0, 7) == L"Error: ") ImGui::TextUnformatted("版本号未知(插件发生错误)");
+ if (pptComVersion.substr(0, 7) == L"Error: ") ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/VersionError").c_str());
else ImGui::TextUnformatted(utf16ToUtf8(pptComVersion).c_str());
}
}
@@ -5036,8 +5270,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextWrapped("使用插件时需要保证智绘教Inkeys的程序权限和PPT程序是一致的才能正确识别。如果依然存在问题,可以参考解决方案。");
- //ImGui::TextWrapped("When using the plugin, you need to make sure that the program permissions of 智绘教Inkeys and the slideshow program are the same in order to recognize it correctly. If you still have problems, you can refer to the solution.");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/PPTHelper/Tip").c_str());
}
{
@@ -5055,7 +5288,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("解决方案", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/PlugIn/PPTHelper/Solve").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
ShellExecuteW(0, 0, L"https://blog.csdn.net/alan16356/article/details/143618256?fromshare=blogdetail&sharetype=blogdetail&sharerId=143618256&sharerefer=PC&sharesource=alan16356&sharefrom=from_link", 0, 0, SW_SHOW);
}
@@ -5093,8 +5326,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextWrapped("检测到您的PowerPoint/WPS已经设置为始终以管理员身份打开,这意味着程序需要以管理员身份运行才能识别到放映进程并开启PPT联动。如果您不希望放映软件始终以管理员身份运行,可以参考解决方案。");
- //ImGui::TextWrapped("Detected that your PowerPoint/WPS has been set to always open as administrator, which means that the program needs to run as administrator in order to recognize the screening process and open the PPT linkage. If you do not want the screening software to always run as administrator, you can refer to the solution.");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/PPTHelper/Warn").c_str());
}
{
@@ -5112,7 +5344,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("解决方案", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/PlugIn/PPTHelper/Solve").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
ShellExecuteW(0, 0, L"https://blog.csdn.net/alan16356/article/details/143625981?fromshare=blogdetail&sharetype=blogdetail&sharerId=143625981&sharerefer=PC&sharesource=alan16356&sharefrom=from_link", 0, 0, SW_SHOW);
}
@@ -5137,7 +5369,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("基础逻辑");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/BasicLogic/N").c_str());
}
{
@@ -5152,7 +5384,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("墨迹固定在对应页面上");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/BasicLogic/InkFixation").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -5191,7 +5423,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("每个PPT页面都将拥有各自独立的画布,并可以实现类似PPT自带画笔的效果。翻页不会清空之前页面所绘制的墨迹,可以返回之前的页面继续绘制。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/PPTHelper/BasicLogic/InkFixationE").c_str());
}
{
@@ -5221,13 +5453,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("显示加载页面");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/BasicLogic/LoadPage").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("包含插件标识和小提示等,每个 PPT 仅显示一次。");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/BasicLogic/LoadPageE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -5280,7 +5512,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("控件显示");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetDisplay/N").c_str());
}
{
@@ -5295,7 +5527,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("显示底部两侧控件");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetDisplay/BottomBoth").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -5335,7 +5567,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("显示中部两侧控件");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetDisplay/MiddleBoth").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -5375,7 +5607,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("显示底部主栏控件");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetDisplay/BottomMiddle").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -5428,7 +5660,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("控件位置");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetPosition/N").c_str());
}
{
@@ -5443,7 +5675,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("重置控件位置");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetPosition/Reset").c_str());
}
{
ImGui::SetCursorPos({ 630.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -5453,7 +5685,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("重置", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/PlugIn/PPTHelper/Reset").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
pptComSetlist.bottomBothWidth = BottomBothWidth = 0;
pptComSetlist.bottomBothHeight = BottomBothHeight = 0;
@@ -5485,7 +5717,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("记忆控件位置");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetPosition/Remember").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -5538,7 +5770,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("控件缩放");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/N").c_str());
}
// Extra1
@@ -5556,7 +5788,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("底部两侧控件缩放");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Page/BottomSideBoth").c_str());
}
{
ImGui::SetCursorPos({ 220.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -5591,7 +5823,7 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{:.2f} 倍缩放", BottomSideBothWidgetScale).c_str());
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(BottomSideBothWidgetScale)).c_str());
ImGui::EndTooltip();
}
@@ -5611,7 +5843,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = format("{:.2f} 倍缩放", BottomSideBothWidgetScale);
+ string temp = vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(BottomSideBothWidgetScale)).c_str();
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 10.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -5625,7 +5857,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("重置##1", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Reset") + "##1").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
pptComSetlist.bottomSideBothWidgetScale = BottomSideBothWidgetScale = 1.0f;
if (BottomSideBothWidgetScaleUnifie)
@@ -5657,7 +5889,7 @@ void SettingMain()
}
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("同步调节##1", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Sync") + "##1").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
if (BottomSideBothWidgetScaleUnifie) BottomSideBothWidgetScaleUnifie = false;
else
@@ -5691,7 +5923,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("中部两侧控件缩放");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Page/MiddleSideBoth").c_str());
}
{
ImGui::SetCursorPos({ 220.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -5726,7 +5958,7 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{:.2f} 倍缩放", MiddleSideBothWidgetScale).c_str());
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(MiddleSideBothWidgetScale)).c_str());
ImGui::EndTooltip();
}
@@ -5746,7 +5978,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = format("{:.2f} 倍缩放", MiddleSideBothWidgetScale);
+ string temp = vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(MiddleSideBothWidgetScale)).c_str();
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 10.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -5760,7 +5992,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("重置##2", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Reset") + "##2").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
pptComSetlist.middleSideBothWidgetScale = MiddleSideBothWidgetScale = 1.0f;
if (MiddleSideBothWidgetScaleUnifie)
@@ -5792,7 +6024,7 @@ void SettingMain()
}
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("同步调节##2", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Sync") + "##2").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
if (MiddleSideBothWidgetScaleUnifie) MiddleSideBothWidgetScaleUnifie = false;
else
@@ -5832,7 +6064,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("底部主栏控件缩放");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/State/BottomSideMiddle").c_str());
}
{
ImGui::SetCursorPos({ 220.0f * settingGlobalScale, cursosPosY + 15.0f * settingGlobalScale });
@@ -5867,7 +6099,7 @@ void SettingMain()
ImGui::BeginTooltip();
- ImGui::TextUnformatted(format("{:.2f} 倍缩放", BottomSideMiddleWidgetScale).c_str());
+ ImGui::TextUnformatted(vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(BottomSideMiddleWidgetScale)).c_str());
ImGui::EndTooltip();
}
@@ -5887,7 +6119,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string temp = format("{:.2f} 倍缩放", BottomSideMiddleWidgetScale);
+ string temp = vformat(IA("SettingsUI/PlugIn/PPTHelper/WidgetScale/Ind"), make_format_args(BottomSideMiddleWidgetScale)).c_str();
ImVec2 tempVec = ImGui::CalcTextSize(temp.c_str());
ImGui::SameLine(); ImGui::SetCursorPos({ ImGui::GetCursorPosX() - 15.0f * settingGlobalScale - tempVec.x, cursosPosY + 10.0f * settingGlobalScale + (30.0f * settingGlobalScale - tempVec.y) / 2.0f });
@@ -5901,7 +6133,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("重置##1", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Reset") + "##3").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
pptComSetlist.bottomSideMiddleWidgetScale = BottomSideMiddleWidgetScale = 1.0f;
if (BottomSideMiddleWidgetScaleUnifie)
@@ -5933,7 +6165,7 @@ void SettingMain()
}
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button("同步调节##3", { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button((IA("SettingsUI/PlugIn/PPTHelper/Sync") + "##3").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
if (BottomSideMiddleWidgetScaleUnifie) BottomSideMiddleWidgetScaleUnifie = false;
else
@@ -6003,7 +6235,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("实验选项");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/Tentative/N").c_str());
}
{
@@ -6018,7 +6250,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("允许关闭游离卡死的 WPP 演示进程");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/PPTHelper/Tentative/CloseWpp").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -6057,7 +6289,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("重启软件生效。在WPS退出放映后原来的WPP演示进程并不会立即关闭,而是保持游离卡死状态。此时再次开始放映PPT则无法立即识别到放映进程并开启PPT联动。开启此选项将帮助关闭游离卡死的WPP放映进程,这不会对您的文件造成影响,推荐开启。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/PPTHelper/Tentative/CloseWppE").c_str());
}
{
@@ -6128,13 +6360,13 @@ void SettingMain()
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("超级置顶");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/N").c_str());
}
{
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("20250505a"); // 主界面还有版本号
+ ImGui::TextUnformatted("20250715a"); // 主界面还有版本号
}
}
}
@@ -6167,7 +6399,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextWrapped("超级置顶插件处于 BETA 阶段,可能遇到不稳定的问题。\n软件在启动时会通过再运行自身的方式进行提权,提权成功后再运行新的软件实例。\n该过程可能失败,导致错误地启动拥有管理员权限的软件,可能会影响 PPT 联动。\n过程中会弹出 UAC 确认弹窗,请点击确认或关闭 UAC 提示(不推荐)。\n过程中可能被杀毒软件误报,这是正常现象。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/SuperTop/Warn").c_str());
}
{
@@ -6196,7 +6428,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("基础能力");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/Capability/N").c_str());
}
{
@@ -6211,7 +6443,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("超级置顶");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/Capability/SuperTop").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -6250,8 +6482,8 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- if (hasSuperTop) ImGui::TextWrapped("软件将三段式启动进行置顶,小概率出现问题导致置顶失败。重启后生效。\n(当前已经超级置顶)");
- else ImGui::TextWrapped("软件将三段式启动进行置顶,小概率出现问题导致置顶失败。重启后生效。\n(当前未超级置顶)");
+ if (hasSuperTop) ImGui::TextWrapped(IA("SettingsUI/PlugIn/SuperTop/Capability/SuperTopE1").c_str());
+ else ImGui::TextWrapped(IA("SettingsUI/PlugIn/SuperTop/Capability/SuperTopE2").c_str());
}
{
@@ -6281,13 +6513,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("超级置顶指示器");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/Capability/Indicator").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("软件成功被超级置顶时,在主图标右上角显示一个大头针。");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/SuperTop/Capability/IndicatorE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -6374,7 +6606,7 @@ void SettingMain()
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("快捷方式保障助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/N").c_str());
}
{
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
@@ -6400,7 +6632,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("基础能力");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/Capability/N").c_str());
}
{
@@ -6415,7 +6647,7 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 22.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("修正桌面快捷方式指向和名称");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/Capability/FixLnk").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
@@ -6456,7 +6688,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextWrapped("软件启动时将修正桌面已经存在的软件快捷方式。软件自动更新后可能会改变文件名,推荐开启。");
+ ImGui::TextWrapped(IA("SettingsUI/PlugIn/LnkHelper/Capability/FixLnkE").c_str());
}
{
@@ -6493,7 +6725,7 @@ void SettingMain()
ImGui::SetCursorPos({ 0.0f * settingGlobalScale, 0.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("拓展选项");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/Expansion/N").c_str());
}
{
@@ -6508,13 +6740,13 @@ void SettingMain()
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("创建桌面快捷方式");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/Expansion/CreateLnk").c_str());
}
{
ImGui::SetCursorPos({ 20.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(120, 120, 120, 255));
- ImGui::TextUnformatted("当桌面不存在软件的快捷方式时,则创建一个。");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/LnkHelper/Expansion/CreateLnkE").c_str());
}
{
ImGui::SetCursorPos({ 690.0f * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
@@ -6603,7 +6835,7 @@ void SettingMain()
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("同类软件悬浮窗拦截助手");
+ ImGui::TextUnformatted(IA("SettingsUI/PlugIn/DesktopDrawpadBlocker/N").c_str());
}
{
ImGui::SetCursorPos({ 40.0f * settingGlobalScale, ImGui::GetCursorPosY() });
@@ -6917,16 +7149,22 @@ void SettingMain()
ImGui::TextUnformatted("更短的间隔可以更快拦截出现的窗口,但会占用更多的CPU资源。");
}
{
- ImGui::SetCursorPos({ (730.0f - 280.0f) * settingGlobalScale, cursosPosY + 25.0f * settingGlobalScale });
- ImGui::SetNextItemWidth(280 * settingGlobalScale);
+ ImGui::SetCursorPos({ (730.0f - 200.0f) * settingGlobalScale, cursosPosY + 20.0f * settingGlobalScale });
+ ImGui::SetNextItemWidth(200 * settingGlobalScale);
+
+ ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(255, 255, 255, 179));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_PopupBg, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(249, 249, 249, 128));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImFontMain->Scale = 0.82f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(195 / 255.0f, 195 / 255.0f, 195 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(235 / 255.0f, 235 / 255.0f, 235 / 255.0f, 1.0f));
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(215 / 255.0f, 215 / 255.0f, 215 / 255.0f, 1.0f));
+ PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f * settingGlobalScale, 8.0f * settingGlobalScale));
int SleepTime, SleenTimeRecord;
if (ddbInteractionSetList.sleepTime == 500) SleepTime = 0;
@@ -6943,19 +7181,38 @@ void SettingMain()
vec.emplace_back(_strdup((" " + string("较长(5s)")).c_str()));
vec.emplace_back(_strdup((" " + string("长(10s)")).c_str()));
- if (ImGui::Combo("##拦截间隔", &SleepTime, vec.data(), vec.size()))
{
- if (SleenTimeRecord != SleepTime)
+ int item_count = vec.size();
+ float item_height = ImGui::GetTextLineHeightWithSpacing() + 8.0f * settingGlobalScale; // 8.0f是Dummy的高度
+ float popup_height = item_count * item_height + ImGui::GetStyle().WindowPadding.y * 2 * settingGlobalScale + 16.0f * settingGlobalScale;
+ ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, popup_height));
+ }
+ if (ImGui::BeginCombo("##拦截间隔", vec[SleepTime]))
+ {
+ for (int i = 0; i < vec.size(); i++)
{
- if (SleepTime == 0) ddbInteractionSetList.sleepTime = 500;
- else if (SleepTime == 1) ddbInteractionSetList.sleepTime = 1000;
- else if (SleepTime == 2) ddbInteractionSetList.sleepTime = 3000;
- else if (SleepTime == 4) ddbInteractionSetList.sleepTime = 10000;
- else ddbInteractionSetList.sleepTime = 5000;
- WriteSetting();
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
- DdbWriteInteraction(true, false);
+ bool is_selected = (SleepTime == i);
+ if (ImGui::Selectable(vec[i], is_selected))
+ {
+ SleepTime = i;
+ if (SleenTimeRecord != SleepTime)
+ {
+ if (SleepTime == 0) ddbInteractionSetList.sleepTime = 500;
+ else if (SleepTime == 1) ddbInteractionSetList.sleepTime = 1000;
+ else if (SleepTime == 2) ddbInteractionSetList.sleepTime = 3000;
+ else if (SleepTime == 4) ddbInteractionSetList.sleepTime = 10000;
+ else ddbInteractionSetList.sleepTime = 5000;
+ WriteSetting();
+
+ DdbWriteInteraction(true, false);
+ }
+ }
+ if (is_selected) ImGui::SetItemDefaultFocus();
}
+ ImGui::Dummy(ImVec2(0, 8.0f * settingGlobalScale));
+ ImGui::EndCombo();
}
for (char* ptr : vec) free(ptr), ptr = nullptr;
}
@@ -8384,7 +8641,7 @@ void SettingMain()
{
ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("快捷键");
+ ImGui::TextUnformatted(IA("SettingsUI/HotKey/N").c_str());
}
{
@@ -8399,126 +8656,7 @@ void SettingMain()
ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
{
ImGui::SetCursorPosY(30.0f);
- wstring text;
- {
- text += L"全局快捷键:\n";
- text += L"Ctrl + Win + Alt 切换选择 / 绘制模式\n";
- text += L"\n";
- text += L"绘制模式下:\n";
- text += L"Ctrl + Q 定格\n";
- text += L"Ctrl + E 穿透\n";
- text += L"Z(Ctrl + Z) 撤回 / 超级恢复\n";
- text += L"\n";
- text += L"其余快捷键和自定义快捷键正在测试,敬请期待";
- }
-
- int left_x = 20 * settingGlobalScale, right_x = 750 * settingGlobalScale;
-
- std::vector lines;
- std::wstring line, temp;
- std::wstringstream ss(text);
-
- while (getline(ss, temp, L'\n'))
- {
- bool flag = false;
- line = L"";
-
- for (wchar_t ch : temp)
- {
- flag = false;
-
- float text_width = ImGui::CalcTextSize(utf16ToUtf8(line + ch).c_str()).x;
- if (text_width > (right_x - left_x))
- {
- lines.emplace_back(utf16ToUtf8(line));
- line = L"", flag = true;
- }
-
- line += ch;
- }
-
- if (!flag) lines.emplace_back(utf16ToUtf8(line));
- }
- for (const auto& temp : lines)
- {
- //float text_width = ImGui::CalcTextSize(temp.c_str()).x;
- //float text_indentation = ((right_x - left_x) - text_width) * 0.5f;
- //if (text_indentation < 0) text_indentation = 0;
- //ImGui::SetCursorPosX(left_x + text_indentation);
- ImGui::SetCursorPosX(left_x);
- ImGui::TextUnformatted(temp.c_str());
- }
-
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- }
-
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- }
-
- {
- ImVec2 mouse_delta = ImGui::GetIO().MouseDelta;
- ScrollWhenDraggingOnVoid(ImVec2(0.0f, -mouse_delta.y), ImGuiMouseButton_Left);
- }
- {
- if (PushStyleColorNum >= 0) ImGui::PopStyleColor(PushStyleColorNum), PushStyleColorNum = 0;
- if (PushStyleVarNum >= 0) ImGui::PopStyleVar(PushStyleVarNum), PushStyleVarNum = 0;
- while (PushFontNum) PushFontNum--, ImGui::PopFont();
- }
- ImGui::EndChild();
- break;
- }
-
- // 社区名片
- case settingTabEnum::tab7:
- {
- ImGui::SetCursorPos({ 170.0f * settingGlobalScale,40.0f * settingGlobalScale });
-
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(243, 243, 243, 255));
- ImGui::BeginChild("社区名片", { (750.0f + 30.0f) * settingGlobalScale,608.0f * settingGlobalScale }, false);
-
- ImGui::SetCursorPosY(10.0f * settingGlobalScale);
- {
- ImFontMain->Scale = 0.8f, PushFontNum++, ImGui::PushFont(ImFontMain);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted("社区名片");
- }
-
- {
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f * settingGlobalScale);
-
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
- PushStyleVarNum++, ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(251, 251, 251, 255));
- ImGui::BeginChild("社区名片-输出", { (750.0f + 30.0f) * settingGlobalScale,565.0f * settingGlobalScale }, true);
-
- PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImFontMain->Scale = 0.6f, PushFontNum++, ImGui::PushFont(ImFontMain);
- {
- ImGui::SetCursorPosY(30.0f);
- wstring text;
- {
- text += L"界面还在开发中,敬请期待\n";
- text += L"\n";
- text += L"致谢名单(未显示匿名捐赠,请联系软件开发者并显示)\n";
- text += L"郑子杰 Zijie Zheng ¥151.2\n";
- text += L"bin ¥100\n";
- text += L"路人甲 ¥100\n";
- text += L"启幕¥66\n";
- text += L"B站游大伟 ¥20\n";
- text += L"HettyBig ¥20\n";
- text += L"建俊 ¥19.99\n";
- text += L"LEON - 小清新 ¥19.99\n";
- text += L"2,2,3-三甲基戊烷 ¥10\n";
- text += L"凌汛 ¥9.99\n";
- text += L"Krouis ¥9.99\n";
- text += L"\n";
- text += L"和所有支持智绘教的朋友们~\n";
- }
+ wstring text = IW("SettingsUI/HotKey/E");
int left_x = 20 * settingGlobalScale, right_x = 750 * settingGlobalScale;
@@ -8594,7 +8732,7 @@ void SettingMain()
{
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 30.0f);
- wstring text = L"成功赞助后,可以联系作者修改社区名片赞助列表中的头像和昵称。";
+ wstring text = L"成功赞助后,可以联系作者添加社区名片赞助列表中的昵称。";
int left_x = 10 * settingGlobalScale, right_x = 760 * settingGlobalScale;
@@ -8909,12 +9047,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip0]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/NotStarted").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("尝试修复"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/Repair").c_str()))
{
MessageBox(floating_window, L"The automatic update module has not been activated, which means that you are not using an official release. \nPlease go to the \"version\" page and click \"Fix Software\".\n自动更新模块尚未启动,这意味着您使用的不是官方发布版本。\n请前往“软件版本”页并点击“修复软件”。", L"Inkeys Tips | 智绘教提示", MB_SYSTEMMODAL | MB_OK);
}
@@ -8922,7 +9060,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -8954,7 +9092,15 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip1]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/ObtainInformation").c_str());
+
+ PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
+ ImGui::SameLine();
+ ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
+ {
+ ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
+ }
}
{
@@ -8983,12 +9129,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip2]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/InformationFail").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -9020,12 +9166,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip3]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/InformationDamage").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -9057,12 +9203,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip4]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/InformationUnStandardized").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -9094,7 +9240,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip5]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/Downloading").c_str());
}
{
double downloadedSize = static_cast(downloadNewProgramState.downloadedSize.load());
@@ -9136,12 +9282,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip6]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/DownloadFail").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -9173,12 +9319,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip7]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/DownloadDamage").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("手动下载最新版本软件"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/ManualDownload").c_str()))
{
ShellExecuteW(0, 0, L"https://www.inkeys.top/", 0, 0, SW_SHOW);
}
@@ -9210,7 +9356,7 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted(get(i18n[i18nEnum::SettingsUpdateTip8]).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/Restart").c_str());
}
{
@@ -9239,11 +9385,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string channel = "(其他通道)";
- if (setlist.UpdateChannel == "LTS") channel = "(正式通道)";
- else if (setlist.UpdateChannel == "Insider") channel = "(预览通道)";
+ string channel = " (" + IA("SettingsUI/Update/Channel/Other") + ")";
+ if (setlist.UpdateChannel == "LTS") channel = " (" + IA("SettingsUI/Update/Channel/LTS") + ")";
+ else if (setlist.UpdateChannel == "Insider") channel = " (" + IA("SettingsUI/Update/Channel/Insider") + ")";
+ else if (setlist.UpdateChannel == "Dev") channel = " (" + IA("SettingsUI/Update/Channel/Dev") + ")";
- ImGui::TextUnformatted((get(i18n[i18nEnum::SettingsUpdateTip9]) + channel).c_str());
+ ImGui::TextUnformatted((IA("SettingsUI/Update/Latest") + channel).c_str());
}
{
@@ -9272,11 +9419,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- string channel = "(其他通道)";
- if (setlist.UpdateChannel == "LTS") channel = "(正式通道)";
- else if (setlist.UpdateChannel == "Insider") channel = "(预览通道)";
+ string channel = " (" + IA("SettingsUI/Update/Channel/Other") + ")";
+ if (setlist.UpdateChannel == "LTS") channel = " (" + IA("SettingsUI/Update/Channel/LTS") + ")";
+ else if (setlist.UpdateChannel == "Insider") channel = " (" + IA("SettingsUI/Update/Channel/Insider") + ")";
+ else if (setlist.UpdateChannel == "Dev") channel = " (" + IA("SettingsUI/Update/Channel/Dev") + ")";
- ImGui::TextUnformatted(((get(i18n[i18nEnum::SettingsUpdateTip10])) + channel).c_str());
+ ImGui::TextUnformatted((IA("SettingsUI/Update/Newer") + channel).c_str());
}
{
@@ -9305,12 +9453,12 @@ void SettingMain()
ImFontMain->Scale = 0.5f, PushFontNum++, ImGui::PushFont(ImFontMain);
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255));
- ImGui::TextUnformatted((get(i18n[i18nEnum::SettingsUpdateTip11])).c_str());
+ ImGui::TextUnformatted(IA("SettingsUI/Update/New").c_str());
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_TextLink, IM_COL32(0, 95, 183, 255));
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetCursorPos().x + 10.0f * settingGlobalScale);
- if (ImGui::TextLink("更新到最新版本"))
+ if (ImGui::TextLink(IA("SettingsUI/Update/UpdateNow").c_str()))
{
mandatoryUpdate = true;
AutomaticUpdateState = AutomaticUpdateStateEnum::UpdateObtainInformation;
@@ -9333,7 +9481,7 @@ void SettingMain()
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(249, 249, 249, 77));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 228));
PushStyleColorNum++, ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(0, 0, 0, 15));
- if (ImGui::Button((get(i18n[i18nEnum::SettingsUpdate0])).c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
+ if (ImGui::Button(IA("SettingsUI/Update/Check").c_str(), { 100.0f * settingGlobalScale,30.0f * settingGlobalScale }))
{
if (AutomaticUpdateState == AutomaticUpdateStateEnum::UpdateNotStarted)
{
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtStart.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtStart.cpp"
index 1292d00..c8c92e5 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtStart.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtStart.cpp"
@@ -32,7 +32,7 @@ void GetEdition()
{
editionState.result = false, editionState.editionDate = L"";
- EditionInfoClass editionInfo = GetEditionInfo("LTS");
+ EditionInfoClass editionInfo = GetEditionInfo("LTS", "");
if (editionInfo.errorCode == 200)
{
editionState.editionDate = editionInfo.editionDate;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtText.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtText.cpp"
index aafdcbc..6b4ba06 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtText.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtText.cpp"
@@ -42,4 +42,65 @@ string StringToUrlencode(const string& str)
}
}
return escaped.str();
+}
+
+vector CustomSplit::Run(const wstring& input, wchar_t custom_sep)
+{
+ vector result;
+ wstring token;
+
+ bool in_quote = false;
+ bool in_custom = false;
+
+ for (size_t i = 0; i < input.size(); i++)
+ {
+ wchar_t ch = input[i];
+
+ if (!in_quote && !in_custom && (ch == L' ' || ch == L'\t'))
+ {
+ if (!token.empty())
+ {
+ result.push_back(token);
+ token.clear();
+ }
+ continue;
+ }
+
+ // 处理自定义分隔符
+ if (!in_quote && ch == custom_sep && !in_custom)
+ {
+ in_custom = true;
+ token += ch; // 保留起始分隔符
+ continue;
+ }
+ else if (in_custom && ch == custom_sep)
+ {
+ in_custom = false;
+ token += ch; // 保留结束分隔符
+ continue;
+ }
+
+ // 处理双引号分隔符
+ if (!in_custom && ch == L'\"' && !in_quote)
+ {
+ in_quote = true;
+ token += ch; // 保留起始分隔符
+ continue;
+ }
+ else if (in_quote && ch == L'\"')
+ {
+ in_quote = false;
+ token += ch; // 保留结束分隔符
+ continue;
+ }
+
+ // 普通字符
+ token += ch;
+ }
+
+ if (!token.empty())
+ {
+ result.push_back(token);
+ }
+ return result;
}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtText.h" "b/\346\231\272\347\273\230\346\225\231/IdtText.h"
index 2d7fb1b..775dd5d 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtText.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtText.h"
@@ -13,4 +13,13 @@ string utf16ToUtf8(const wstring& input);
wstring bstrToWstring(const _bstr_t& bstr);
_bstr_t wstringToBstr(const wstring& str);
-string StringToUrlencode(const string& str);
\ No newline at end of file
+string StringToUrlencode(const string& str);
+
+class CustomSplit
+{
+public:
+ static vector Run(const wstring& input, wchar_t custom_sep);
+
+private:
+ CustomSplit() = delete;
+};
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtUpdate.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtUpdate.cpp"
index 3d7bd31..163793a 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtUpdate.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtUpdate.cpp"
@@ -30,7 +30,7 @@ wstring convertToHttp(const wstring& url)
else return httpPrefix + url;
}
-EditionInfoClass GetEditionInfo(string channel)
+EditionInfoClass GetEditionInfo(string channel, string arch)
{
/*
* 错误码:
@@ -67,8 +67,8 @@ EditionInfoClass GetEditionInfo(string channel)
if (editionInfoValue[channel].isMember("hash") && editionInfoValue[channel]["hash"].isObject())
{
string hash1, hash2;
- if (setlist.updateArchitecture == "win64") hash1 = "md5 64", hash2 = "sha256 64";
- else if (setlist.updateArchitecture == "arm64") hash1 = "md5 Arm64", hash2 = "sha256 Arm64";
+ if (arch == "win64") hash1 = "md5 64", hash2 = "sha256 64";
+ else if (arch == "arm64") hash1 = "md5 Arm64", hash2 = "sha256 Arm64";
else hash1 = "md5", hash2 = "sha256";
if (editionInfoValue[channel]["hash"].isMember(hash1) && editionInfoValue[channel]["hash"][hash1].isString()) retEditionInfo.hash_md5 = editionInfoValue[channel]["hash"][hash1].asString();
@@ -80,8 +80,8 @@ EditionInfoClass GetEditionInfo(string channel)
{
string path;
- if (setlist.updateArchitecture == "win64") path = "path64";
- else if (setlist.updateArchitecture == "arm64") path = "pathArm64";
+ if (arch == "win64") path = "path64";
+ else if (arch == "arm64") path = "pathArm64";
else path = "path";
if (editionInfoValue[channel].isMember(path) && editionInfoValue[channel][path].isArray())
@@ -102,8 +102,8 @@ EditionInfoClass GetEditionInfo(string channel)
if (editionInfoValue[channel].isMember("size") && editionInfoValue[channel]["size"].isObject())
{
string path;
- if (setlist.updateArchitecture == "win64") path = "file64";
- else if (setlist.updateArchitecture == "arm64") path = "fileArm64";
+ if (arch == "win64") path = "file64";
+ else if (arch == "arm64") path = "fileArm64";
else path = "file";
if (editionInfoValue[channel]["size"].isMember(path) && editionInfoValue[channel]["size"][path].isUInt64())
@@ -181,7 +181,7 @@ void splitUrl(string input_url, string& prefix, string& domain, string& path)
path.clear();
}
}
-AutomaticUpdateStateEnum DownloadNewProgram(DownloadNewProgramStateClass* state, EditionInfoClass editionInfo, string url)
+AutomaticUpdateStateEnum DownloadNewProgram(DownloadNewProgramStateClass* state, EditionInfoClass editionInfo, string url, string arch)
{
using enum AutomaticUpdateStateEnum;
@@ -260,6 +260,8 @@ AutomaticUpdateStateEnum DownloadNewProgram(DownloadNewProgramStateClass* state,
root["hash"]["md5"] = Json::Value(editionInfo.hash_md5);
root["hash"]["sha256"] = Json::Value(editionInfo.hash_sha256);
+ root["arch"] = Json::Value(arch);
+
root["old_name"] = Json::Value(utf16ToUtf8(GetCurrentExeName()));
if (mandatoryUpdate) root["MandatoryUpdate"] = Json::Value(mandatoryUpdate);
@@ -293,6 +295,8 @@ void AutomaticUpdate()
bool against = false;
int updateTimes = 0;
+ string updateArch = setlist.updateArchitecture;
+
EditionInfoClass editionInfo;
using enum AutomaticUpdateStateEnum;
@@ -304,10 +308,12 @@ void AutomaticUpdate()
state = true;
against = false;
+ updateArch = setlist.updateArchitecture;
+
//获取最新版本信息
if (state)
{
- editionInfo = GetEditionInfo(setlist.UpdateChannel);
+ editionInfo = GetEditionInfo(setlist.UpdateChannel, updateArch);
if (editionInfo.errorCode != 200)
{
@@ -331,6 +337,7 @@ void AutomaticUpdate()
{
wstring tedition, tpath;
string thash_md5, thash_sha256;
+ string tarch;
Json::Reader reader;
Json::Value root;
@@ -355,6 +362,10 @@ void AutomaticUpdate()
else fileDamage = true;
}
else fileDamage = true;
+
+ // 架构确定
+ if (root.isMember("arch")) tarch = root["arch"].asString();
+ else fileDamage = true;
}
readjson.close();
@@ -372,7 +383,7 @@ void AutomaticUpdate()
delete myWrapper;
}
- if (tedition == editionInfo.editionDate && _waccess((globalPath + tpath).c_str(), 0) == 0 && hash_md5 == thash_md5 && hash_sha256 == thash_sha256)
+ if (tedition == editionInfo.editionDate && _waccess((globalPath + tpath).c_str(), 0) == 0 && hash_md5 == thash_md5 && hash_sha256 == thash_sha256 && updateArch == tarch)
{
update = false;
AutomaticUpdateState = UpdateRestart;
@@ -387,7 +398,7 @@ void AutomaticUpdate()
bool hasUpdateNew = false;
for (int i = 0; i < editionInfo.path_size; i++)
{
- AutomaticUpdateState = DownloadNewProgram(&downloadNewProgramState, editionInfo, editionInfo.path[i]);
+ AutomaticUpdateState = DownloadNewProgram(&downloadNewProgramState, editionInfo, editionInfo.path[i], updateArch);
if (AutomaticUpdateState == UpdateRestart)
{
against = false;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtUpdate.h" "b/\346\231\272\347\273\230\346\225\231/IdtUpdate.h"
index 4fbfe49..416e9f2 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtUpdate.h"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtUpdate.h"
@@ -59,7 +59,7 @@ class EditionInfoClass
string hash_md5;
string hash_sha256;
};
-EditionInfoClass GetEditionInfo(string channel);
+EditionInfoClass GetEditionInfo(string channel, string arch);
enum class AutomaticUpdateStateEnum : int
{
@@ -107,7 +107,7 @@ class DownloadNewProgramStateClass
extern DownloadNewProgramStateClass downloadNewProgramState;
void splitUrl(string input_url, string& prefix, string& domain, string& path);
-AutomaticUpdateStateEnum DownloadNewProgram(DownloadNewProgramStateClass* state, EditionInfoClass editionInfo, string url);
+AutomaticUpdateStateEnum DownloadNewProgram(DownloadNewProgramStateClass* state, EditionInfoClass editionInfo, string url, string arch);
//程序自动更新
extern bool mandatoryUpdate;
diff --git "a/\346\231\272\347\273\230\346\225\231/IdtWindow.cpp" "b/\346\231\272\347\273\230\346\225\231/IdtWindow.cpp"
index 424dae5..5f14615 100644
--- "a/\346\231\272\347\273\230\346\225\231/IdtWindow.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/IdtWindow.cpp"
@@ -77,7 +77,7 @@ void TopWindow()
{
IDTLogger->warn("[窗口置顶线程][TopWindow] 等待窗口初次绘制超时");
- if (launchState == LaunchStateEnum::WarnTry) MessageBox(NULL, L"Program unexpected exit: The program window creation failed or was intercepted. Please restart the software and try again.(#5)\n程序意外退出:程序窗口创建失败或被拦截,请重启软件重试。(#5)", L"Inkeys Tips | 智绘教提示", MB_SYSTEMMODAL | MB_OK);
+ if (LaunchState::warnTry) MessageBox(NULL, L"Program unexpected exit: The program window creation failed or was intercepted. Please restart the software and try again.(#5)\n程序意外退出:程序窗口创建失败或被拦截,请重启软件重试。(#5)", L"Inkeys Tips | 智绘教提示", MB_SYSTEMMODAL | MB_OK);
else ShellExecuteW(NULL, NULL, GetCurrentExePath().c_str(), L"-WarnTry", NULL, SW_SHOWNORMAL);
exit(0);
@@ -277,7 +277,7 @@ void TopWindow()
//SetWindowPos(magnifierWindow, freeze_window, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
// 统一置顶
- if (0 && !SetWindowPos(magnifierWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE))
+ if (!SetWindowPos(magnifierWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE))
IDTLogger->warn("[窗口置顶线程][TopWindow] 置顶窗口时失败 Error" + to_string(GetLastError()));
}
diff --git "a/\346\231\272\347\273\230\346\225\231/Inkeys/Json/IdtJson.h" "b/\346\231\272\347\273\230\346\225\231/Inkeys/Json/IdtJson.h"
new file mode 100644
index 0000000..f2ece1b
--- /dev/null
+++ "b/\346\231\272\347\273\230\346\225\231/Inkeys/Json/IdtJson.h"
@@ -0,0 +1,54 @@
+#pragma once
+
+#include
+#include
+#include
+
+class IdtJson
+{
+public:
+ static std::string removeJsoncComments(const std::string& input)
+ {
+ std::istringstream iss(input);
+ std::ostringstream oss;
+ std::string line;
+ while (std::getline(iss, line))
+ {
+ size_t comment_pos = std::string::npos;
+ bool in_string = false;
+ for (size_t i = 0; i < line.length(); ++i)
+ {
+ if (line[i] == '"')
+ {
+ // 计算连续反斜杠数
+ int backslash_count = 0;
+ int j = static_cast(i) - 1;
+ while (j >= 0 && line[j] == '\\')
+ {
+ backslash_count++;
+ j--;
+ }
+ // 如果反斜杠个数为偶数,则不是被转义的引号
+ if (backslash_count % 2 == 0)
+ {
+ in_string = !in_string;
+ }
+ }
+ // 字符串外侧的 '//' 为注释
+ if (!in_string && i + 1 < line.length() && line[i] == '/' && line[i + 1] == '/')
+ {
+ comment_pos = i;
+ break;
+ }
+ }
+ if (comment_pos != std::string::npos)
+ {
+ line.erase(comment_pos);
+ }
+ oss << line << '\n';
+ }
+ return oss.str();
+ }
+private:
+ IdtJson() = delete;
+};
diff --git "a/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.cpp" "b/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.cpp"
index 1d3347a..d67ab3d 100644
--- "a/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.cpp"
@@ -1,4 +1,3 @@
#include "IdtLaunchState.h"
-LaunchStateEnum launchState;
HANDLE launchMutex;
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.h" "b/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.h"
index 8271ab8..06020fe 100644
--- "a/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.h"
+++ "b/\346\231\272\347\273\230\346\225\231/Launch/IdtLaunchState.h"
@@ -2,12 +2,19 @@
#include "../IdtMain.h"
-enum class LaunchStateEnum : int
+class LaunchState
{
- Normal,
- Restart,
- WarnTry,
- CrashTry
+public:
+ inline static bool restart = false;
+ inline static bool warnTry = false;
+ inline static bool crashTry = false;
+
+ inline static bool superTop = false;
+ inline static wstring superTopVal = L"";
+
+ inline static wstring commandLine = L"";
+private:
+ LaunchState() = delete;
};
-extern LaunchStateEnum launchState;
+
extern HANDLE launchMutex;
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/PptCOM.dll" "b/\346\231\272\347\273\230\346\225\231/PptCOM.dll"
index c8f4e42..1f1f6f2 100644
Binary files "a/\346\231\272\347\273\230\346\225\231/PptCOM.dll" and "b/\346\231\272\347\273\230\346\225\231/PptCOM.dll" differ
diff --git "a/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.cpp" "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.cpp"
index d94df3b..b9635fb 100644
--- "a/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.cpp"
+++ "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.cpp"
@@ -3,6 +3,7 @@
#include "../IdtConfiguration.h"
#include "../IdtOther.h"
#include "../Launch/IdtLaunchState.h"
+#include "IdtToken.h"
#include
#include
@@ -25,23 +26,6 @@ void throw_win32_error()
//exit(0);
}
-class Handle {
-public:
- HANDLE handle = INVALID_HANDLE_VALUE; // 默认句柄为无效句柄
-
- // 默认构造函数
- Handle() {}
-
- // 传入句柄的构造函数
- Handle(HANDLE handle) :handle(handle) {}
-
- // 析构函数,确保句柄被关闭
- ~Handle() {
- if (handle != INVALID_HANDLE_VALUE)
- CloseHandle(handle);
- }
-};
-
// 判断当前进程是否具有提升权限(管理员权限)
bool isElevated(HANDLE tok) {
DWORD ret_len;
@@ -59,191 +43,179 @@ bool hasUiAccess(HANDLE tok) {
void SurperTopMain(wstring lpCmdLine)
{
- /*AllocConsole();
- FILE* fp;
- freopen_s(&fp, "CONOUT$", "w", stdout);
- freopen_s(&fp, "CONOUT$", "w", stderr);
- std::ios::sync_with_stdio();*/
+ //AllocConsole();
+ //FILE* fp;
+ //freopen_s(&fp, "CONOUT$", "w", stdout);
+ //freopen_s(&fp, "CONOUT$", "w", stderr);
+ //std::ios::sync_with_stdio();
// 基础信息
wstring inkeysCmdLine;
+ int useUiAccess = 1; // 0/1 是否设置
+ int usePermission = 0; // 0 使用自身;1 使用 PID;2 降权使用普通用户
DWORD inkeysPid = 0;
- //bool useAdmin = false;
- bool useUiAccess = true;
- {
- wstring cmdLine(lpCmdLine);
+ cout << utf16ToUtf8(lpCmdLine) << endl;
- wregex re(L"^-PATH=\\$(.*?)\\$\\s+-PID=(\\d+)\\s+-UIACCESS=(\\d+)\\s+-ADMIN=(\\d+)");
- wsmatch match;
- if (regex_search(cmdLine, match, re))
+ {
+ vector args = CustomSplit::Run(lpCmdLine, L'?');
+ for (size_t i = 0; i < args.size(); i++)
{
- inkeysCmdLine = match[1].str();
- inkeysPid = stoi(match[2]);
- useUiAccess = stoi(match[3]);
- //useAdmin = stoi(match[4]);
+ wstring commandLine = args[i];
+
+ cout << i << " : \"" << utf16ToUtf8(commandLine) << "\"" << endl;
+
+ if (commandLine.substr(0, 8) == L"-CmdLine")
+ {
+ wregex pattern(LR"(^[^?]*\?([^?]+)\?[^?]*$)");
+ wsmatch match;
+ if (regex_match(commandLine, match, pattern))
+ {
+ inkeysCmdLine = match[1].str();
+ cout << "1 inkeysCmdLine=" << utf16ToUtf8(inkeysCmdLine) << endl;
+ }
+ }
+ else if (commandLine.substr(0, 9) == L"-UiAccess")
+ {
+ wregex pattern(LR"(^.*=(-?[0-9]+)$)");
+ wsmatch match;
+
+ if (regex_match(commandLine, match, pattern))
+ {
+ try
+ {
+ useUiAccess = stoi(match[1].str());
+ cout << "2 useUiAccess=" << useUiAccess << endl;
+ }
+ catch (const out_of_range&) {}
+ catch (const invalid_argument&) {}
+ }
+ }
+ else if (commandLine.substr(0, 11) == L"-Permission")
+ {
+ wregex pattern(LR"(^.*=(-?[0-9]+)$)");
+ wsmatch match;
+
+ if (regex_match(commandLine, match, pattern))
+ {
+ try
+ {
+ usePermission = stoi(match[1].str());
+ cout << "3 usePermission=" << usePermission << endl;
+ }
+ catch (const out_of_range&) {}
+ catch (const invalid_argument&) {}
+ }
+ }
+ else if (commandLine.substr(0, 4) == L"-Pid")
+ {
+ wregex pattern(LR"(^.*=(-?[0-9]+)$)");
+ wsmatch match;
+
+ if (regex_match(commandLine, match, pattern))
+ {
+ try
+ {
+ inkeysPid = stoi(match[1].str());
+ cout << "4 inkeysPid=" << inkeysPid << endl;
+ }
+ catch (const out_of_range&) {}
+ catch (const invalid_argument&) {}
+ }
+ }
}
-
- //if (inkeysPid == 0) useAdmin = false;
}
- //cerr << "step1" << endl;
+ // 准备工作
- // 获取 智绘教 的令牌
- Handle inkeysToken;
- if (inkeysPid)
- {
- Handle proc_ref = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, inkeysPid);
- Handle tok_parent;
- try_win32(OpenProcessToken(proc_ref.handle, TOKEN_DUPLICATE, &tok_parent.handle));
- try_win32(DuplicateTokenEx(tok_parent.handle, TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ASSIGN_PRIMARY, NULL, SecurityAnonymous, TokenPrimary, &inkeysToken.handle));
+ IdtHandle inkeysToken;
- //if (isElevated(inkeysToken.handle)) Testi(999);
- //if (inkeysToken.handle == INVALID_HANDLE_VALUE) Testi(999);
+ // 获取当前进程的令牌
+ if (usePermission == 0)
+ {
+ if (!UiAccess::GetToken::GetSelfToken(inkeysToken))
+ {
+ usePermission++;
+ }
}
- // 目标获取的令牌
- Handle winlogonToken;
-
- // ---
-
- HANDLE fileHandle = NULL;
- OccupyFileForWrite(&fileHandle, globalPath + L"superTop_wait.signal");
- UnOccupyFile(&fileHandle);
-
- //cerr << "step2" << endl;
- // 获取当前进程的信息
- HANDLE proc_self = GetCurrentProcess();
- Handle tok_self;
- try_win32(OpenProcessToken(proc_self, TOKEN_ALL_ACCESS, &tok_self.handle));
- DWORD ses_self, ret_len;
- try_win32(GetTokenInformation(tok_self.handle, TokenSessionId, &ses_self, sizeof(ses_self), &ret_len)); // 获取当前会话 ID
-
- //cerr << "step3" << endl;
- // 创建进程快照
- // 目前不涉及降权,暂时不用
- //bool ctfmonAble = false, explorerAble = false;
- //Handle ctfmonToken, explorerToken;
-
- Handle snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- PROCESSENTRY32 pe = { .dwSize = sizeof(PROCESSENTRY32) };
- // 遍历进程快照,查找目标进程
- for (BOOL cont = Process32First(snapshot.handle, &pe); cont; cont = Process32Next(snapshot.handle, &pe))
+ // 获取之前的智绘教令牌,通过Pid
+ if (usePermission == 1)
{
- //if (0 == _tcsicmp(pe.szExeFile, TEXT("explorer.exe")))
- //{
- // Handle proc_ref = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pe.th32ProcessID);
- // Handle tok_parent;
- // try_win32(OpenProcessToken(proc_ref.handle, TOKEN_DUPLICATE, &tok_parent.handle));
- // try_win32(DuplicateTokenEx(tok_parent.handle, TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ASSIGN_PRIMARY, NULL, SecurityAnonymous, TokenPrimary, &explorerToken.handle));
-
- // if (explorerToken.handle != INVALID_HANDLE_VALUE && !isElevated(explorerToken.handle)) explorerAble = true;
- //}
- //if (0 == _tcsicmp(pe.szExeFile, TEXT("ctfmon.exe")))
- //{
- // Handle proc_ref = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pe.th32ProcessID);
- // Handle tok_parent;
- // try_win32(OpenProcessToken(proc_ref.handle, TOKEN_DUPLICATE, &tok_parent.handle));
- // try_win32(DuplicateTokenEx(tok_parent.handle, TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ASSIGN_PRIMARY, NULL, SecurityAnonymous, TokenPrimary, &ctfmonToken.handle));
-
- // if (ctfmonToken.handle != INVALID_HANDLE_VALUE && !isElevated(ctfmonToken.handle)) ctfmonAble = true;
- //}
-
- if (0 == _tcsicmp(pe.szExeFile, TEXT("winlogon.exe")))
+ if (inkeysPid)
{
- // 打开目标进程,并获取其令牌
- Handle proc = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pe.th32ProcessID);
- Handle tok;
- try_win32(OpenProcessToken(proc.handle, TOKEN_QUERY | TOKEN_DUPLICATE, &tok.handle));
- DWORD ses;
- if (!GetTokenInformation(tok.handle, TokenSessionId, &ses, sizeof(ses), &ret_len) || ses != ses_self) continue;
-
- // 执行令牌复制
- try_win32(DuplicateTokenEx(tok.handle, TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES, NULL, SecurityImpersonation, TokenImpersonation, &winlogonToken.handle));
+ HANDLE proc_ref = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, inkeysPid);
+ HANDLE tok_parent, tInkeysToken;
+ try_win32(OpenProcessToken(proc_ref, TOKEN_DUPLICATE, &tok_parent));
+ try_win32(DuplicateTokenEx(tok_parent, TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID, NULL, SecurityAnonymous, TokenPrimary, &tInkeysToken));
+
+ IdtHandle uDup(tInkeysToken);
+ inkeysToken = std::move(uDup);
}
+ else usePermission++;
}
- //cerr << "step4" << endl;
+ // 获取降权令牌
+ if (usePermission == 2)
{
- //if (!useAdmin && isElevated(inkeysToken.handle))
- //{
- // if (explorerAble) inkeysToken = explorerToken;
- // else if (ctfmonAble) inkeysToken = ctfmonToken;
- //}
- //if (inkeysToken.handle == INVALID_HANDLE_VALUE)
- //{
- // if (explorerAble) inkeysToken = explorerToken;
- // else if (ctfmonAble) inkeysToken = ctfmonToken;
- //}
+ if (!UiAccess::GetToken::GetUserToken(inkeysToken))
+ {
+ usePermission++;
+ }
}
- //cerr << "step5" << endl;
+
+ // 标识准备工作完成
+ // 例如可能需要获取之前智绘教进程的令牌,现在原来的智绘教则可以关闭
{
- // 设置令牌权限
- TOKEN_PRIVILEGES tkp = {};
- tkp.PrivilegeCount = 1;
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- try_win32(LookupPrivilegeValueW(NULL, SE_ASSIGNPRIMARYTOKEN_NAME, &tkp.Privileges[0].Luid)); // 查找权限
- try_win32(AdjustTokenPrivileges(winlogonToken.handle, FALSE, &tkp, sizeof(tkp), NULL, NULL)); // 调整权限
+ HANDLE fileHandle = NULL;
+ OccupyFileForWrite(&fileHandle, globalPath + L"superTop_wait.signal");
+ UnOccupyFile(&fileHandle);
}
- //cerr << "step6" << endl;
- // 设置线程令牌(好戏开始了)
- try_win32(SetThreadToken(NULL, winlogonToken.handle));
+ // UiAccess 操作
- if (useUiAccess && !hasUiAccess(inkeysToken.handle))
+ if (useUiAccess)
{
- BOOL ui_access = TRUE;
- try_win32(SetTokenInformation(inkeysToken.handle, TokenUIAccess, &ui_access, sizeof(ui_access))); // 设置 UIAccess 访问权限
+ IdtHandle winlogonToken;
+ if (!UiAccess::GetToken::GetWinlogonToken(winlogonToken))
+ {
+ cout << "GetWinlogonToken Fail" << endl;
+ }
+ if (!UiAccess::RunToken::SetUiAccessToken(winlogonToken, inkeysToken))
+ {
+ cout << "SetUiAccessToken Fail" << endl;
+ }
}
- //cerr << "step7" << endl;
+ // 启动新进程
+
// 等待原先 智绘教 退出
- for (int i = 1; i <= 30; i++)
+ for (int i = 1; i <= 60; i++)
{
this_thread::sleep_for(chrono::milliseconds(50));
if (!filesystem::exists(globalPath + L"superTop_wait.signal")) break;
}
- // 启动智绘教
+ wstring param = L"\"" + GetCurrentExePath() + L"\" -SuperTopComplete " + inkeysCmdLine;
+ if (!UiAccess::RunToken::RunTokenProgram(inkeysToken, param))
{
- wstring param = L"\"" + GetCurrentExePath() + L"\" -SuperTopC " + inkeysCmdLine;
- vector buffer(param.begin(), param.end());
- buffer.push_back(L'\0');
-
- //wcerr << L"open " + param << endl;
- //Testw(L"open " + param);
- //Testb(isElevated(inkeysToken.handle));
-
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- GetStartupInfoW(&si);
- CreateProcessAsUserW(inkeysToken.handle, NULL, buffer.data(), NULL, NULL, false, DETACHED_PROCESS, NULL, NULL, &si, &pi);
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
+ cout << "RunTokenProgram Fail" << endl;
}
-
- // 恢复到原始用户上下文
- try_win32(RevertToSelf());
}
// ---
IdtAtomic hasSuperTop;
-void LaunchSurperTop()
+void LaunchSurperTop(wstring cmdLine)
{
- wstring cmdLine;
- {
- if (launchState == LaunchStateEnum::Restart) cmdLine = L"-Restart";
- else if (launchState == LaunchStateEnum::WarnTry) cmdLine = L"-WarnTry";
- else if (launchState == LaunchStateEnum::CrashTry) cmdLine = L"-CrashTry";
- }
wstring pid = to_wstring(GetCurrentProcessId());
- wstring useUiAccess = L"1";
- wstring useAdmin = L"0";
-
- wstring launchLine = L"-SuperTop ";
- launchLine += L"-PATH=$" + cmdLine + L"$ ";
- launchLine += L"-PID=" + pid + L" ";
- launchLine += L"-UIACCESS=" + useUiAccess + L" ";
- launchLine += L"-ADMIN=" + useAdmin;
+ wstring useUiAccess = L"1"; // 0/1 是否设置
+ wstring usePermission = L"1"; // 0 使用自身;1 使用 PID;2 降权使用普通用户
+
+ wstring launchLine = L"-SuperTop=*";
+ launchLine += L"-CmdLine=?" + cmdLine + L"? ";
+ launchLine += L"-UiAccess=" + useUiAccess + L" ";
+ launchLine += L"-Permission=" + usePermission + L" ";
+ launchLine += L"-Pid=" + pid;
+ launchLine += L"*";
error_code ec;
if (filesystem::exists(globalPath + L"superTop_wait.signal"))
diff --git "a/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.h" "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.h"
index e7807af..952ec70 100644
--- "a/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.h"
+++ "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtSuperTop.h"
@@ -6,4 +6,4 @@ bool hasUiAccess(HANDLE tok);
void SurperTopMain(wstring lpCmdLine);
extern IdtAtomic hasSuperTop;
-void LaunchSurperTop();
\ No newline at end of file
+void LaunchSurperTop(wstring cmdLine);
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/SuperTop/IdtToken.h" "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtToken.h"
new file mode 100644
index 0000000..16ce9b9
--- /dev/null
+++ "b/\346\231\272\347\273\230\346\225\231/SuperTop/IdtToken.h"
@@ -0,0 +1,232 @@
+#pragma once
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#pragma comment(lib, "userenv.lib")
+
+using namespace std;
+
+// 句柄deleter
+struct HandleDeleter
+{
+ void operator()(HANDLE h) const
+ {
+ if (h && h != INVALID_HANDLE_VALUE)
+ CloseHandle(h);
+ }
+};
+using IdtHandle = std::unique_ptr::type, HandleDeleter>;
+
+namespace UiAccess
+{
+ class DetermineToken
+ {
+ public:
+ // 判断提升
+ static bool isElevated(const IdtHandle& token)
+ {
+ DWORD ret_len;
+ TOKEN_ELEVATION_TYPE elevation;
+ GetTokenInformation(token.get(), TokenElevationType, &elevation, sizeof(elevation), &ret_len);
+ return elevation == TokenElevationTypeFull;
+ }
+ // 判断UI访问
+ static bool hasUiAccess(const IdtHandle& token)
+ {
+ DWORD ret_len;
+ BOOL ui_access = FALSE;
+ GetTokenInformation(token.get(), TokenUIAccess, &ui_access, sizeof(ui_access), &ret_len);
+ return !!ui_access;
+ }
+ private:
+ DetermineToken() = delete;
+ };
+ class GetToken
+ {
+ public:
+ static bool GetSelfToken(IdtHandle& ret)
+ {
+ HANDLE hOpenToken = nullptr, hRetToken = nullptr;
+ if (!OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &hOpenToken)) return false;
+ IdtHandle openToken(hOpenToken);
+ if (!DuplicateTokenEx(openToken.get(), TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID, NULL, SecurityAnonymous, TokenPrimary, &hRetToken))
+ return false;
+ ret.reset(hRetToken);
+ return true;
+ }
+ static bool GetUserToken(IdtHandle& ret)
+ {
+ const wchar_t* candidateNames[] = { L"explorer.exe", L"ctfmon.exe" };
+ HANDLE hDupToken = nullptr;
+ for (auto name : candidateNames)
+ {
+ HANDLE hSnapRaw = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ if (hSnapRaw == INVALID_HANDLE_VALUE) continue;
+ IdtHandle hSnapshot(hSnapRaw);
+
+ PROCESSENTRY32W pe = {};
+ pe.dwSize = sizeof(pe);
+ wcout << L"尝试 " << name << " 的句柄" << endl;
+ for (BOOL next = Process32FirstW(hSnapshot.get(), &pe); next; next = Process32NextW(hSnapshot.get(), &pe))
+ {
+ if (_wcsicmp(pe.szExeFile, name) == 0)
+ {
+ wcout << L"找到 " << name << " 的句柄" << endl;
+ HANDLE hProcRaw = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pe.th32ProcessID);
+ if (!hProcRaw) continue;
+ IdtHandle hProc(hProcRaw);
+
+ HANDLE hTokenRaw = nullptr;
+ if (!OpenProcessToken(hProc.get(), TOKEN_DUPLICATE, &hTokenRaw)) continue;
+ IdtHandle hToken(hTokenRaw);
+
+ if (DuplicateTokenEx(
+ hToken.get(),
+ TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_QUERY | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID,
+ NULL, SecurityAnonymous, TokenPrimary, &hDupToken))
+ {
+ wcout << L"已获取到句柄:" << name << endl;
+ IdtHandle uDup(hDupToken);
+ if (!DetermineToken::isElevated(hToken))
+ {
+ wcout << L"确认为非特权:" << name << endl;
+ ret = std::move(uDup);
+ return true;
+ }
+ else
+ {
+ wcout << L"失败,具有特权:" << name << endl;
+ }
+ }
+ }
+ }
+ }
+ wcerr << L"获取用户token失败,无法降权启动Inkeys.exe。\n";
+ return false;
+ }
+ static bool GetWinlogonToken(IdtHandle& ret)
+ {
+ HANDLE hOpenToken = nullptr, hTargetToken = nullptr;
+ if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &hOpenToken)) return false;
+ IdtHandle openToken(hOpenToken);
+
+ DWORD ses_self = 0, ret_len = 0;
+ if (!GetTokenInformation(openToken.get(), TokenSessionId, &ses_self, sizeof(ses_self), &ret_len)) return false;
+
+ bool success = false;
+ const wchar_t* candidateNames[] = { L"winlogon.exe" };
+ for (auto name : candidateNames)
+ {
+ HANDLE hSnapRaw = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ if (hSnapRaw == INVALID_HANDLE_VALUE) return false;
+ IdtHandle snapshot(hSnapRaw);
+
+ PROCESSENTRY32 pe = { .dwSize = sizeof(PROCESSENTRY32) };
+ for (BOOL cont = Process32First(snapshot.get(), &pe); cont; cont = Process32Next(snapshot.get(), &pe))
+ {
+ if (_wcsicmp(pe.szExeFile, name) == 0)
+ {
+ wcout << L"找到 " << name << " 的句柄" << endl;
+
+ HANDLE hProcRaw = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pe.th32ProcessID);
+ if (!hProcRaw) continue;
+ IdtHandle hProc(hProcRaw);
+
+ HANDLE hTokenRaw = nullptr;
+ if (!OpenProcessToken(hProc.get(), TOKEN_QUERY | TOKEN_DUPLICATE, &hTokenRaw)) continue;
+ IdtHandle hToken(hTokenRaw);
+
+ DWORD ses = 0;
+ if (!GetTokenInformation(hToken.get(), TokenSessionId, &ses, sizeof(ses), &ret_len) || ses != ses_self) continue;
+
+ if (DuplicateTokenEx(hToken.get(), TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES, NULL, SecurityImpersonation, TokenImpersonation, &hTargetToken))
+ {
+ // 获取成功
+ ret.reset(hTargetToken);
+ success = true;
+
+ wcout << L"已获取到句柄:" << name << endl;
+ break;
+ }
+ }
+ }
+ if (success) break;
+ }
+ if (!ret) return false;
+
+ // 设置令牌权限
+ TOKEN_PRIVILEGES tkp = {};
+ tkp.PrivilegeCount = 1;
+ tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ if (!LookupPrivilegeValueW(NULL, SE_ASSIGNPRIMARYTOKEN_NAME, &tkp.Privileges[0].Luid)) return false;
+ if (!AdjustTokenPrivileges(ret.get(), FALSE, &tkp, sizeof(tkp), NULL, NULL)) return false;
+
+ return true;
+ }
+
+ private:
+ GetToken() = delete;
+ };
+
+ class RunToken
+ {
+ public:
+ static bool RunTokenProgram(const IdtHandle& token, wstring param)
+ {
+ if (!token) return false;
+
+ vector buffer(param.begin(), param.end());
+ buffer.push_back(L'\0');
+
+ wcerr << param << endl;
+
+ STARTUPINFO si = { sizeof(si) };
+ PROCESS_INFORMATION pi = { 0 };
+ GetStartupInfoW(&si);
+ BOOL ok = CreateProcessWithTokenW(
+ token.get(),
+ LOGON_WITH_PROFILE,
+ NULL,
+ buffer.data(),
+ CREATE_NEW_CONSOLE,
+ NULL,
+ NULL,
+ &si,
+ &pi
+ );
+
+ if (ok)
+ {
+ wcout << L"已降权启动同目录下的 Inkeys.exe!\n";// system("pause");
+ CloseHandle(pi.hProcess); // 这些也是WIN句柄
+ CloseHandle(pi.hThread);
+ return true;
+ }
+ else
+ {
+ int i = GetLastError();
+ wcerr << L"CreateProcessWithTokenW Error " << i << endl;
+ //system("pause");
+ return false;
+ }
+ }
+ static bool SetUiAccessToken(const IdtHandle& winlogonToken, const IdtHandle& targetToken)
+ {
+ if (!SetThreadToken(NULL, winlogonToken.get())) return false;
+ BOOL ui_access = TRUE;
+ if (!SetTokenInformation(targetToken.get(), TokenUIAccess, &ui_access, sizeof(ui_access))) return false;
+ RevertToSelf();
+ return true;
+ }
+ private:
+ RunToken() = delete;
+ };
+}
diff --git "a/\346\231\272\347\273\230\346\225\231/resource.h" "b/\346\231\272\347\273\230\346\225\231/resource.h"
index 706363b..31478f8 100644
--- "a/\346\231\272\347\273\230\346\225\231/resource.h"
+++ "b/\346\231\272\347\273\230\346\225\231/resource.h"
@@ -53,12 +53,15 @@
#define IDB_PNG41 272
#define IDB_PNG36 273
#define IDB_PNG38 274
+#define IDR_JSON1 275
+#define IDR_ZH_TW 275
+#define IDB_PNG42 277
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 275
+#define _APS_NEXT_RESOURCE_VALUE 278
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
diff --git "a/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.json" "b/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.json"
deleted file mode 100644
index 86f5e1f..0000000
--- "a/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.json"
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "Language" : "en-US",
- "MainColumn" :
- {
- "Centre" :
- {
- "Select" : "Select",
- "SelectClean" : "Select(Del)",
- "Pen" : "Pen",
- "Eraser" : "Eraser",
- "Options" : "Options"
- }
- },
- "Settings" :
- {
- "Settings" : "智绘教Inkeys Options",
-
- "Operate" :
- {
- "Reset" : "Reset",
- "Save" : "Save"
- },
-
- "Home" :
- {
- "Home" : "Home",
- "Prompt" : "A monitor with a resolution of 1080P to 1800P is recommended, above which the experience may be affected.",
- "#1" : "智绘教Inkeys Founding Developer",
- "#2" : "Tencent QQ User Group",
- "#3" : "Bilibili Video Channel"
- },
- "Regular" :
- {
- "Regular" : "Regular",
- "#1" : "Language and Internationalization",
- "#1_1" : "Language(语言)",
- "#1_2" : "Restart the software to take effect. | 重启软件生效。",
- "#2" : "Startup and startup behavior",
- "#2_1" : "Auto start",
- "#2_2" : "Set 智绘教Inkeys to start when the current user account is turned on.",
- "#3" : "Appearance Style",
- "#3_1" : "Theme",
- "#3_2" : "Selecting 'Recommended' will automatically replace the skin based on the official recommendation.",
- "#3_3" : " Recommended",
- "#3_4" : " Default",
- "#3_5" : " Tiny Clock",
- "#3_6" : " Snake Year",
- "#4" : "Other Behaviors",
- "#4_1" : "Right click on the main icon to close the program",
- "#4_2" : "A confirmation pop-up will appear.",
- "#4_3" : "Fold up the main bar when drawing with a brush",
- "#4_4" : "Fold up the main bar when erasing with a eraser",
- "#5" : "Experimental Options",
- "#5_1" : "Compatible with 'Auto-hide the taskbar'",
- "#5_2" : "Restarting 智绘教Inkeys takes effect.",
- "#5_3" : "Allow attempts to force the window to top",
- "#5_4" : "May cause other program errors."
- },
-
- "Update" :
- {
- "Tip0" : "Automatic update not started",
- "Tip1" : "Obtain new version information",
- "Tip2" : "Download version information is failed",
- "Tip3" : "Download version information is damaged",
- "Tip4" : "Download version information is invalid",
- "Tip5" : "Downloading new version",
- "Tip6" : "Download the latest program is failed",
- "Tip7" : "Download the latest program is damaged",
- "Tip8" : "Restart and update to the latest version",
- "Tip9" : "The program is the latest version"
- }
- }
-}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.jsonc" "b/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.jsonc"
new file mode 100644
index 0000000..1510164
--- /dev/null
+++ "b/\346\231\272\347\273\230\346\225\231/src/i18n/en-US.jsonc"
@@ -0,0 +1,493 @@
+// 你可以在此文件中使用 // 作为行注释,但块注释和尾随逗号等其他 JSONC 功能不受支持。
+// You can use // as line comments in this file, but other JSONC features such as block comments and trailing commas are not supported.
+{
+ "Language": "en-US",
+ "Widget":
+ {
+ "LnkName": "智绘教Inkeys (Screen Annotation Tool)"
+ },
+ "Operate":
+ {
+ "Reset": "Reset",
+ "Repair": "Repair",
+ "Copy": "Copy",
+ "Create": "Create"
+ },
+ "UI":
+ {
+ "Centre":
+ {
+ "Select": "Select",
+ "SelectClean": "Select(Del)",
+ "Pen": "Pen",
+ "Eraser": "Eraser",
+ "Options": "Options"
+ },
+ "Pen":
+ {
+ "Pen": "Pen",
+ "Highlighter": "Highli",
+ "Thinkness": "Tk\nne",
+ "Write": "Write",
+ "Line": "Line",
+ "Square": "Rect"
+ },
+ "Operate":
+ {
+ "Revoke": "Undo",
+ "Recall": "Restore",
+ "Freeze": "Frez",
+ "Pierce": "Pier"
+ }
+ },
+ "SettingsUI":
+ {
+ "N": "智绘教Inkeys Options",
+ "Home":
+ {
+ "N": "Home",
+ "Prompt": "Recommended screen resolution: 1080P to 1800P. Higher resolutions may affect user experience.",
+ "Developer": "智绘教Inkeys Developer",
+ "Group": "Github Discussions",
+ "GroupE": "Inkeys/discussions",
+ "BilibiliChannel": "Bilibili Channel",
+ "FeedBack": "Feedback / Suggestions"
+ },
+ "Language":
+ {
+ "N": "Language",
+ "UI":
+ {
+ "N": "UI Language",
+ "Select": "Select Language",
+ "SelectE": "Choose language | [Restart Required]",
+ "Language":
+ {
+ "en-US": "English(Beta)",
+ "zh-CN": "简体中文",
+ "zh-TW": "正體中文(Beta)"
+ },
+ "Warn": "Need to be restart to fully take effect. Restart now?"
+ }
+ },
+ "Configuration":
+ {
+ "N": "Config & Save",
+ "Clean":
+ {
+ "N": "Config Cleanup",
+ "Enable": "Enable cleanup",
+ "EnableE": "Removes extra config options when saving or launching. May result in loss of some settings after downgrade/upgrade or import. Lost options will reset to defaults."
+ },
+ "CanvasSave":
+ {
+ "N": "Canvas History",
+ "Enable": "Enable canvas history",
+ "EnableE": "Save canvases in the 'ScreenShot' folder for Super Restore.",
+ "SaveTime":
+ {
+ "N": "Keep duration",
+ "E": "Delete expired canvases on startup if they exceed the set duration.",
+ "1d": "1 day",
+ "3d": "3 days",
+ "5d": "5 days",
+ "10d": "10 days",
+ "30d": "30 days",
+ "Never": "Never delete"
+ }
+ }
+ },
+ "Version":
+ {
+ "N": "Software Version",
+ "ManualUpdate":
+ {
+ "N": "New version available",
+ "ManualUpdate": "Manual Update"
+ },
+ "VersionTip": "Incompatible software and system architecture may cause performance issues. It's recommended to repair the software in the 'Software Repair' section below (select 'Fix architecture'), or select the target architecture below and repair.",
+ "Info":
+ {
+ "N": "Version Info",
+ "ReleaseVersion": "Release Version:",
+ "ReleaseDate": "Release Date:",
+ "ReleaseArch": "Software Architecture | System Architecture:",
+ "ReleaseTag": "Release Build (RELEASE)",
+ "DebugTag": "Debug Build (DEBUG)",
+ "ManualBuild": "Manual Build",
+ "AutoBuild": "Auto Build (CI/CD)",
+ "CICDInfo": "Build Details"
+ },
+ "UserInfo":
+ {
+ "N": "User Info",
+ "CopyUserId": "Copy User ID",
+ "UserId": "User ID"
+ },
+ "Repair":
+ {
+ "N": "Software Repair",
+ "RepairSoftware": "Repair",
+ "RepairSoftwareE": "Reinstall to the latest version in the selected channel",
+ "RepairArch": "Fix architecture during repair"
+ },
+ "Update":
+ {
+ "N": "Update Preferences",
+ "AutoUpate": "Auto Update (silent)",
+ "ChannelTip": "Stable Channel (LTS): most stable version (recommended)\nInsider Channel: test versions, may be falsely reported as viruses.",
+ "Channel":
+ {
+ "N": "Update Channel",
+ "LTS": "Stable Channel (LTS)",
+ "Insider": "Insider Channel"
+ },
+ "Arch":
+ {
+ "N": "Target Architecture",
+ "E": "Warning: Architecture mismatches may cause the software to fail or run poorly.",
+ "64": "64-bit",
+ "32": "32-bit",
+ "Arm64": "Arm64"
+ }
+ }
+ },
+ "CICD":
+ {
+ "N": "Build Details",
+ "Repository": "Repository",
+ "Branch": "Branch",
+ "Submitter": "Submitter",
+ "BuildTime": "Build Time",
+ "BuildSystem": "Build System",
+ "BuildSystemVersion": "Build System Version",
+ "RunnerImageSystem": "Runner Image System",
+ "RunnerImageVersion": "Runner Image Version",
+ "MSBuildVersion": "MSBuild Version"
+ },
+ "Regular":
+ {
+ "N": "General",
+ "StartUp":
+ {
+ "N": "Startup",
+ "AutoStart": "Auto start on login",
+ "AutoStartE": "Launch 智绘教Inkeys when the user logs in.",
+ "Link":
+ {
+ "N": "Create Desktop Shortcut",
+ "E": "Auto-correct name and create shortcut, click 'More Options' for details.",
+ "More": "More Options"
+ }
+ },
+ "Appearance":
+ {
+ "N": "Appearance",
+ "Theme":
+ {
+ "N": "Theme",
+ "E": "Recommended skin will use the official setting automatically.",
+ "Skip1": "Recommended Skin",
+ "Skip2": "Default Skin",
+ "Skip3": "Minimal Clock",
+ "Skip4": "Year of Snake"
+ },
+ "SettingUIScale":
+ {
+ "N": "Options UI Scale",
+ "E": "[Restart Required] Higher scale uses more memory.",
+ "Ind": "{:.2f}x scale"
+ }
+ },
+ "Behavior":
+ {
+ "N": "Behavior",
+ "TopWindow":
+ {
+ "N": "Topmost Interval",
+ "E": "How often to keep window on top in non-draw mode. Shorter=more responsive but higher CPU use. Use 'Super Top' plugin if interference persists.",
+ "100ms": "Very Short (100ms)",
+ "500ms": "Short (500ms)",
+ "1s": "Medium-Short (1s)",
+ "3s": "Medium (3s)",
+ "5s": "Medium-Long (5s)",
+ "10s": "Long (10s)",
+ "30s": "Very Long (30s)"
+ },
+ "RightClickClose": "Close on right-click icon",
+ "RightClickCloseE": "Shows a confirmation dialog.",
+ "DrawingRetract": "Hide main bar while drawing",
+ "ErasingRetract": "Hide main bar when erasing",
+ "DraggingRetract": "Hide main bar when dragging",
+ "CheckingRetract": "Hide main bar on click",
+ "CheckingRetractE": "Only in select/penetrate mode, works on non-mainbar areas."
+ },
+ "Tentative":
+ {
+ "N": "Experimental Options",
+ "AvoidFulScreen": "Avoid Fullscreen",
+ "AvoidFulScreenE": "[Restart Required] Prevents fullscreen in non-draw/penetrate modes; may help taskbar issues and reduce topmost failures.",
+ "SafeMode":
+ {
+ "N": "Crash Safe Mode",
+ "E": "Action on crash (startup errors still show dialog)",
+ "Mode1": "Show error dialog and restart",
+ "Mode2": "Silent restart",
+ "Mode3": "Let system handle",
+ "Mode4": "Quit directly"
+ }
+ }
+ },
+ "Draw":
+ {
+ "N": "Drawing",
+ "Effect":
+ {
+ "N": "Drawing Performance",
+ "Device":
+ {
+ "N": "Input Device",
+ "E": "Optimize for selected device.",
+ "Touch": "Touch Screen",
+ "MousePen": "Mouse or Pen"
+ }
+ },
+ "AIDraw":
+ {
+ "N": "Smart Drawing",
+ "PenUp": "Straighten line on pen lift",
+ "PenUpE": "Recommended for classroom all-in-one devices.",
+ "PenStay": "Straighten on hold",
+ "PenStayE": "Hold for 1s after drawing to straighten line.",
+ "EndpointAdsorption": "Endpoint Snapping",
+ "EndpointAdsorptionE": "Line and rectangle ends snap when pen lifts."
+ },
+ "DrawBehavior":
+ {
+ "N": "Drawing Behavior",
+ "SoomthWriting": "Smooth out strokes when pen lifted"
+ },
+ "RubberThickness":
+ {
+ "N": "Eraser Thickness",
+ "Calc":
+ {
+ "N": "Thickness Calculation",
+ "E": "If device doesn't support, will try the next mode.",
+ "Mode1": "Fixed",
+ "Mode2": "By Speed",
+ "Mode3": "By Pressure"
+ }
+ },
+ "Tentative":
+ {
+ "N": "Experimental",
+ "HideCursor": "Hide touch cursor while drawing (BETA)",
+ "HideCursorE": "Hides white touch dot on canvas. Shows mouse/pen cursor again when detected."
+ }
+ },
+ "Performance":
+ {
+ "N": "Performance",
+ "DrawMode":
+ {
+ "N": "Draw Engine",
+ "Prepare":
+ {
+ "N": "Touch Prepare",
+ "E": "More fingers = faster start, but uses more memory.",
+ "Ind": "{:d} fingers"
+ },
+ "SuperDraw": "Extreme Performance Drawing (BETA)",
+ "SuperDrawE": "For powerful CPUs only! Removes canvas render interval in draw mode. Extra resource usage only while drawing. Turn off if lag detected."
+ }
+ },
+ "Preset":
+ {
+ "N": "Presets",
+ "Memory":
+ {
+ "N": "Memory",
+ "Thickness": "Remember last pen width",
+ "ThicknessE": "Pen/highlighter width on startup matches last exit.",
+ "Color": "Remember last pen color",
+ "ColorE": "Pen/highlighter color on startup matches last exit."
+ },
+ "Preset":
+ {
+ "N": "Presets (if memory is off)",
+ "AutoThickness": "Auto adapt width",
+ "AutoThicknessE": "Set recommended pen width based on screen resolution/size at launch. (Current pen: {}px; Highlighter: {}px)",
+ "Pen": "Pen width preset",
+ "PenInd": "{} px",
+ "Highlighter": "Highlighter width preset",
+ "HighlighterInd": "{} px"
+ }
+ },
+ "PlugIn":
+ {
+ "N": "Plugins",
+
+ "PPTHelper":
+ {
+ "N": "PPT Presentation Helper",
+ "E": "Provides presentation and brush control buttons during a slideshow. Each page has its own independent canvas, allowing ink annotations to remain fixed on the page. Does not affect original functionalities or external devices. Supports Microsoft PowerPoint and KingSoft WPS.",
+
+ "VersionError": "Unknown version (Plugin error)",
+ "Solve": "Solution",
+ "Sync": "Sync ADJ",
+ "Reset": "Reset",
+
+ "Tip": "To use the plugin, please ensure that the permissions for the Inkeys application and the PPT application are the same for proper detection. If issues persist, please refer to the solution.",
+ "Warn": "Detected that your PowerPoint/WPS is set to 'Always run as administrator'. This means our application must also run with administrator privileges to detect the slideshow process and enable PPT integration. If you prefer not to run your presentation software as an administrator, please refer to the solution.",
+
+ "BasicLogic":
+ {
+ "N": "Basic Logic",
+
+ "InkFixation": "Fix ink to its page",
+ "InkFixationE": "Each PPT page will have its own independent canvas, similar to the native pen feature in PowerPoint. Navigating to another page will not clear the ink drawn on previous pages; you can return to a previous page to continue drawing.",
+ "LoadPage": "Show loading page",
+ "LoadPageE": "Includes the plugin logo, tips, etc., and is shown only once per PPT file."
+ },
+ "WidgetDisplay":
+ {
+ "N": "Widget Display",
+
+ "BottomBoth": "Show bottom-side widgets",
+ "MiddleBoth": "Show middle-side widgets",
+ "BottomMiddle": "Show bottom main bar widget"
+ },
+ "WidgetPosition":
+ {
+ "N": "Widget Position",
+
+ "Reset": "Reset widget positions",
+ "Remember": "Remember widget positions"
+ },
+ "WidgetScale":
+ {
+ "N": "Widget Scale",
+ "Ind": "{:.2f}x scale",
+
+ "Page":
+ {
+ "BottomSideBoth": "Bottom-side widgets scale",
+ "MiddleSideBoth": "Middle-side widgets scale"
+ },
+ "State":
+ {
+ "BottomSideMiddle": "Bottom main bar widget scale"
+ }
+ },
+ "Tentative":
+ {
+ "N": "Experimental Options",
+
+ "CloseWpp": "Allow closing of stuck/orphaned WPP presentation processes",
+ "CloseWppE": "Requires a restart to take effect. After exiting a presentation in KingSoft WPS, the original WPP process sometimes doesn't close properly and remains stuck. This prevents the app from detecting new presentations and enabling integration. Enabling this option helps terminate these stuck processes. It is safe for your files and is recommended."
+ }
+ },
+ "SuperTop":
+ {
+ "N": "SuperTop",
+ "E": "Uses UiAccess technology to keep the application window on top of other regular software, and even above system elements like the Taskbar, Alt+Tab switcher, on-screen keyboard, and the lock screen. Requires Windows 8 or newer.",
+
+ "Warn": "The SuperTop feature is in BETA and may be unstable. The application restarts itself upon launch to request elevated privileges, then launches a new instance. This process may fail, resulting in an incorrect launch with administrator rights, which can interfere with PPT integration. A UAC (User Account Control) prompt will appear; please click 'Yes' or disable UAC prompts (not recommended). It might be flagged by antivirus software; this is a false positive and is normal.",
+
+ "Capability":
+ {
+ "N": "Basic Capabilities",
+
+ "SuperTop": "Enable Super SuperTop",
+ "SuperTopE1": "The application uses a three-stage launch to enable this feature, which may occasionally fail. A restart is required.\n(Currently successful)",
+ "SuperTopE2": "The application uses a three-stage launch to enable this feature, which may occasionally fail. A restart is required.\n(Currently failed)",
+
+ "Indicator": "SuperTop Indicator",
+ "IndicatorE": "Displays a pin icon on the top-right corner of the main application icon when successfully enabled."
+ }
+ },
+ "DesktopDrawpadBlocker":
+ {
+ "N": "DesktopDrawpadBlocker",
+ "E": "Blocks floating widgets from competing software (e.g., Seewo Whiteboard) on your screen. Supports blocking various common floating widgets and other PPT control bars or toolkits."
+ },
+ "LnkHelper":
+ {
+ "N": "Shortcut Helper",
+ "E": "Ensures that existing 智绘教Inkeys shortcuts remain valid after application updates, which can change the program's file name. Optionally, it can also create a new desktop shortcut if one does not already exist.",
+
+ "Capability":
+ {
+ "N": "Basic Capabilities",
+
+ "FixLnk": "Fix desktop shortcut target and name",
+ "FixLnkE": "On startup, the app will fix any existing desktop shortcuts. This is recommended, as auto-updates can change the program's file name, breaking the shortcut."
+ },
+ "Expansion":
+ {
+ "N": "Additional Options",
+
+ "CreateLnk": "Create desktop shortcut",
+ "CreateLnkE": "Creates a desktop shortcut if one doesn't already exist."
+ }
+ }
+ },
+ "Component":
+ {
+ "N": "Components"
+ },
+ "HotKey":
+ {
+ "N": "Hotkeys",
+ "E": "Global Hotkeys:\nCtrl + Win + Alt: Switch select/draw mode\n\nIn Draw Mode:\nCtrl + Q: Freeze\nCtrl + E: Penetrate\nCtrl + Z: Undo/Super Restore\n\nOther/custom hotkeys coming soon."
+ },
+ "Community":
+ {
+ "N": "Community"
+ },
+ "Sponsor":
+ {
+ "N": "Sponsor Us"
+ },
+ "RestartSoftware":
+ {
+ "N": "Restart"
+ },
+ "ExitSoftware":
+ {
+ "N": "Exit"
+ },
+ "DebugSoftware":
+ {
+ "N": "[Debug]"
+ },
+ "Update":
+ {
+ "Check": "Check",
+ "Channel":
+ {
+ "LTS": "Stable Channel",
+ "Insider": "Insider Channel",
+ "Dev": "Dev Channel",
+ "Other": "Other Channel"
+ },
+ "NotStarted": "Update check not started",
+ "ObtainInformation": "Fetching update info",
+ "InformationFail": "Failed to fetch update info",
+ "InformationDamage": "Downloaded info corrupted",
+ "InformationUnStandardized": "Invalid update info",
+ "Downloading": "Downloading update",
+ "DownloadFail": "Download failed",
+ "DownloadDamage": "File damaged",
+ "Restart": "Restart to update to latest version",
+ "Latest": "Already up-to-date",
+ "Newer": "Newer than official latest",
+ "New": "New version found",
+ "Repair": "Try Repair",
+ "ManualDownload": "Manual Download",
+ "UpdateNow": "Update Now"
+ }
+ }
+}
+
diff --git "a/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.json" "b/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.json"
deleted file mode 100644
index 5927fcd..0000000
--- "a/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.json"
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "Language" : "zh-CN",
- "MainColumn" :
- {
- "Centre" :
- {
- "Select" : "选择",
- "SelectClean" : "选择(清空)",
- "Pen" : "画笔",
- "Eraser" : "橡皮",
- "Options" : "选项"
- }
- },
- "LnkName" : "智绘教(屏幕批注工具)",
- "Settings" :
- {
- "Settings" : "智绘教Inkeys 选项",
-
- "Operate" :
- {
- "Reset" : "重置",
- "Repair" : "修复",
- "Copy" : "复制"
- },
-
- "Home" :
- {
- "Home" : "主页",
- "Prompt" : "推荐使用 1080P 至 1800P 分辨率的显示器,高于此范围可能会影响使用体验。",
- "#1" : "智绘教Inkeys 创始开发者",
- "#2" : "QQ 用户群",
- "#3" : "Bilibili 宣发频道"
- },
- "Regular" :
- {
- "Regular" : "常规",
- "#1" : "语言和国际化",
- "#1_1" : "语言(Language)",
- "#1_2" : "重启软件生效。 | Restart the software to take effect.",
- "#2" : "开机自启和启动行为",
- "#2_1" : "开机自动启动",
- "#2_2" : "设置当前用户账户开机时启动 智绘教Inkeys。",
- "#3" : "外观样式",
- "#3_1" : "主题",
- "#3_2" : "选择“推荐皮肤”将会根据官方推荐皮肤自动更换。",
- "#3_3" : "推荐皮肤",
- "#3_4" : "默认皮肤",
- "#3_5" : "极简时钟",
- "#3_6" : "蛇年迎新",
- "#3_7" : "选项界面 UI 缩放",
- "#3_8" : "重启软件生效。缩放比例高将会占用大量内存空间。",
- "#3_9" : "{:.2f} 倍缩放",
- "#4" : "其他行为",
- "#4_1" : "右键点击主图标关闭程序",
- "#4_2" : "将会弹出一个确认弹框。",
- "#4_3" : "画笔绘制时收起主栏",
- "#4_4" : "橡皮擦除时收起主栏",
- "#5" : "实验选项",
- "#5_1" : "兼容“自动隐藏任务栏”",
- "#5_2" : "重启 智绘教Inkeys 生效。",
- "#5_3" : "允许尝试窗口强制置顶",
- "#5_4" : "可能会引发其他程序错误。"
- },
-
- "Update" :
- {
- "Tip0" : "获取新版本检测未启动",
- "Tip1" : "获取新版本信息中",
- "Tip2" : "下载版本信息失败",
- "Tip3" : "下载版本信息损坏",
- "Tip4" : "下载版本信息不符合规范",
- "Tip5" : "新版本正极速下载中",
- "Tip6" : "下载最新版本软件失败",
- "Tip7" : "下载最新版本软件损坏",
- "Tip8" : "重启软件更新到最新版本",
- "Tip9" : "软件已经是最新版本",
- "Tip10" : "软件相对最新版本更新",
- "Tip11" : "发现程序新版本",
- "#0" : "检查更新"
- }
- }
-}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.jsonc" "b/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.jsonc"
new file mode 100644
index 0000000..6b15b0b
--- /dev/null
+++ "b/\346\231\272\347\273\230\346\225\231/src/i18n/zh-CN.jsonc"
@@ -0,0 +1,564 @@
+// 你可以在此文件中使用 // 作为行注释,但块注释和尾随逗号等其他 JSONC 功能不受支持。
+// You can use // as line comments in this file, but other JSONC features such as block comments and trailing commas are not supported.
+{
+ "Language": "zh-CN",
+ "Widget":
+ {
+ "LnkName": "智绘教(屏幕批注工具)"
+ },
+ "Operate":
+ {
+ "Reset": "重置",
+ "Repair": "修复",
+ "Copy": "复制",
+ "Create": "创建"
+ },
+
+ "UI":
+ {
+ "Centre":
+ {
+ "Select": "选择",
+ "SelectClean": "选择(清空)",
+ "Pen": "画笔",
+ "Eraser": "橡皮",
+ "Options": "选项"
+ },
+ "Pen":
+ {
+
+ "Pen": "画笔",
+ "Highlighter": "荧光笔",
+
+ "Thinkness": "粗\n细",
+
+ "Write": "书写",
+ "Line": "直线",
+ "Square": "矩形"
+ },
+ "Operate":
+ {
+ "Revoke": "撤回",
+ "Recall": "超级恢复",
+ "Freeze": "定格",
+ "Pierce": "穿透"
+ }
+ },
+ "SettingsUI":
+ {
+ "N": "智绘教Inkeys 选项",
+
+ "Home":
+ {
+ "N": "主页",
+ "Prompt": "推荐使用 1080P 至 1800P 分辨率的显示器,高于此范围可能会影响使用体验。",
+ "Developer": "智绘教Inkeys 创始开发者",
+ "Group": "QQ 用户群",
+ "GroupE": "618720802",
+ "BilibiliChannel": "Bilibili 宣发频道",
+ "FeedBack": "问题/建议反馈"
+ },
+ "Language":
+ {
+ "N": "语言",
+
+ "UI":
+ {
+ "N": "界面语言",
+
+ "Select": "选择语言",
+ "SelectE": "Choose language | [需要重启软件]",
+
+ "Language":
+ {
+ "en-US": "English(Beta)",
+ "zh-CN": "简体中文",
+ "zh-TW": "正體中文(Beta)"
+ },
+ "Warn": "需要重启软件才能完全生效,是否重启?"
+ }
+ },
+ "Configuration":
+ {
+ "N": "配置保存",
+
+ "Clean":
+ {
+ "N": "配置清理",
+
+ "Enable": "启用配置清理",
+ "EnableE": "软件将在启动时和保存配置时清理配置表。具体为删去多余配置项(和当前软件版本的配置项模板比较),这可能导致在软件降级再升级后和导入配置时会丢失部分配置项,这些配置项将会变为默认选项。"
+ },
+ "CanvasSave":
+ {
+ "N": "画布保存",
+
+ "Enable": "启用历史画布保存",
+ "EnableE": "存储在程序目录下 ScreenShot 文件夹内,并供“超级恢复”使用历史画布。",
+
+ "SaveTime":
+ {
+ "N": "保存时长",
+ "E": "超过设定时长后,在启动时清理过期的历史画布。",
+
+ "1d": "1天",
+ "3d": "3天",
+ "5d": "5天",
+ "10d": "10天",
+ "30d": "30天",
+ "Never": "从不清理"
+ }
+ }
+ },
+ "Version":
+ {
+ "N": "软件版本",
+
+ "ManualUpdate":
+ {
+ "N": "发现软件新版本",
+
+ "ManualUpdate": "手动更新"
+ },
+ "VersionTip": "检测到软件架构与系统架构不符,与系统架构不适应有可能会导致软件效率降低,并影响体验。建议在本页面下方“软件修复”模块中修复软件(启用“修复时修正软件架构”选项),或在页面底端手动选择目标架构并修复。",
+
+ "Info":
+ {
+ "N": "版本信息",
+
+ "ReleaseVersion": "软件发布版本",
+ "ReleaseDate": "软件发布时间",
+ "ReleaseArch": "软件架构和系统架构",
+
+ "ReleaseTag": "软件构建模式为发布版本(RELEASE)",
+ "DebugTag": "软件构建模式为非发布调测版本(DEBUG)",
+
+ "ManualBuild": "此版本为手动构建",
+ "AutoBuild": "此版本为自动构建(CI/CD) ",
+ "CICDInfo": "自动构建详情信息"
+ },
+ "UserInfo":
+ {
+ "N": "用户信息",
+
+ "CopyUserId": "复制用户ID",
+ "UserId": "用户ID"
+ },
+ "Repair":
+ {
+ "N": "软件修复",
+
+ "RepairSoftware": "修复软件",
+ "RepairSoftwareE": "重新安装软件至所选通道的最新版本",
+
+ "RepairArch": "修复时修正软件架构"
+ },
+ "Update":
+ {
+ "N": "更新偏好",
+
+ "AutoUpate": "自动更新(静默)",
+ "ChannelTip": "正式通道(LTS) 推送最新的稳定版本, 具有较高的稳定性。(推荐)\n预览通道(Insider) 推送稳定性一般的预览版本, 且可能会被杀毒软件误报。",
+
+ "Channel":
+ {
+ "N": "目标更新通道",
+
+ "LTS": "正式通道(LTS)",
+ "Insider": "预览通道(Insider)"
+ },
+ "Arch":
+ {
+ "N": "目标更新架构",
+ "E": "注意:和当前系统不一致的架构可能会导致软件无法启动或严重的性能问题。",
+
+ "64": "64位",
+ "32": "32位",
+ "Arm64": "Arm64"
+ }
+ }
+ },
+ "CICD":
+ {
+ "N": "自动构建详情信息",
+
+ "Repository": "构建仓库",
+ "Branch": "构建分支",
+ "Submitter": "构建提交者",
+ "BuildTime": "构建时间",
+ "BuildSystem": "构建系统",
+ "BuildSystemVersion": "构建系统版本",
+ "RunnerImageSystem": "运行器镜像系统",
+ "RunnerImageVersion": "运行器镜像版本",
+ "MSBuildVersion": "MSBuild 版本"
+ },
+
+ // ---
+
+ "Regular":
+ {
+ "N": "常规",
+
+ "StartUp":
+ {
+ "N": "开机自启和启动行为",
+
+ "AutoStart": "开机自动启动",
+ "AutoStartE": "设置当前用户账户开机时启动 智绘教Inkeys。",
+
+ "Link":
+ {
+ "N": "创建桌面快捷方式",
+ "E": "自动修正名称和创建快捷方式,请点击“更多选项”。",
+
+ "More": "更多选项"
+ }
+ },
+ "Appearance":
+ {
+ "N": "外观样式",
+
+ "Theme":
+ {
+ "N": "主题",
+ "E": "选择“推荐皮肤”将会根据官方推荐皮肤自动更换。",
+
+ "Skip1": "推荐皮肤",
+ "Skip2": "默认皮肤",
+ "Skip3": "极简时钟",
+ "Skip4": "蛇年迎新"
+ },
+ "SettingUIScale":
+ {
+ "N": "选项界面 UI 缩放",
+ "E": "[需要重启软件]缩放比例高将会占用大量内存空间。",
+
+ "Ind": "{:.2f} 倍缩放"
+ }
+ },
+ "Behavior":
+ {
+ "N": "其他行为",
+
+ "TopWindow":
+ {
+ "N": "置顶间隔",
+ "E": "在非绘制模式下将按此间隔置顶窗口,落笔时暂停置顶窗口。更短的间隔可以更少地排除其他软件的窗口的干扰,但会占用更多的CPU资源。如果其他软件其他软件的窗口持续干扰,建议使用插件-超级置顶。",
+
+ "100ms": "非常短(100ms)",
+ "500ms": "短(500ms)",
+ "1s": "较短(1s)",
+ "3s": "中等(3s)",
+ "5s": "较长(5s)",
+ "10s": "长(10s)",
+ "30s": "非常长(30s)"
+ },
+
+ "RightClickClose": "右键点击主图标关闭程序",
+ "RightClickCloseE": "将会弹出一个确认弹框。",
+ "DrawingRetract": "画笔绘制时收起主栏",
+ "ErasingRetract": "橡皮擦除时收起主栏",
+ "DraggingRetract": "拖动主栏时收起主栏",
+ "CheckingRetract": "点击时收起主栏",
+ "CheckingRetractE": "仅在选择模式或穿透下,点击非主栏区域时生效。"
+ },
+ "Tentative":
+ {
+ "N": "实验选项",
+
+ "AvoidFulScreen": "避免全屏显示",
+ "AvoidFulScreenE": "[需要重启软件]软件在非绘制模式下或穿透模式下将不会保持全屏显示。这可以保证拥有自动隐藏熟悉的任务栏可以正常升起,可能可以降低置顶窗口失败的概率,还可能可以改善任务栏无法被触摸的问题。",
+
+ "SafeMode":
+ {
+ "N": "教学安全选项",
+ "E": "软件发生崩溃错误时所执行的操作。(启动过程发生错误依旧会引发提示)",
+
+ "Mode1": "弹窗提示并重启软件",
+ "Mode2": "静默重启软件",
+ "Mode3": "交由系统崩溃过滤器处理",
+ "Mode4": "直接关闭软件"
+ }
+ }
+ },
+ "Draw":
+ {
+ "N": "绘制",
+
+ "Effect":
+ {
+ "N": "绘图效果优化",
+
+ "Device":
+ {
+ "N": "绘图设备",
+ "E": "我们将根据不同设备类型优化使用体验。",
+
+ "Touch": "触控屏幕",
+ "MousePen": "鼠标或手写笔"
+ }
+ },
+ "AIDraw":
+ {
+ "N": "智能绘图",
+
+ "PenUp": "抬笔拉直直线",
+ "PenUpE": "现阶段只推荐在教学一体机上使用。",
+ "PenStay": "停留拉直直线",
+ "PenStayE": "绘制直线完成后按住一秒,直线将被拉直。",
+
+ "EndpointAdsorption": "端点吸附",
+ "EndpointAdsorptionE": "直线和矩形的端点将会在抬笔时吸附。"
+ },
+ "DrawBehavior":
+ {
+ "N": "绘制行为",
+
+ "SoomthWriting": "抬笔平滑笔迹"
+ },
+ "RubberThickness":
+ {
+ "N": "橡皮粗细",
+
+ "Calc":
+ {
+ "N": "橡皮粗细计算方式",
+ "E": "如果特定设备不支持当前选项,软件会继续尝试下一个粗细计算方式。",
+
+ "Mode1": "固定粗细",
+ "Mode2": "笔速粗细",
+ "Mode3": "压感粗细"
+ }
+ },
+ "Tentative":
+ {
+ "N": "实验选项",
+
+ "HideCursor": "绘制时隐藏触控光标(BETA)",
+ "HideCursorE": "阻止触控光标(白色圆点)在画布上显示。但是当鼠标和触控笔信号出现时, 则会恢复显示鼠标光标/笔光标。"
+ }
+ },
+ "Performance":
+ {
+ "N": "性能",
+
+ "DrawMode":
+ {
+ "N": "绘图模块",
+
+ "Prepare":
+ {
+ "N": "落笔预备",
+ "E": "越大则越多手指落下时更快开始绘制,但会占用更多内存。",
+
+ "Ind": "{:d} 指"
+ },
+
+ "SuperDraw": "极限性能绘图(BETA)",
+ "SuperDrawE": "仅适用于拥有强大 CPU 的设备(重要!否则将引起卡顿)。 在绘制模式下取消画布渲染间隔,额外性能开销都仅在绘制中产生(即非选择状态下)。 如果发现绘制延迟高、不跟手,请关闭此选项。"
+ }
+ },
+ "Preset":
+ {
+ "N": "预设",
+
+ "Memory":
+ {
+ "N": "记忆",
+
+ "Thickness": "记忆绘制粗细",
+ "ThicknessE": "在启动软件时使画笔与荧光笔的粗细和退出时一致。",
+ "Color": "记忆绘制颜色",
+ "ColorE": "在启动软件时使画笔与荧光笔的颜色和退出时一致。"
+ },
+ "Preset":
+ {
+ "N": "预设(仅在未开启对应绘制记忆时生效)",
+
+ "AutoThickness": "自适应绘制粗细",
+ "AutoThicknessE": "在启动时,根据屏幕分辨率和物理尺寸自动设定推荐的绘制粗细。(画笔当前为{}px;荧光笔当前为{}px)",
+
+ "Pen": "预设画笔粗细",
+ "PenInd": "{} px",
+ "Highlighter": "预设荧光笔粗细",
+ "HighlighterInd": "{} px"
+ }
+ },
+ "PlugIn":
+ {
+ "N": "插件",
+
+ "PPTHelper":
+ {
+ "N": "PPT演示助手",
+ "E": "在幻灯片演示时提供演示控制按钮和画笔控制按钮。每页拥有独立画板,可以让笔迹固定在页面上。不影响原有功能和外接设备的使用,支持 Microsoft PowerPoint 和 WPS。",
+
+ "VersionError": "版本号未知(插件发生错误)",
+ "Solve": "解决方案",
+ "Sync": "同步调节",
+ "Reset": "重置",
+
+ "Tip": "使用插件时需要保证智绘教Inkeys的程序权限和PPT程序是一致的才能正确识别。如果依然存在问题,可以参考解决方案。",
+ "Warn": "检测到您的PowerPoint/WPS已经设置为始终以管理员身份打开,这意味着程序需要以管理员身份运行才能识别到放映进程并开启PPT联动。如果您不希望放映软件始终以管理员身份运行,可以参考解决方案。",
+
+ "BasicLogic":
+ {
+ "N": "基础逻辑",
+
+ "InkFixation": "墨迹固定在对应页面上",
+ "InkFixationE": "每个PPT页面都将拥有各自独立的画布,并可以实现类似PPT自带画笔的效果。翻页不会清空之前页面所绘制的墨迹,可以返回之前的页面继续绘制。",
+ "LoadPage": "显示加载页面",
+ "LoadPageE": "包含插件标识和小提示等,每个 PPT 仅显示一次。"
+ },
+ "WidgetDisplay":
+ {
+ "N": "控件显示",
+
+ "BottomBoth": "显示底部两侧控件",
+ "MiddleBoth": "显示中部两侧控件",
+ "BottomMiddle": "显示底部主栏控件"
+ },
+ "WidgetPosition":
+ {
+ "N": "控件位置",
+
+ "Reset": "重置控件位置",
+ "Remember": "记忆控件位置"
+ },
+ "WidgetScale":
+ {
+ "N": "控件缩放",
+ "Ind": "{:.2f} 倍缩放",
+
+ "Page":
+ {
+ "BottomSideBoth": "底部两侧控件缩放",
+ "MiddleSideBoth": "中部两侧控件缩放"
+ },
+ "State":
+ {
+ "BottomSideMiddle": "底部主栏控件缩放"
+ }
+ },
+ "Tentative":
+ {
+ "N": "实验选项",
+
+ "CloseWpp": "允许关闭游离卡死的 WPP 演示进程",
+ "CloseWppE": "重启软件生效。在WPS退出放映后原来的WPP演示进程并不会立即关闭,而是保持游离卡死状态。此时再次开始放映PPT则无法立即识别到放映进程并开启PPT联动。开启此选项将帮助关闭游离卡死的WPP放映进程,这不会对您的文件造成影响,推荐开启。"
+ }
+ },
+ "SuperTop":
+ {
+ "N": "超级置顶",
+ "E": "使用UiAccess技术在其他常规软件之上显示软件窗口,亦或是在任务栏、Alt+Tab、屏幕键盘、锁屏界面等上方显示软件窗口。仅支持Windows8及以上系统。",
+
+ "Warn": "超级置顶插件处于 BETA 阶段,可能遇到不稳定的问题。\n软件在启动时会通过再运行自身的方式进行提权,提权成功后再运行新的软件实例。\n该过程可能失败,导致错误地启动拥有管理员权限的软件,可能会影响 PPT 联动。\n过程中会弹出 UAC 确认弹窗,请点击确认或关闭 UAC 提示(不推荐)。\n过程中可能被杀毒软件误报,这是正常现象。",
+
+ "Capability":
+ {
+ "N": "基础能力",
+
+ "SuperTop": "超级置顶",
+ "SuperTopE1": "软件将三段式启动进行置顶,小概率出现问题导致置顶失败。重启后生效。\n(当前已经超级置顶)",
+ "SuperTopE2": "软件将三段式启动进行置顶,小概率出现问题导致置顶失败。重启后生效。\n(当前未超级置顶)",
+
+ "Indicator": "超级置顶指示器",
+ "IndicatorE": "软件成功被超级置顶时,在主图标右上角显示一个大头针。"
+ }
+ },
+ "DesktopDrawpadBlocker":
+ {
+ "N": "同类软件悬浮窗拦截助手",
+ "E": "拦截屏幕上 希沃白板桌面悬浮窗 等同类软件悬浮窗。支持拦截常见同类软件悬浮窗,以及 PPT 小工具等 PPT 操控栏。"
+ },
+ "LnkHelper":
+ {
+ "N": "快捷方式保障助手",
+ "E": "在程序启动时确保已经创建的智绘教Inkeys快捷方式是有效的。因为程序更新会修改文件名称,这会导致快捷方式失效。可选的,如果桌面没有智绘教Inkeys的快捷方式,则创建一个。",
+
+ "Capability":
+ {
+ "N": "基础能力",
+
+ "FixLnk": "修正桌面快捷方式指向和名称",
+ "FixLnkE": "软件启动时将修正桌面已经存在的软件快捷方式。软件自动更新后可能会改变文件名,推荐开启。"
+ },
+ "Expansion":
+ {
+ "N": "拓展选项",
+
+ "CreateLnk": "创建桌面快捷方式",
+ "CreateLnkE": "当桌面不存在软件的快捷方式时,则创建一个。"
+ }
+ }
+ },
+ "Component":
+ {
+ "N": "组件"
+ },
+ "HotKey":
+ {
+ "N": "快捷键",
+ "E": "全局快捷键:\nCtrl + Win + Alt 切换选择 / 绘制模式\n\n绘制模式下:\nCtrl + Q 定格\nCtrl + E 穿透\nCtrl + Z 撤回 / 超级恢复\n\n其余快捷键和自定义快捷键正在测试,敬请期待"
+ },
+
+ // ---
+
+ "Community":
+ {
+ "N": "社区名片"
+ },
+ "Sponsor":
+ {
+ "N": "赞助我们"
+ },
+
+ // ---
+
+ "RestartSoftware":
+ {
+ "N": "重启软件"
+ },
+ "ExitSoftware":
+ {
+ "N": "关闭软件"
+ },
+ "DebugSoftware":
+ {
+ "N": "调试软件"
+ },
+
+ // ---
+
+ "Update":
+ {
+ "Check": "检查更新",
+
+ "Channel":
+ {
+ "LTS": "正式通道",
+ "Insider": "预览通道",
+ "Dev": "开发通道",
+ "Other": "其他通道"
+ },
+
+ "NotStarted": "新版本检测未启动",
+ "ObtainInformation": "获取新版本信息中",
+ "InformationFail": "下载版本信息失败",
+ "InformationDamage": "下载版本信息损坏",
+ "InformationUnStandardized": "下载版本信息不符合规范",
+ "Downloading": "新版本正极速下载中",
+ "DownloadFail": "下载最新版本软件失败",
+ "DownloadDamage": "下载最新版本软件损坏",
+ "Restart": "重启软件更新到最新版本",
+ "Latest": "软件已经是最新版本",
+ "Newer": "软件相对最新版本更新",
+ "New": "发现软件新版本",
+
+ "Repair": "尝试修复",
+ "ManualDownload": "手动下载最新版本",
+ "UpdateNow": "更新到最新版本"
+ }
+ }
+}
diff --git "a/\346\231\272\347\273\230\346\225\231/src/i18n/zh-TW.jsonc" "b/\346\231\272\347\273\230\346\225\231/src/i18n/zh-TW.jsonc"
new file mode 100644
index 0000000..8a3d4db
--- /dev/null
+++ "b/\346\231\272\347\273\230\346\225\231/src/i18n/zh-TW.jsonc"
@@ -0,0 +1,561 @@
+// 你可以在此文件中使用 // 作為行註釋,但塊註釋和尾隨逗號等其他 JSONC 功能不受支持。
+// You can use // as line comments in this file, but other JSONC features such as block comments and trailing commas are not supported.
+{
+ "Language": "zh-TW",
+ "Widget":
+ {
+ "LnkName": "智繪教(螢幕批註工具)"
+ },
+ "Operate":
+ {
+ "Reset": "重設",
+ "Repair": "修復",
+ "Copy": "複製",
+ "Create": "建立"
+ },
+
+ "UI":
+ {
+ "Centre":
+ {
+ "Select": "選擇",
+ "SelectClean": "選擇(清空)",
+ "Pen": "畫筆",
+ "Eraser": "橡皮擦",
+ "Options": "選項"
+ },
+ "Pen":
+ {
+ "Pen": "畫筆",
+ "Highlighter": "螢光筆",
+ "Thinkness": "粗\n細",
+ "Write": "書寫",
+ "Line": "直線",
+ "Square": "矩形"
+ },
+ "Operate":
+ {
+ "Revoke": "撤回",
+ "Recall": "超級回復",
+ "Freeze": "定格",
+ "Pierce": "穿透"
+ }
+ },
+ "SettingsUI":
+ {
+ "N": "智绘教Inkeys 選項",
+
+ "Home":
+ {
+ "N": "主頁",
+ "Prompt": "建議使用 1080P 至 1800P 解析度的顯示器,高於此範圍可能會影響使用體驗。",
+ "Developer": "智绘教Inkeys 創始開發者",
+ "Group": "Github Discussions",
+ "GroupE": "Inkeys/discussions",
+ "BilibiliChannel": "Bilibili 宣傳頻道",
+ "FeedBack": "問題/建議回饋"
+ },
+ "Language":
+ {
+ "N": "語言",
+
+ "UI":
+ {
+ "N": "介面語言",
+
+ "Select": "選擇語言",
+ "SelectE": "Choose language | [需要重新啟動軟體]",
+
+ "Language":
+ {
+ "en-US": "English(Beta)",
+ "zh-CN": "简体中文",
+ "zh-TW": "正體中文(Beta)"
+ },
+ "Warn": "需要重新啟動軟體才能完全生效,是否重啟?"
+ }
+ },
+ "Configuration":
+ {
+ "N": "設定保存",
+
+ "Clean":
+ {
+ "N": "設定清理",
+
+ "Enable": "啟用設定清理",
+ "EnableE": "軟體在啟動時和保存設定時將清理設定表。具體為刪除多餘設定項(與目前軟體版本的設定項模板比較),這可能導致在軟體降級再升級後及匯入設定時會遺失部分設定項,這些設定項將會變為預設選項。"
+ },
+ "CanvasSave":
+ {
+ "N": "畫布保存",
+
+ "Enable": "啟用歷史畫布保存",
+ "EnableE": "儲存在程式目錄下 ScreenShot 資料夾內,並供「超級回復」使用歷史畫布。",
+
+ "SaveTime":
+ {
+ "N": "保存時長",
+ "E": "超過設定時長後,在啟動時清除過期的歷史畫布。",
+
+ "1d": "1天",
+ "3d": "3天",
+ "5d": "5天",
+ "10d": "10天",
+ "30d": "30天",
+ "Never": "從不清理"
+ }
+ }
+ },
+ "Version":
+ {
+ "N": "軟體版本",
+
+ "ManualUpdate":
+ {
+ "N": "發現軟體新版本",
+
+ "ManualUpdate": "手動更新"
+ },
+ "VersionTip": "檢測到軟體架構與系統架構不符,與系統架構不適應有可能會導致軟體效率降低,並影響體驗。建議在本頁面下方「軟體修復」模組中修復軟體(啟用「修復時修正軟體架構」選項),或在頁面底部手動選擇目標架構並修復。",
+
+ "Info":
+ {
+ "N": "版本資訊",
+
+ "ReleaseVersion": "軟體發布版本",
+ "ReleaseDate": "軟體發布時間",
+ "ReleaseArch": "軟體架構及系統架構",
+
+ "ReleaseTag": "軟體構建模式為發布版本(RELEASE)",
+ "DebugTag": "軟體構建模式為非發布調試版本(DEBUG)",
+
+ "ManualBuild": "此版本為手動構建",
+ "AutoBuild": "此版本為自動構建(CI/CD) ",
+ "CICDInfo": "自動構建詳細資訊"
+ },
+ "UserInfo":
+ {
+ "N": "用戶資訊",
+
+ "CopyUserId": "複製用戶ID",
+ "UserId": "用戶ID"
+ },
+ "Repair":
+ {
+ "N": "軟體修復",
+
+ "RepairSoftware": "修復軟體",
+ "RepairSoftwareE": "重新安裝軟體至所選通道的最新版本",
+
+ "RepairArch": "修復時修正軟體架構"
+ },
+ "Update":
+ {
+ "N": "更新偏好",
+
+ "AutoUpate": "自動更新(靜默)",
+ "ChannelTip": "正式通道(LTS) 推送最新的穩定版本,具備較高之穩定性。(推薦)\n預覽通道(Insider) 推送穩定性一般的預覽版本,且可能會被防毒軟體誤報。",
+
+ "Channel":
+ {
+ "N": "目標更新通道",
+
+ "LTS": "正式通道(LTS)",
+ "Insider": "預覽通道(Insider)"
+ },
+ "Arch":
+ {
+ "N": "目標更新架構",
+ "E": "注意:與現在系統不一致的架構可能會導致軟體無法啟動或嚴重效能問題。",
+
+ "64": "64位",
+ "32": "32位",
+ "Arm64": "Arm64"
+ }
+ }
+ },
+ "CICD":
+ {
+ "N": "自動構建詳細資訊",
+
+ "Repository": "構建倉庫",
+ "Branch": "構建分支",
+ "Submitter": "構建提交者",
+ "BuildTime": "構建時間",
+ "BuildSystem": "構建系統",
+ "BuildSystemVersion": "構建系統版本",
+ "RunnerImageSystem": "執行器映像系統",
+ "RunnerImageVersion": "執行器映像版本",
+ "MSBuildVersion": "MSBuild 版本"
+ },
+
+ // ---
+
+ "Regular":
+ {
+ "N": "常規",
+
+ "StartUp":
+ {
+ "N": "開機自動執行與啟動行為",
+
+ "AutoStart": "開機自動啟動",
+ "AutoStartE": "設為目前用戶帳戶開機時啟動 智绘教Inkeys。",
+
+ "Link":
+ {
+ "N": "建立桌面捷徑",
+ "E": "自動修正名稱並建立捷徑,請點選「更多選項」。",
+
+ "More": "更多選項"
+ }
+ },
+ "Appearance":
+ {
+ "N": "外觀樣式",
+
+ "Theme":
+ {
+ "N": "主題",
+ "E": "選擇「推薦皮膚」將會根據官方推薦皮膚自動替換。",
+
+ "Skip1": "推薦皮膚",
+ "Skip2": "預設皮膚",
+ "Skip3": "極簡時鐘",
+ "Skip4": "蛇年迎新"
+ },
+ "SettingUIScale":
+ {
+ "N": "選項介面 UI 縮放",
+ "E": "[需要重啟軟體]縮放比例過高將會佔用大量記憶體空間。",
+
+ "Ind": "{:.2f} 倍縮放"
+ }
+ },
+ "Behavior":
+ {
+ "N": "其他行為",
+
+ "TopWindow":
+ {
+ "N": "置頂間隔",
+ "E": "在非繪圖模式下將依此間隔將視窗置頂,落筆時暫停置頂視窗。間隔越短越能減少其他軟體視窗幹擾,但會消耗較多CPU資源。如果其他軟體視窗持續幹擾,建議使用插件-超級置頂。",
+
+ "100ms": "極短(100ms)",
+ "500ms": "短(500ms)",
+ "1s": "較短(1s)",
+ "3s": "中等(3s)",
+ "5s": "較長(5s)",
+ "10s": "長(10s)",
+ "30s": "極長(30s)"
+ },
+
+ "RightClickClose": "右鍵點擊主圖標關閉程式",
+ "RightClickCloseE": "將會跳出一個確認提示框。",
+ "DrawingRetract": "使用畫筆時收起主欄",
+ "ErasingRetract": "使用橡皮時收起主欄",
+ "DraggingRetract": "拖動主欄時收起主欄",
+ "CheckingRetract": "點擊時收起主欄",
+ "CheckingRetractE": "僅於選擇模式或穿透下,點擊非主欄區時生效。"
+ },
+ "Tentative":
+ {
+ "N": "實驗選項",
+
+ "AvoidFulScreen": "避免全螢幕顯示",
+ "AvoidFulScreenE": "[需要重啟軟體]軟體在非繪圖模式或穿透模式下不會保持全螢幕顯示。這可確保自動隱藏式任務列可正常升起,可能可降低置頂失敗問題,還可能改善任務列無法被觸控的問題。",
+
+ "SafeMode":
+ {
+ "N": "教學安全選項",
+ "E": "軟體發生崩潰錯誤時執行的操作。(啟動過程錯誤仍會提示)",
+
+ "Mode1": "彈窗提示並重啟軟體",
+ "Mode2": "靜默重啟軟體",
+ "Mode3": "交給系統崩潰過濾器處理",
+ "Mode4": "直接關閉軟體"
+ }
+ }
+ },
+ "Draw":
+ {
+ "N": "繪圖",
+
+ "Effect":
+ {
+ "N": "繪圖效果優化",
+
+ "Device":
+ {
+ "N": "繪圖裝置",
+ "E": "我們會根據不同裝置型別優化使用體驗。",
+
+ "Touch": "觸控螢幕",
+ "MousePen": "滑鼠或手寫筆"
+ }
+ },
+ "AIDraw":
+ {
+ "N": "智慧繪圖",
+
+ "PenUp": "抬筆拉直直線",
+ "PenUpE": "目前僅推薦於教學一體機使用。",
+ "PenStay": "停留拉直直線",
+ "PenStayE": "繪製直線完成後按住一秒,直線將被拉直。",
+
+ "EndpointAdsorption": "端點吸附",
+ "EndpointAdsorptionE": "直線和矩形端點將在抬筆時吸附。"
+ },
+ "DrawBehavior":
+ {
+ "N": "繪圖行為",
+
+ "SoomthWriting": "抬筆平滑筆跡"
+ },
+ "RubberThickness":
+ {
+ "N": "橡皮粗細",
+
+ "Calc":
+ {
+ "N": "橡皮粗細計算方式",
+ "E": "若裝置不支援當前選項,軟體會嘗試下個粗細計算方式。",
+
+ "Mode1": "固定粗細",
+ "Mode2": "筆速粗細",
+ "Mode3": "壓感粗細"
+ }
+ },
+ "Tentative":
+ {
+ "N": "實驗選項",
+
+ "HideCursor": "繪圖時隱藏觸控遊標(BETA)",
+ "HideCursorE": "阻止觸控遊標(白色圓點)在畫布上顯示。但是當滑鼠與手寫筆訊號出現時,會恢復顯示滑鼠/筆遊標。"
+ }
+ },
+ "Performance":
+ {
+ "N": "效能",
+
+ "DrawMode":
+ {
+ "N": "繪圖模組",
+
+ "Prepare":
+ {
+ "N": "落筆預備",
+ "E": "越大時越多手指落下會更快開始繪圖,但會佔用更多記憶體。",
+
+ "Ind": "{:d} 指"
+ },
+
+ "SuperDraw": "極限效能繪圖(BETA)",
+ "SuperDrawE": "僅適用於配備強力 CPU 的裝置(重要!否則將造成延遲卡頓)。繪圖模式下取消畫布渲染間隔,額外效能耗損僅於繪圖產生(即非選擇狀態中)。若發現描繪延遲高、不跟手,請關閉此選項。"
+ }
+ },
+ "Preset":
+ {
+ "N": "預設",
+
+ "Memory":
+ {
+ "N": "記憶",
+
+ "Thickness": "記憶繪圖粗細",
+ "ThicknessE": "啟動軟體時讓畫筆與螢光筆粗細與離開時一致。",
+ "Color": "記憶繪圖顏色",
+ "ColorE": "啟動軟體時讓畫筆與螢光筆顏色與離開時一致。"
+ },
+ "Preset":
+ {
+ "N": "預設(未啟動對應繪圖記憶時生效)",
+
+ "AutoThickness": "自適應繪圖粗細",
+ "AutoThicknessE": "啟動時,根據螢幕解析度和實體尺寸自動設定推薦粗細。(畫筆當前為{}px;螢光筆當前為{}px)",
+
+ "Pen": "預設畫筆粗細",
+ "PenInd": "{} px",
+ "Highlighter": "預設螢光筆粗細",
+ "HighlighterInd": "{} px"
+ }
+ },
+ "PlugIn":
+ {
+ "N": "插件",
+
+ "PPTHelper":
+ {
+ "N": "PPT簡報小幫手",
+ "E": "在投影片簡報時提供簡報控制按鈕和畫筆控制按鈕。每頁擁有獨立畫板,可以讓筆跡固定在頁面上。不影響原有功能和外接裝置的使用,支援 Microsoft PowerPoint 和 KingSoft WPS。",
+
+ "VersionError": "版本號未知(插件發生錯誤)",
+ "Solve": "解決方案",
+ "Sync": "同步調節",
+ "Reset": "重設",
+
+ "Tip": "使用插件時需要確保智繪教Inkeys的程式權限和PPT程式是一致的才能正確識別。如果依然存在問題,可以參考解決方案。",
+ "Warn": "偵測到您的PowerPoint/WPS已經設定為一律以系統管理員身分開啟,這意味著程式需要以系統管理員身分執行才能識別到放映處理序並開啟PPT連動。如果您不希望放映軟體一律以系統管理員身分執行,可以參考解決方案。",
+
+ "BasicLogic":
+ {
+ "N": "基礎邏輯",
+
+ "InkFixation": "筆跡固定在對應頁面上",
+ "InkFixationE": "每個PPT頁面都將擁有各自獨立的畫布,並可以實現類似PPT內建畫筆的效果。翻頁不會清空之前頁面所繪製的筆跡,可以返回之前的頁面繼續繪製。",
+ "LoadPage": "顯示載入頁面",
+ "LoadPageE": "包含插件標識和小提示等,每個 PPT 僅顯示一次。"
+ },
+ "WidgetDisplay":
+ {
+ "N": "控制項顯示",
+
+ "BottomBoth": "顯示底部兩側控制項",
+ "MiddleBoth": "顯示中部兩側控制項",
+ "BottomMiddle": "顯示底部主欄控制項"
+ },
+ "WidgetPosition":
+ {
+ "N": "控制項位置",
+
+ "Reset": "重設控制項位置",
+ "Remember": "記憶控制項位置"
+ },
+ "WidgetScale":
+ {
+ "N": "控制項縮放",
+ "Ind": "{:.2f} 倍縮放",
+
+ "Page":
+ {
+ "BottomSideBoth": "底部兩側控制項縮放",
+ "MiddleSideBoth": "中部兩側控制項縮放"
+ },
+ "State":
+ {
+ "BottomSideMiddle": "底部主欄控制項縮放"
+ }
+ },
+ "Tentative":
+ {
+ "N": "實驗性選項",
+
+ "CloseWpp": "允許關閉遊離卡死的 WPP 簡報處理序",
+ "CloseWppE": "重啟軟體生效。在WPS退出放映後,原來的WPP簡報處理序並不會立即關閉,而是保持遊離卡死狀態。此時再次開始放映PPT則無法立即識別到放映處理序並開啟PPT連動。開啟此選項將幫助關閉遊離卡死的WPP放映處理序,這不會對您的檔案造成影響,推薦開啟。"
+ }
+ },
+ "SuperTop":
+ {
+ "N": "超級置頂",
+ "E": "使用UiAccess技術在其他常規軟體之上顯示軟體視窗,亦或是在工作列、Alt+Tab、螢幕小鍵盤、鎖定畫面等上方顯示軟體視窗。僅支援Windows 8及以上系統。",
+
+ "Warn": "超級置頂插件處於 BETA 階段,可能遇到不穩定的問題。\n軟體在啟動時會透過再次執行自身的方式來提升權限,提升權限成功後再執行新的軟體執行個體。\n該過程可能失敗,導致錯誤地啟動擁有系統管理員權限的軟體,可能會影響 PPT 連動。\n過程中會彈出 UAC 確認對話方塊,請點擊確認或關閉 UAC 提示(不推薦)。\n過程中可能被防毒軟體誤報,這是正常現象。",
+
+ "Capability":
+ {
+ "N": "基礎功能",
+
+ "SuperTop": "超級置頂",
+ "SuperTopE1": "軟體將三段式啟動進行置頂,小機率出現問題導致置頂失敗。重啟後生效。\n(目前已經超級置頂)",
+ "SuperTopE2": "軟體將三段式啟動進行置頂,小機率出現問題導致置頂失敗。重啟後生效。\n(目前尚未超級置頂)",
+
+ "Indicator": "超級置頂指示器",
+ "IndicatorE": "軟體成功被超級置頂時,在主圖示右上角顯示一個大頭針。"
+ }
+ },
+ "DesktopDrawpadBlocker":
+ {
+ "N": "同類軟體懸浮視窗攔截小幫手",
+ "E": "攔截螢幕上 希沃白板桌面懸浮視窗 等同類軟體懸浮視窗。支援攔截常見同類軟體懸浮視窗,以及 PPT 小工具等 PPT 操控欄。"
+ },
+ "LnkHelper":
+ {
+ "N": "捷徑保障小幫手",
+ "E": "在程式啟動時確保已經建立的智绘教Inkeys捷徑是有效的。因為程式更新會修改檔案名稱,這會導致捷徑失效。可選的,如果桌面沒有智绘教Inkeys的捷徑,則建立一個。",
+
+ "Capability":
+ {
+ "N": "基礎功能",
+
+ "FixLnk": "修正桌面捷徑指向和名稱",
+ "FixLnkE": "軟體啟動時將修正桌面已經存在的軟體捷徑。軟體自動更新後可能會改變檔案名,推薦開啟。"
+ },
+ "Expansion":
+ {
+ "N": "擴充選項",
+
+ "CreateLnk": "建立桌面捷徑",
+ "CreateLnkE": "當桌面不存在軟體的捷徑時,則建立一個。"
+ }
+ }
+ },
+ "Component":
+ {
+ "N": "元件"
+ },
+ "HotKey":
+ {
+ "N": "快捷鍵",
+ "E": "全域快捷鍵:\nCtrl + Win + Alt 切換選擇 / 繪圖模式\n\n繪圖模式下:\nCtrl + Q 定格\nCtrl + E 穿透\nCtrl + Z 撤回 / 超級回復\n\n其他快捷鍵與自訂快捷鍵功能測試中,敬請期待"
+ },
+
+ // ---
+
+ "Community":
+ {
+ "N": "社區名片"
+ },
+ "Sponsor":
+ {
+ "N": "贊助我們"
+ },
+
+ // ---
+
+ "RestartSoftware":
+ {
+ "N": "重啟軟體"
+ },
+ "ExitSoftware":
+ {
+ "N": "關閉軟體"
+ },
+ "DebugSoftware":
+ {
+ "N": "除錯軟體"
+ },
+
+ // ---
+
+ "Update":
+ {
+ "Check": "檢查更新",
+
+ "Channel":
+ {
+ "LTS": "正式通道",
+ "Insider": "預覽通道",
+ "Dev": "開發通道",
+ "Other": "其他通道"
+ },
+
+ "NotStarted": "新版本檢查未啟動",
+ "ObtainInformation": "取得新版本資訊中",
+ "InformationFail": "下載版本資訊失敗",
+ "InformationDamage": "下載版本資訊損壞",
+ "InformationUnStandardized": "下載版本資訊不符合規範",
+ "Downloading": "新版本正高速下載中",
+ "DownloadFail": "下載最新版軟體失敗",
+ "DownloadDamage": "下載最新版軟體損壞",
+ "Restart": "重啟軟體升級至最新版",
+ "Latest": "軟體已為最新版",
+ "Newer": "軟體相對最新版更新",
+ "New": "發現軟體新版本",
+
+ "Repair": "嘗試修復",
+ "ManualDownload": "手動下載最新版",
+ "UpdateNow": "更新到最新版"
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\346\231\272\347\273\230\346\225\231/src/setting/Home1_en-US.png" "b/\346\231\272\347\273\230\346\225\231/src/setting/Home1_en-US.png"
index fba9a2b..d6b10a7 100644
Binary files "a/\346\231\272\347\273\230\346\225\231/src/setting/Home1_en-US.png" and "b/\346\231\272\347\273\230\346\225\231/src/setting/Home1_en-US.png" differ
diff --git "a/\346\231\272\347\273\230\346\225\231/src/setting/Home1_zh-TW.png" "b/\346\231\272\347\273\230\346\225\231/src/setting/Home1_zh-TW.png"
new file mode 100644
index 0000000..6faf380
Binary files /dev/null and "b/\346\231\272\347\273\230\346\225\231/src/setting/Home1_zh-TW.png" differ
diff --git "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.aps" "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.aps"
index 851c5f9..f497af2 100644
Binary files "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.aps" and "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.aps" differ
diff --git "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.rc" "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.rc"
index c06fed1..3ffa570 100644
--- "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.rc"
+++ "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.rc"
@@ -155,6 +155,10 @@ PLUGINFLAG4 PNG "src\\PluginFlag4.png"
ICON21 PNG "src\\pin.png"
+HOME1_ZH-TW PNG "src\\setting\\Home1_zh-TW.png"
+
+HOME2_ZH-TW PNG "src\\setting\\Home2_zh-TW.png"
+
/////////////////////////////////////////////////////////////////////////////
//
@@ -246,9 +250,11 @@ END
// JSON
//
-IDR_ZH_CN JSON "src\\i18n\\zh-CN.json"
+IDR_ZH_CN JSON "src\\i18n\\zh-CN.jsonc"
+
+IDR_EN_US JSON "src\\i18n\\en-US.jsonc"
-IDR_EN_US JSON "src\\i18n\\en-US.json"
+IDR_ZH_TW JSON "src\\i18n\\zh-TW.jsonc"
#endif // 中文(简体,中国) resources
/////////////////////////////////////////////////////////////////////////////
diff --git "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj" "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj"
index 297cf8e..f462249 100644
--- "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj"
+++ "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj"
@@ -510,6 +510,7 @@
+
@@ -518,6 +519,7 @@
+
@@ -661,8 +663,10 @@
+
+
@@ -699,8 +703,9 @@
-
-
+
+
+
diff --git "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj.filters" "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj.filters"
index ce8e086..a1be47d 100644
--- "a/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj.filters"
+++ "b/\346\231\272\347\273\230\346\225\231/\346\231\272\347\273\230\346\225\231.vcxproj.filters"
@@ -85,6 +85,12 @@
{0f3ba083-e762-42d7-aeef-aa8d13bc8b3a}
+
+ {3dca3d99-88e0-429c-8cb3-d5c289d5a08c}
+
+
+ {a73c31b1-6419-42a0-a606-f17415f934a6}
+
@@ -726,6 +732,12 @@
头文件\SuperTop
+
+ 头文件\SuperTop
+
+
+ 头文件\Inkeys\Json
+
@@ -1209,6 +1221,12 @@
资源文件
+
+ 资源文件
+
+
+ 资源文件
+
@@ -1219,14 +1237,15 @@
-
-
头文件\Additional\JsonCpp\lib_json
头文件\Additional\SpdLog\fmt\bundled
+
+
+