Skip to content

Commit

Permalink
换新字体
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Aug 18, 2022
1 parent 52fe841 commit c350c4d
Show file tree
Hide file tree
Showing 14 changed files with 412 additions and 260 deletions.
570 changes: 359 additions & 211 deletions assets/char.lua

Large diffs are not rendered by default.

Binary file added assets/font/Inter-ExtraBold.otf
Binary file not shown.
Binary file added assets/font/Inter-Regular.otf
Binary file not shown.
Binary file added assets/font/Inter-SemiBold.otf
Binary file not shown.
Binary file removed assets/font/proportional.ttf
Binary file not shown.
Binary file added assets/font/symbols.otf
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/scene/error.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ end

scene.widgetList={
WIDGET.new{type='button',x=940,y=640,w=170,h=80,sound='key',fontSize=65,text=CHAR.icon.console,code=WIDGET.c_goScn'_console'},
WIDGET.new{type='button',x=1140,y=640,w=170,h=80,sound='key',fontSize=40,text=CHAR.icon.cross_thick,code=love.event.quit},
WIDGET.new{type='button',x=1140,y=640,w=170,h=80,sound='key',fontSize=40,text=CHAR.icon.cross_big,code=love.event.quit},
}

return scene
2 changes: 1 addition & 1 deletion assets/scene/game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,6 @@ end

scene.widgetList={
WIDGET.new{type='button',pos={0,0},x=40,y=60,w=50, sound='back',text=CHAR.icon.back,code=WIDGET.c_backScn},
WIDGET.new{type='button',pos={0,0},x=100,y=60,w=50,sound='key',text=CHAR.icon.retry_spin,code=WIDGET.c_pressKey'restart'},
WIDGET.new{type='button',pos={0,0},x=100,y=60,w=50,sound='key',text=CHAR.icon.retry,code=WIDGET.c_pressKey'restart'},
}
return scene
4 changes: 2 additions & 2 deletions assets/scene/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ scene.widgetList={
WIDGET.new{type='button_fill',x=200,y=80,w=100, color='lI',fontSize=70,text=CHAR.icon.language, code=WIDGET.c_goScn'lang'},
WIDGET.new{type='button_fill',x=240,y=450,w=280,h=120, color="lR",fontSize=45,text=LANG'main_play', code=WIDGET.c_goScn'mapSelect'},
WIDGET.new{type='button_fill',x=640,y=450,w=280,h=120, color="lB",fontSize=45,text=LANG'main_setting', code=WIDGET.c_goScn'setting'},
WIDGET.new{type='button_fill',x=240,y=600,w=95, color="lY",fontSize=70,text=CHAR.key.winMenu, code=WIDGET.c_goScn'stat'},
WIDGET.new{type='button_fill',x=240,y=600,w=95, color="lY",fontSize=70,text=CHAR.icon.info_circ, code=WIDGET.c_goScn'stat'},
WIDGET.new{type='button_fill',x=1040,y=450,w=280,h=120,color="D",fontSize=45,text=LANG'main_editor', code=function() MES.new('info',"Coming soon",1.26) tryCounter=(tryCounter+1)%12 if tryCounter==0 then SCN.go('_console') end end},
WIDGET.new{type='button_fill',x=1040,y=600,w=95, color="G",fontSize=70,text=CHAR.icon.zBook, code=function() love.system.openURL("https://github.com/26F-Studio/Quatrack/wiki/beatmap") end},
WIDGET.new{type='button_fill',x=1040,y=600,w=95, color="G",fontSize=70,text=CHAR.icon.zictionary, code=function() love.system.openURL("https://github.com/26F-Studio/Quatrack/wiki/beatmap") end},
}

