mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-03-13 12:21:36 +08:00
思想确认,具体请看群内,正在进一步修改UI,以及插件效果。
This commit is contained in:
parent
aa210ac678
commit
320114533d
@ -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,
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
@ -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
BIN
msctLib/UI设计图.pdn
Normal file
Binary file not shown.
BIN
msctLib/UI设计图.png
Normal file
BIN
msctLib/UI设计图.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -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
|
||||
|
||||
@ -44,4 +59,15 @@ class disp:
|
||||
else:
|
||||
menu.add_separator()
|
||||
mainMenuBar.add_cascade(label=menuName,menu=menu)
|
||||
menus.append(menu)
|
||||
menus.append(menu)
|
||||
|
||||
def setWidget(self,**kwgs) -> None:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
class ProgressBar:
|
||||
|
||||
def __init__(self,root) -> None:
|
||||
pass
|
6
msctLib/function.py
Normal file
6
msctLib/function.py
Normal file
@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''音·创的内置功能库
|
||||
:若要加入其他功能,详见:
|
||||
:开发说明|指南'''
|
||||
|
||||
|
@ -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:{},
|
||||
```
|
||||
注:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user