mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-02-08 03:46:54 +08:00
新增滑块
This commit is contained in:
parent
4bd7fca256
commit
1bc1c6485b
@ -241,7 +241,7 @@ def __main__():
|
|||||||
root.destroy()
|
root.destroy()
|
||||||
del root
|
del root
|
||||||
except:
|
except:
|
||||||
pass;
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -986,17 +986,17 @@ def __main__():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
print('生成部分及其余命令加载完成!');
|
print('生成部分及其余命令加载完成!')
|
||||||
|
|
||||||
|
|
||||||
print('完成!');
|
print('完成!')
|
||||||
|
|
||||||
# 窗口部分
|
# 窗口部分
|
||||||
print('增加窗口元素...');
|
print('增加窗口元素...')
|
||||||
global root
|
global root
|
||||||
|
|
||||||
root.title(u'音·创 - 金羿 - '+VER[1]+VER[0]);
|
root.title(u'音·创 - 金羿 - '+VER[1]+VER[0])
|
||||||
root.geometry('800x800'); # 像素
|
root.geometry('900x900') # 像素
|
||||||
|
|
||||||
print('完成!')
|
print('完成!')
|
||||||
|
|
||||||
@ -1154,6 +1154,8 @@ def __main__():
|
|||||||
RefreshMusic(NowMusic)
|
RefreshMusic(NowMusic)
|
||||||
|
|
||||||
|
|
||||||
|
from nmcsup.vers import resetver
|
||||||
|
|
||||||
print('按钮点击命令加载完成!')
|
print('按钮点击命令加载完成!')
|
||||||
|
|
||||||
print('完成!')
|
print('完成!')
|
||||||
@ -1242,7 +1244,7 @@ def __main__():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
from nmcsup.vers import resetver
|
|
||||||
|
|
||||||
# 创建帮助菜单
|
# 创建帮助菜单
|
||||||
helpmenu = tk.Menu(main_menu_bar, tearoff=0)
|
helpmenu = tk.Menu(main_menu_bar, tearoff=0)
|
||||||
@ -1260,98 +1262,101 @@ def __main__():
|
|||||||
|
|
||||||
# 窗口内容
|
# 窗口内容
|
||||||
|
|
||||||
|
|
||||||
|
#上半部分框
|
||||||
UpFrame = tk.Frame(root)
|
UpFrame = tk.Frame(root)
|
||||||
|
|
||||||
|
|
||||||
|
#左边的框(音乐总设置)
|
||||||
UpLeftFrame = tk.Frame(UpFrame, bg='white')
|
UpLeftFrame = tk.Frame(UpFrame, bg='white')
|
||||||
|
# 大标题
|
||||||
# 文本
|
|
||||||
tk.Label(UpLeftFrame, text='音乐总设置(项目设置)', font=('', 20)).pack()
|
tk.Label(UpLeftFrame, text='音乐总设置(项目设置)', font=('', 20)).pack()
|
||||||
|
# 按钮式文本
|
||||||
LabelPackName = tk.Label(UpLeftFrame, bg='white', text='地图/函数包名: ', font=('', 15))
|
LabelPackName = tk.Label(UpLeftFrame, bg='white', text='地图/函数包名: ', font=('', 15))
|
||||||
LabelMusicTitle = tk.Label(UpLeftFrame, bg='white',text='音乐标题: ', font=('', 15))
|
LabelMusicTitle = tk.Label(UpLeftFrame, bg='white',text='音乐标题: ', font=('', 15))
|
||||||
LabelIsRepeat = tk.Label(UpLeftFrame, bg='white', text='是否重复: ', font=('', 15))
|
LabelIsRepeat = tk.Label(UpLeftFrame, bg='white', text='是否重复: ', font=('', 15))
|
||||||
LabelPlayerSelect = tk.Label(UpLeftFrame, bg='white', text='玩家选择器:', font=('', 15))
|
LabelPlayerSelect = tk.Label(UpLeftFrame, bg='white', text='玩家选择器:', font=('', 15))
|
||||||
|
# 绑定按钮
|
||||||
LabelPackName.bind("<Button-1>", changePackName)
|
LabelPackName.bind("<Button-1>", changePackName)
|
||||||
LabelMusicTitle.bind("<Button-1>", changeMusicTitle)
|
LabelMusicTitle.bind("<Button-1>", changeMusicTitle)
|
||||||
LabelIsRepeat.bind("<Button-1>", changeIsRepeat)
|
LabelIsRepeat.bind("<Button-1>", changeIsRepeat)
|
||||||
LabelPlayerSelect.bind("<Button-1>", changePlayerSelect)
|
LabelPlayerSelect.bind("<Button-1>", changePlayerSelect)
|
||||||
|
# 装入容器
|
||||||
LabelPackName.pack()
|
LabelPackName.pack()
|
||||||
LabelMusicTitle.pack()
|
LabelMusicTitle.pack()
|
||||||
LabelIsRepeat.pack()
|
LabelIsRepeat.pack()
|
||||||
LabelPlayerSelect.pack()
|
LabelPlayerSelect.pack()
|
||||||
|
|
||||||
# 按钮:重置项目设置
|
# 按钮:重置项目设置
|
||||||
tk.Button(UpLeftFrame, text='重置项目设置', command=ResetSetting).pack()
|
tk.Button(UpLeftFrame, text='重置项目设置', command=ResetSetting).pack()
|
||||||
|
#装入窗口
|
||||||
|
UpLeftFrame.pack(side='left')
|
||||||
|
|
||||||
|
|
||||||
UpLeftFrame.pack(side=tk.LEFT)
|
|
||||||
|
|
||||||
|
|
||||||
|
# 中间的框容器
|
||||||
UpMidleFrame = tk.Frame(UpFrame, bg='blue')
|
UpMidleFrame = tk.Frame(UpFrame, bg='blue')
|
||||||
|
# 列表
|
||||||
MusicList_var = tk.StringVar()
|
MusicList_var = tk.StringVar()
|
||||||
ListMusicList = tk.Listbox(UpMidleFrame, listvariable=MusicList_var)
|
ListMusicList = tk.Listbox(UpMidleFrame, listvariable=MusicList_var)
|
||||||
|
|
||||||
ListMusicList.bind('<ButtonRelease-1>', MusicList_selected) # 设置选中响应函数
|
ListMusicList.bind('<ButtonRelease-1>', MusicList_selected) # 设置选中响应函数
|
||||||
|
ListMusicList.pack(side='left')
|
||||||
ListMusicList.pack()
|
# 滑块
|
||||||
|
tk.Scrollbar(UpMidleFrame,command=ListMusicList.yview).pack(side='left',fill='y')
|
||||||
|
#装入窗口
|
||||||
|
UpMidleFrame.pack(side='left')
|
||||||
|
|
||||||
|
|
||||||
UpMidleFrame.pack(side=tk.LEFT)
|
|
||||||
|
|
||||||
|
|
||||||
|
#右边的框容器
|
||||||
UpRightFrame = tk.Frame(UpFrame, bg='white')
|
UpRightFrame = tk.Frame(UpFrame, bg='white')
|
||||||
|
# 大标题
|
||||||
|
|
||||||
tk.Label(UpRightFrame, text='当前音轨设置(段落设置)', font=('', 20)).pack()
|
tk.Label(UpRightFrame, text='当前音轨设置(段落设置)', font=('', 20)).pack()
|
||||||
|
# 按钮式文本
|
||||||
LabelEntityName = tk.Label(UpRightFrame, bg='white',text='执行实体名: ', font=('', 15))
|
LabelEntityName = tk.Label(UpRightFrame, bg='white',text='执行实体名: ', font=('', 15))
|
||||||
LabelScoreboardName = tk.Label(UpRightFrame, bg='white', text='使用计分板: ', font=('', 15))
|
LabelScoreboardName = tk.Label(UpRightFrame, bg='white', text='使用计分板: ', font=('', 15))
|
||||||
LabelInstrument = tk.Label(UpRightFrame, bg='white',text='所用的乐器: ', font=('', 15))
|
LabelInstrument = tk.Label(UpRightFrame, bg='white',text='所用的乐器: ', font=('', 15))
|
||||||
LabelFileName = tk.Label(UpRightFrame, bg='white',text='当前音轨名: ', font=('', 15))
|
LabelFileName = tk.Label(UpRightFrame, bg='white',text='当前音轨名: ', font=('', 15))
|
||||||
|
# 绑定按钮
|
||||||
|
|
||||||
LabelEntityName.bind("<Button-1>", changeEntityName)
|
LabelEntityName.bind("<Button-1>", changeEntityName)
|
||||||
LabelScoreboardName.bind("<Button-1>", changeScoreboardName)
|
LabelScoreboardName.bind("<Button-1>", changeScoreboardName)
|
||||||
LabelInstrument.bind("<Button-1>", changeInstrument)
|
LabelInstrument.bind("<Button-1>", changeInstrument)
|
||||||
LabelFileName.bind("<Button-1>", changeFileName)
|
LabelFileName.bind("<Button-1>", changeFileName)
|
||||||
|
# 装入框容器
|
||||||
|
|
||||||
LabelEntityName.pack()
|
LabelEntityName.pack()
|
||||||
LabelScoreboardName.pack()
|
LabelScoreboardName.pack()
|
||||||
LabelInstrument.pack()
|
LabelInstrument.pack()
|
||||||
LabelFileName.pack()
|
LabelFileName.pack()
|
||||||
|
|
||||||
# 按钮:删除选中音轨
|
# 按钮:删除选中音轨
|
||||||
tk.Button(UpRightFrame, text='删除选中音轨', command=DelNowMusic).pack()
|
tk.Button(UpRightFrame, text='删除选中音轨', command=DelNowMusic).pack()
|
||||||
|
#装入窗口
|
||||||
|
UpRightFrame.pack(side='left')
|
||||||
|
|
||||||
|
#上半部分框容器装入窗口
|
||||||
UpRightFrame.pack(side=tk.LEFT)
|
|
||||||
|
|
||||||
|
|
||||||
UpFrame.pack()
|
UpFrame.pack()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 下半部分框容器
|
||||||
DownFrame = tk.Frame(root, bg='blue')
|
DownFrame = tk.Frame(root, bg='blue')
|
||||||
|
|
||||||
|
|
||||||
# 音符列表菜单
|
# 音符列表菜单
|
||||||
NoteList_var = tk.StringVar()
|
NoteList_var = tk.StringVar()
|
||||||
ListNoteList = tk.Listbox(DownFrame, listvariable=NoteList_var, width=40, height=30)
|
ListNoteList = tk.Listbox(DownFrame, listvariable=NoteList_var, width=40, height=30)
|
||||||
|
|
||||||
ListNoteList.bind('<ButtonRelease-1>', NoteList_selected) # 设置选中响应函数
|
ListNoteList.bind('<ButtonRelease-1>', NoteList_selected) # 设置选中响应函数
|
||||||
|
ListNoteList.pack(side='left')
|
||||||
ListNoteList.pack(side=tk.LEFT)
|
# 音符列表滑块
|
||||||
|
tk.Scrollbar(DownFrame,command=ListNoteList.yview).pack(side='left',fill='y')
|
||||||
|
|
||||||
|
|
||||||
# 指令列表菜单
|
# 指令列表菜单
|
||||||
ListCMDList = tk.Text(DownFrame)
|
ListCMDList = tk.Text(DownFrame,height=37,width=40)
|
||||||
|
ListCMDList.pack(side='left')
|
||||||
ListCMDList.pack(side=tk.RIGHT)
|
# 指令列表滑块
|
||||||
|
tk.Scrollbar(DownFrame,command=ListCMDList.yview).pack(fill='y',side='left')
|
||||||
|
|
||||||
|
# 下半部分容器载入窗口
|
||||||
DownFrame.pack()
|
DownFrame.pack()
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user