思想确认,具体请看群内,正在进一步修改UI,以及插件效果。

This commit is contained in:
EillesWan 2022-02-07 18:51:51 +08:00
parent aa210ac678
commit 320114533d
7 changed files with 87 additions and 9 deletions

View File

@ -37,11 +37,11 @@ from msctspt.bugReporter import version
__ver__ = f'{version.version[1]} {version.version[0]}'
__author__ = '金羿Eilles'
from msctLib.display import *
from msctLib.function import *
from msctLib.data import uniteIO
@ -50,7 +50,11 @@ __author__ = '金羿Eilles'
def __main__():
pass
disp(
root,
False,
)

View File

@ -61,9 +61,7 @@ from nmcsup.vers import VER
__version__ = VER[1] + VER[0]
__author__ = '金羿Eilles & 诸葛亮与八卦阵bgArray'
dire = ""
begp = ""
endp = ""
print('建立变量,存入内存,载入字典常量函数')

BIN
msctLib/UI设计图.pdn Normal file

Binary file not shown.

BIN
msctLib/UI设计图.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -8,6 +8,8 @@ import tkinter as tk
import tkinter.simpledialog as sdialog
import tkinter.filedialog as fdialog
from tkinter import *
root = tk.Tk()
class disp:
@ -21,9 +23,22 @@ class disp:
'title' : self.setTitle,
'geometry': self.setGeometry,
'iconbitmap': self.setIcon,
'menu': self.setMenu,
'widget': self.setWidget,
}
'''此处为引导传参若传参错误且debug模式关闭则不会有任何反馈'''
for func,args in kwgs:
if func in self.FUNCLIST.keys():
if type(args) == type([]):
self.FUNCLIST[func](*args)
if type(args) == type({}):
self.FUNCLIST[func](**args)
else:
self.FUNCLIST[func](args)
elif debug:
raise KeyError(f'无法定位函数{func}')
def setTitle(self,title:str = '') -> None:
self.root.title = title
@ -45,3 +60,14 @@ class disp:
menu.add_separator()
mainMenuBar.add_cascade(label=menuName,menu=menu)
menus.append(menu)
def setWidget(self,**kwgs) -> None:
pass
class ProgressBar:
def __init__(self,root) -> None:
pass

6
msctLib/function.py Normal file
View File

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
'''音·创的内置功能库
:若要加入其他功能详见
:开发说明|指南'''

View File

@ -25,7 +25,7 @@ functions.py中会调取./addon/目录下的全部功能文件,这些功能文
例如:
```python
{
'version': '0.0.1' # version指的是
'version': '0.0.1', # version指的是当前配置格式的版本
'title': "音·创",
'geometry': '1200x900',
'iconbitmap': ('./resources/musicreater.ico', './resources/musicreater.ico'),
@ -35,7 +35,51 @@ functions.py中会调取./addon/目录下的全部功能文件,这些功能文
'打开': lambda : x,
},
},
'widget': { #对窗口部件又详细说明
'wordview':{
'text':'言·论',
'bg':'black',
'fg':'white'
},
'settingbox':{}, #后文详细说明
'tracklist':{},
'operation':{},
'map':{},
},
}
```
- 函数
1. `setMenu`对菜单的基础设定
```python
{
菜单名 : {
选项名 : 选项函数
}
}
```
注:
`菜单名` : `str` 显示在菜单上的字符串
`选项名` : `str` 显示在菜单选项上的字符串
`选项函数` : `function` 菜单调取的函数(无返回值,无入参)
2. `setWidget`对窗口部件的放置
```python
wordview:dict = {
'text':'言·论',
'bg':'black',
'fg':'white'
},
settingbox:{}, #后文详细说明
tracklist:{},
operation:{},
map:{},
```
注: