终于……我知道Text组件怎么用了

This commit is contained in:
EillesWan 2022-03-19 11:58:28 +08:00
parent 629cfa402b
commit 82850a3d74
7 changed files with 63 additions and 10 deletions

View File

@ -176,7 +176,7 @@
END OF TERMS AND CONDITIONS
Copyright 2022 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
Copyright 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -5,12 +5,17 @@
# QQ 2647547478
# 音·创 开发交流群 861684859
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
# 版权所有 Team-Ryoun 金羿
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
# 若需转载或借鉴 请附作者
"""
Copyright 2022 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
· (Musicreater)
一款免费开源的 我的世界基岩版 音乐制作软件
Musicreater (·)
A free opensource software which is used for creating all kinds of musics in Minecraft
Copyright 2022 Team-Ryoun
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.

View File

@ -5,12 +5,17 @@
# QQ 2647547478
# 音·创 开发交流群 861684859
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
# 版权所有 Team-Ryoun 金羿
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
# 若需转载或借鉴 请附作者
"""
Copyright 2022 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
· (Musicreater)
一款免费开源的 我的世界基岩版 音乐制作软件
Musicreater (·)
A free opensource software which is used for creating all kinds of musics in Minecraft
Copyright 2022 Team-Ryoun
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.

View File

@ -1,7 +1,7 @@
# 音·创 Musicreater
### 介绍
音·创 Musicreater 是由金羿(*W-YI*)开发的一款 **《我的世界:基岩版》** 音乐生成辅助软件
音·创 Musicreater 是由凌天之云创新应用软件开发团队开发的一款免费开源的 **《我的世界:基岩版》** 音乐制作软件
欢迎加群861684859

View File

@ -0,0 +1,5 @@
zh-CN
简体中文 中国大陆
Simplified Chinese, Chinese Mainland
简体中文 中国大陆

View File

@ -1,16 +1,19 @@
# -*- coding:utf-8 -*-
'''此功能已废弃'''
# W-YI 金羿
# QQ 2647547478
# 音·创 开发交流群 861684859
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
# 版权所有 Team-Ryoun 金羿
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
# 若需转载或借鉴 请附作者
"""
Copyright 2022 Eilles Wan (金羿)
Copyright 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.

View File

@ -1,6 +1,29 @@
# -*- coding:utf-8 -*-
'''对于音·创的语言支持兼语言文件编辑器'''
"""
Copyright 2022 Team-Ryoun
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
DEFAULTLANGUAGE = 'zh-CN'
LANGUAGELIST = {
@ -115,6 +138,7 @@ if __name__ == '__main__':
initialfile='.lang')
_TEXT = __loadLanguage(fileName)
DEFAULTLANGUAGE = _('LANGKEY')
LANGNAME = _('LANGLOCALNAME')
orignText = ''
transText = ''
@ -125,11 +149,21 @@ if __name__ == '__main__':
Origntextbar.insert('end', orignText)
Translatetextbar.insert('end', transText)
global setlangbutton
setlangbutton['text'] = f'对标语言{LANGNAME}'
def _autoSave(event = None):
with open('autosave.tmp.txt','w',encoding='utf-8') as f:
f.write(Translatetextbar.get(1.0,'end'))
print(str(event))
root = tk.Tk()
root.geometry('600x500')
root.bind_all(func=_autoSave)
nowText = ''
Orignrame = tk.Frame(root,bd=2)
@ -141,14 +175,15 @@ if __name__ == '__main__':
Translatetextbar = tk.Text(Translaterame,width=40,height=37)
Translatescrollbar = tk.Scrollbar(Translaterame)
tk.Button(Translaterame,text='保存',command=None).pack(side='bottom',fill='x')
tk.Button(Translaterame,text='保存',command=_autoSave).pack(side='bottom',fill='x')
tk.Label(Orignrame,text='中文原文').pack(side='top')
Origntextbar.pack(side='left', fill='y')
Orignscrollbar.pack(side='left', fill='y')
tk.Button(Translaterame,text=f'对标语言{LANGNAME}',command=_changeDefaultLang).pack(side='top')
setlangbutton = tk.Button(Translaterame,text=f'对标语言{LANGNAME}',command=_changeDefaultLang)
setlangbutton.pack(side='top')
Translatescrollbar.pack(side='right', fill='y')
Translatetextbar.pack(side='right', fill='y')