Skip to content

Commit

Permalink
添加两个像素字体并应用到控制台
Browse files Browse the repository at this point in the history
框架跟进
  • Loading branch information
MrZ626 committed Jul 11, 2024
1 parent dc7c5fe commit fbdba38
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 3 files
+1 −0 scene.lua
+6 −6 scene/console.lua
+6 −6 widget.lua
Binary file added assets/fonts/VonwaonBitmap-12px.ttf
Binary file not shown.
Binary file added assets/fonts/codePixel-Regular.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/scene/hello.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function scene.draw()
end
else
GC.setColor(.62,.62,.62)
FONT.set(25)
FONT.set(25,'codepixel')
GC.print("Initiating Boot Protocol...",40,40)
end
elseif PROGRESS.get('main')<=4 then
Expand Down
9 changes: 7 additions & 2 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,22 @@ function ZENITHA.globalEvent.quit()
PROGRESS.save('save')
end

FONT.setDefaultFallback('symbols')
FONT.setDefaultFont('norm')
FONT.load{
norm='assets/fonts/RHDisplayGalaxy-Medium.otf',
bold='assets/fonts/RHDisplayGalaxy-ExtraBold.otf',

number='assets/fonts/RHTextInktrap-Regular.otf',
codepixel='assets/fonts/codePixel-Regular.ttf',
vonwaon='assets/fonts/VonwaonBitmap-12px.ttf',
symbols='assets/fonts/symbols.otf',

galaxy_bold="assets/fonts/26FGalaxySans-Bold.otf",
galaxy_norm="assets/fonts/26FGalaxySans-Regular.otf",
galaxy_thin="assets/fonts/26FGalaxySans-Thin.otf",
}
FONT.setDefaultFallback('symbols')
FONT.setDefaultFont('norm')
FONT.setFallback('codepixel','vonwaon')
SCR.setSize(1600,1000)
WIDGET.setDefaultOption{
base={
Expand Down Expand Up @@ -624,6 +627,8 @@ SCN.addSwapStyle('fastFadeHeader',{
GC.rectangle('fill',0,h+1,SCR.w,SCR.h-h)
end,
})
SCN.scenes._console.widgetList.output.fontType='codepixel'
SCN.scenes._console.widgetList.input.fontType='codepixel'

FMODLoadFunc()
if tostring(FMOD.studio):find('NULL') then
Expand Down

0 comments on commit fbdba38

Please sign in to comment.