Fix Linux icon issue (#808)
- Try load icon - Only build linux - Set icon in conf.lua - Set some global variables in conf.lua and set corresponding configs - Avoid change fullscreen state when playing on mobile devices - Try mobile - Enable CI for merging
This commit is contained in:
29
conf.lua
29
conf.lua
@@ -1,6 +1,13 @@
|
||||
function love.conf(t)
|
||||
for k, v in pairs(love) do print(k, v) end
|
||||
print('\n\n\n')
|
||||
|
||||
SYSTEM=love._os if SYSTEM=='OS X' then SYSTEM='macOS' end
|
||||
MOBILE=SYSTEM == 'Android' or SYSTEM == 'iOS'
|
||||
FNNS=SYSTEM:find'\79\83'-- What does FNSF stand for? IDK so don't ask me lol
|
||||
|
||||
t.identity = 'Techmino' -- Saving folder
|
||||
t.version="11.1"
|
||||
t.version = "11.4"
|
||||
t.gammacorrect = false
|
||||
t.appendidentity = true -- Search files in source then in save directory
|
||||
t.accelerometerjoystick = false -- Accelerometer=joystick on ios/android
|
||||
@@ -13,16 +20,26 @@ function love.conf(t)
|
||||
W.title = "Techmino " .. require "version".string
|
||||
W.width, W.height = 1280, 720
|
||||
W.minwidth, W.minheight = 640, 360
|
||||
W.borderless=false
|
||||
W.resizable=true
|
||||
W.fullscreen=false
|
||||
|
||||
W.vsync = 0 -- Unlimited FPS
|
||||
W.msaa=0-- Multi-sampled antialiasing
|
||||
W.msaa = 16 -- Multi-sampled antialiasing
|
||||
W.depth = 0 -- Bits/samp of depth buffer
|
||||
W.stencil = 1 -- Bits/samp of stencil buffer
|
||||
W.display = 1 -- Monitor ID
|
||||
W.highdpi = true -- High-dpi mode for the window on a Retina display
|
||||
W.x,W.y=nil
|
||||
W.x, W.y = nil, nil -- Position of the window
|
||||
if love.filesystem.getInfo('media/image/icon.png') then
|
||||
W.icon = 'media/image/icon.png'
|
||||
end
|
||||
if MOBILE then
|
||||
W.borderless = true
|
||||
W.resizable = false
|
||||
W.fullscreen = true
|
||||
else
|
||||
W.borderless = false
|
||||
W.resizable = true
|
||||
W.fullscreen = false
|
||||
end
|
||||
|
||||
local M = t.modules
|
||||
M.window, M.system, M.event, M.thread = true, true, true, true
|
||||
|
||||
13
main.lua
13
main.lua
@@ -22,9 +22,6 @@
|
||||
local fs=love.filesystem
|
||||
VERSION=require"version"
|
||||
TIME=love.timer.getTime
|
||||
SYSTEM=love.system.getOS() if SYSTEM=='OS X' then SYSTEM='macOS' end
|
||||
FNNS=SYSTEM:find'\79\83'-- What does FNSF stand for? IDK so don't ask me lol
|
||||
MOBILE=SYSTEM=='Android' or SYSTEM=='iOS'
|
||||
|
||||
-- Global Vars & Settings
|
||||
SFXPACKS={'chiptune'}
|
||||
@@ -37,14 +34,6 @@ math.randomseed(os.time()*626)
|
||||
love.setDeprecationOutput(false)
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
love.keyboard.setTextInput(false)
|
||||
if MOBILE then
|
||||
local w,h,f=love.window.getMode()
|
||||
f.resizable=false
|
||||
love.window.setMode(w,h,f)
|
||||
end
|
||||
if love.filesystem.getInfo('media/image/icon.png') then
|
||||
love.window.setIcon(love.image.newImageData('media/image/icon.png'))
|
||||
end
|
||||
|
||||
local _LOADTIMELIST_={}
|
||||
local _LOADTIME_=TIME()
|
||||
@@ -200,9 +189,11 @@ Z.setOnFnKeys({
|
||||
function() if love['_openConsole'] then love['_openConsole']() end end,
|
||||
})
|
||||
Z.setOnGlobalKey('f11',function()
|
||||
if not MOBILE then
|
||||
SETTING.fullscreen=not SETTING.fullscreen
|
||||
applySettings()
|
||||
saveSettings()
|
||||
end
|
||||
end)
|
||||
Z.setVersionText(VERSION.string)
|
||||
Z.setDebugInfo{
|
||||
|
||||
@@ -81,7 +81,7 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name='clickFX', x=950,y=980,lim=360,disp=SETval('clickFX'), code=function() SETTING.clickFX=not SETTING.clickFX applySettings() end},
|
||||
WIDGET.newSwitch{name='power', x=950,y=1070,lim=360,disp=SETval('powerInfo'), code=function() SETTING.powerInfo=not SETTING.powerInfo applySettings() end},
|
||||
WIDGET.newSwitch{name='clean', x=950,y=1160,lim=360,disp=SETval('cleanCanvas'), code=function() SETTING.cleanCanvas=not SETTING.cleanCanvas applySettings() end},
|
||||
WIDGET.newSwitch{name='fullscreen', x=950,y=1250,lim=360,disp=SETval('fullscreen'), code=function() SETTING.fullscreen=not SETTING.fullscreen applySettings() end},
|
||||
WIDGET.newSwitch{name='fullscreen', x=950,y=1250,lim=360,disp=SETval('fullscreen'),hideF=function() return MOBILE end,code=function() SETTING.fullscreen=not SETTING.fullscreen applySettings() end},
|
||||
|
||||
WIDGET.newKey{name='bg_on', x=680,y=1340,w=200,h=80,code=function() SETTING.bg='on'applySettings() end},
|
||||
WIDGET.newKey{name='bg_off', x=900,y=1340,w=200,h=80,code=function() SETTING.bg='off'applySettings() end},
|
||||
|
||||
@@ -2,6 +2,11 @@ return[=[
|
||||
未来计划:
|
||||
正在点亮科技树...
|
||||
|
||||
0.17.10: 暂停 Break
|
||||
新增:
|
||||
不允许移动端退出全屏模式
|
||||
抗锯齿和垂直同步设置选项
|
||||
|
||||
0.17.9: 暂停 Break
|
||||
修复:
|
||||
第一次启动选择语言后直接就退出了
|
||||
|
||||
Reference in New Issue
Block a user