Disabling T-Engine mouse cursor
Moderator: Moderator
Disabling T-Engine mouse cursor
Is there a way to use the OS cursor in modules without changing people's ToME settings? Oh, and same for the metal UI scheme (I'd like to use the old stone style).
Re: Disabling T-Engine mouse cursor
For the UI, in your load.lua near the top; do:
For the mouse, in your Game.lua define two methods:
Code: Select all
local UIBase = require "engine.ui.Base"
UIBase.ui = "stone"
Code: Select all
function _M:setMouseCursor()
core.display.setMouseCursor(0, 0, nil, nil)
end
function _M:updateMouseCursor()
core.display.setMouseCursor(0, 0, nil, nil)
end
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Disabling T-Engine mouse cursor
Thanks! Works great :)
Another little question - how do I get the game to pause for a fraction of a second? I can't find a good generic lua answer, and figured there must be something built into the engine, but can't find anything in the luadoc.
Another little question - how do I get the game to pause for a fraction of a second? I can't find a good generic lua answer, and figured there must be something built into the engine, but can't find anything in the luadoc.
Re: Disabling T-Engine mouse cursor
I'm not sure what you want exactly ?
What should pause ?
What should pause ?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Disabling T-Engine mouse cursor
Game input and further actions, but graphical effects should continue. In Rogue Rage one of the attacks does a chain lightning style thing through several enemies, but moves the player about as it does so, but it's confusing because it happens in an instant. I'd like a 10ms pause between jumps to show what's going on.
Re: Disabling T-Engine mouse cursor
Well just set a flag at the start and end and check it in your mouse/lkeyboard input.
As for doing something with a delay, it depends, if it's a particle you can have a callback when the particle ends. IE:
As for doing something with a delay, it depends, if it's a particle you can have a callback when the particle ends. IE:
Code: Select all
game.level.map:particleEmitter(x, y, 1, "some_particle").on_remove = function()
....
....
end
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Disabling T-Engine mouse cursor
It's mostly for dramatic effect. 'Juicing' as I it's referred the in the indie scene.
-
- Higher
- Posts: 55
- Joined: Thu Aug 16, 2012 10:52 pm
- Location: Philadelphia, Pennsylvania, USA
- Contact:
Re: Disabling T-Engine mouse cursor
I needed to do this because when monsters would spend their action points, the flyers would be all on top of each other and other monsters would warp all over the board.
I used:
That pauses the engine for 100ms.
I used:
Code: Select all
core.game.sleep(100)