return scene
6 changes: 3 additions & 3 deletions assets/scene/mapSelect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local listBox=WIDGET.new{
GC.setColor(COLOR.L)
GC.draw(v.mapAuth,930,-1,nil,min(230/v.mapAuth:getWidth(),1),1,v.mapAuth:getWidth(),0)

FONT.set(30,'mono')
FONT.set(30)
GC.setColor(v.difficultyColor)
GC.draw(v.difficulty,1050-v.difficulty:getWidth(),2)
GC.setColor(COLOR.lS)
Expand Down Expand Up @@ -163,7 +163,7 @@ end

scene.widgetList={
listBox,
WIDGET.new{type='button_fill',pos={0,1},x=160,y=-80,w=200,h=80,text=CHAR.icon.import,color='lV',fontSize=60,
WIDGET.new{type='button_fill',pos={0,1},x=160,y=-80,w=200,h=80,text=CHAR.icon.download,color='lV',fontSize=60,
code=function()
if not MOBILE then
love.system.openURL(love.filesystem.getSaveDirectory()..'/songs')
Expand All @@ -172,7 +172,7 @@ scene.widgetList={
end
end
},
WIDGET.new{type='button_fill',pos={0,1},x=320,y=-80,w=80,text=CHAR.icon.retry_spin,color='lB',fontSize=50,code=_freshSongList,visibleFunc=function() return love.timer.getTime()-lastFreshTime>2.6 end},
WIDGET.new{type='button_fill',pos={0,1},x=320,y=-80,w=80,text=CHAR.icon.retry,color='lB',fontSize=50,code=_freshSongList,visibleFunc=function() return love.timer.getTime()-lastFreshTime>2.6 end},
WIDGET.new{type='button_fill',pos={.5,1},y=-80,w=140,h=80,text=CHAR.icon.play,color='lG',fontSize=60,code=WIDGET.c_pressKey'return'},
sortSelector,
WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn},
Expand Down
2 changes: 1 addition & 1 deletion assets/scene/result.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function scene.draw()
end

scene.widgetList={
WIDGET.new{type='button_fill',pos={1,1},x=-300,y=-80,w=160,h=80,fontSize=60,text=CHAR.icon.retry_spin,code=WIDGET.c_pressKey'restart'},
WIDGET.new{type='button_fill',pos={1,1},x=-300,y=-80,w=160,h=80,fontSize=60,text=CHAR.icon.retry,code=WIDGET.c_pressKey'restart'},
WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn},
}
return scene
2 changes: 1 addition & 1 deletion assets/scene/setting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ scene.widgetList={

WIDGET.new{type='switch', pos={1,0},x=-100,y=520, text=LANG'setting_showTouch', widthLimit=360,disp=SETval('showTouch'), code=SETrev('showTouch')},

WIDGET.new{type='button_fill',pos={1,1},x=-320,y=-80,w=160,h=80,fontSize=60,text=CHAR.key.keyboard,code=WIDGET.c_goScn'setting_key'},
WIDGET.new{type='button_fill',pos={1,1},x=-320,y=-80,w=160,h=80,fontSize=60,text=CHAR.icon.keyboard,code=WIDGET.c_goScn'setting_key'},

WIDGET.new{type='button_fill',pos={1,1},x=-120,y=-80,w=160,h=80,sound='back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn},
}
Expand Down
74 changes: 37 additions & 37 deletions assets/scene/setting_key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ local keyNames={
f1='F1',f2='F2',f3='F3',f4='F4',f5='F5',f6='F6',
f7='F7',f8='F8',f9='F9',f10='F10',f11='F11',f12='F12',
backspace=CHAR.key.backspace,
['return']=CHAR.key.enter_or_return,
kpenter='kp'..CHAR.key.enter_or_return,
['return']=CHAR.key.returnKey,
kpenter='kp'..CHAR.key.returnKey,
tab=CHAR.key.tab,
capslock=CHAR.key.capslock,
lshift='L shift',
Expand All @@ -31,52 +31,52 @@ local keyNames={
[' end']=' End',
insert='Ins',
numlock='Numlock',
menu=CHAR.key.winMenu,
menu=CHAR.key.menu,
up=CHAR.key.up,
down=CHAR.key.down,
left=CHAR.key.left,
right=CHAR.key.right,
},
apple={
kpenter=CHAR.key.macEnter,
tab=CHAR.key.mactab,
kpenter=CHAR.key.mac_enter,
tab=CHAR.key.mac_tab,
lshift='L'..CHAR.key.shift,
rshift='R'..CHAR.key.shift,
lctrl='L'..CHAR.key.macCtrl,
rctrl='R'..CHAR.key.macCtrl,
lalt='L'..CHAR.key.macOpt,
ralt='R'..CHAR.key.macOpt,
lgui='L'..CHAR.key.macCmd,
rgui='R'..CHAR.key.macCmd,
lctrl='L'..CHAR.key.mac_control,
rctrl='R'..CHAR.key.mac_control,
lalt='L'..CHAR.key.mac_option,
ralt='R'..CHAR.key.mac_option,
lgui='L'..CHAR.key.mac_command,
rgui='R'..CHAR.key.mac_command,
space=CHAR.key.space,
delete=CHAR.key.macFowardDel,
pageup=CHAR.key.macPgup,
pagedown=CHAR.key.macPgdn,
home=CHAR.key.macHome,
[' end']=CHAR.key.macEnd,
numlock=CHAR.key.clear,
delete=CHAR.key.mac_fwdel,
pageup=CHAR.key.mac_pgup,
pagedown=CHAR.key.mac_pgdn,
home=CHAR.key.mac_home,
['end']=CHAR.key.mac_end,
numlock=CHAR.key.mac_clear,
},
controller={
x=CHAR.controller.xboxX,
y=CHAR.controller.xboxY,
a=CHAR.controller.xboxA,
b=CHAR.controller.xboxB,
dpup=CHAR.controller.dpadU,
dpdown=CHAR.controller.dpadD,
dpleft=CHAR.controller.dpadL,
dpright=CHAR.controller.dpadR,
triggerleft=CHAR.controller.lt,
triggerright=CHAR.controller.rt,
leftshoulder=CHAR.controller.lb,
rightshoulder=CHAR.controller.rb,
leftstick_up=CHAR.controller.jsLU,
leftstick_down=CHAR.controller.jsLD,
leftstick_left=CHAR.controller.jsLL,
leftstick_right=CHAR.controller.jsLR,
rightstick_up=CHAR.controller.jsRU,
rightstick_down=CHAR.controller.jsRD,
rightstick_left=CHAR.controller.jsRL,
rightstick_right=CHAR.controller.jsRR,
a=CHAR.key.ctrl_A,
b=CHAR.key.ctrl_B,
x=CHAR.key.ctrl_X,
y=CHAR.key.ctrl_Y,
dpup=CHAR.key.dpad_u,
dpdown=CHAR.key.dpad_d,
dpleft=CHAR.key.dpad_l,
dpright=CHAR.key.dpad_r,
triggerleft=CHAR.key.ctrl_lt,
triggerright=CHAR.key.ctrl_rt,
leftshoulder=CHAR.key.ctrl_lb,
rightshoulder=CHAR.key.ctrl_rb,
leftstick_up=CHAR.key.js_l_u,
leftstick_down=CHAR.key.js_l_d,
leftstick_left=CHAR.key.js_l_l,
leftstick_right=CHAR.key.js_l_r,
rightstick_up=CHAR.key.js_r_u,
rightstick_down=CHAR.key.js_r_d,
rightstick_left=CHAR.key.js_r_l,
rightstick_right=CHAR.key.js_r_r,
},
}setmetatable(keyNames.apple,{__index=keyNames.normal})

Expand Down
10 changes: 7 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,16 @@ do--Zenitha.setDrawSysInfo
GC.print(os.date("%H:%M"),3,0,nil,.9)
end)
end
FONT.setDefaultFallback('symbols')
FONT.setDefaultFont('norm')
FONT.setFallback('mono','norm')
FONT.load{
norm='assets/font/proportional.ttf',
mono='assets/font/monospaced.ttf',
bold='assets/font/Inter-ExtraBold.otf',
norm='assets/font/Inter-Regular.otf',
thin='assets/font/Inter-SemiBold.otf',
symbols='assets/font/symbols.otf',
}
FONT.setDefaultFont('norm')
FONT.setDefaultFallback('norm')
SCR.setSize(1280,720)
BGM.setDefault('title')
BGM.setMaxSources(5)
Expand Down

0 comments on commit c350c4d

Please sign in to comment.