高级玩家

- 贡献度
- 34
- 金元
- 3034
- 积分
- 379
- 精华
- 0
- 注册时间
- 2008-1-9
|
如果实在忙的话。。告诉我修改的文件的位置就好 = =
以前学过点VB 语言大多能猜的到点
一个个找文件夹里的LUA文件来看 好辛苦 没断行 看到眼都花了
还有MODULES里的EXAMPLE和EXAMPLE _REALTIME是什么关系啊 = =
最后找到tome-chn-rev5123(b40).teaa\overload\engine里有个貌似是的flyingtext.lua
是不是这个啊 = =
module(..., package.seeall, class.make)
function _M:init(fontname, fontsize, bigfontname, bigfontsize)
self.font = core.display.newFont(fontname or "/data/font/Vera.ttf", fontsize or 12)
self.bigfont = core.display.newFont(bigfontname or "/data/font/VeraBd.ttf", bigfontsize or 14)
self.font_h = self.font:lineSkip()
self.flyers = {}
end
function _M:enableShadow(v)
self.shadow = v
end
function _M:add(x, y, duration, xvel, yvel, str, color, bigfont)
assert(x, "no x flyer")
assert(y, "no y flyer")
assert(str, "no str flyer")
color = color or {255,255,255}
local strCHN=flyCHN(str)
local s = core.display.drawStringBlendedNewSurface(bigfont and self.bigfont or self.font, strCHN, color[1], color[2], color[3])
if not s then return end
local w, h = s:getSize()
local t, tw, th = s:glTexture()
local f = {
x=x,
y=y,
w=w, h=h,
tw=tw, th=th,
duration=duration or 15,
xvel = xvel or 0,
yvel = yvel or 0,
t = t,
}
f.popout_dur = math.max(3, math.floor(f.duration / 4))
self.flyers[f] = true
return f
end
function _M:empty()
self.flyers = {}
end
function _M:display(nb_keyframes)
if not next(self.flyers) then return end
local dels = {}
for fl, _ in pairs(self.flyers) do
local zoom = nil
local x, y = fl.x, fl.y
local tx, ty = fl.x, fl.y
if fl.duration <= fl.popout_dur then
zoom = (fl.duration / fl.popout_dur)
x, y = -fl.w / 2 * zoom, -fl.h / 2 * zoom
core.display.glTranslate(tx, ty, 0)
core.display.glScale(zoom, zoom, zoom)
end
if self.shadow then fl.t:toScreenFull(x+1, y+1, fl.w, fl.h, fl.tw, fl.th, 0, 0, 0, self.shadow) end
fl.t:toScreenFull(x, y, fl.w, fl.h, fl.tw, fl.th)
fl.x = fl.x + fl.xvel * nb_keyframes
fl.y = fl.y + fl.yvel * nb_keyframes
fl.duration = fl.duration - nb_keyframes
if zoom then
core.display.glScale()
core.display.glTranslate(-tx, -ty, 0)
end
-- Delete the flyer
if fl.duration <= 0 then
dels[#dels+1] = fl
end
end
for i, fl in ipairs(dels) do self.flyers[fl] = nil end
end
字体大小是这里修改吗?
我希望是把FONTSIZE都改为36 请问怎么修改?
|
|