Hello everyone, I need some help so I can scroll the history.dat text up and down when it is displayed in the menu using the arrow keys, would anyone have any idea how to do it, below I leave the code I'm using to the text appears.
Code:
class UserConfig {
</ label="Preview Buttom", help="Input that triggers a search", options="custom1,custom2,custom3,custom4,custom5,custom6", order=5 /> preview="custom2";
}
local my_config = fe.get_config();
# Resolução #
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
fe.load_module("fade");
fe.load_module( "animate" );
::OBJECTS <- {
bg_black = fe.add_image ("images/popup/black.png",0,0,flw, flh),
game_flyer = fe.add_artwork("wheel",flx*0.360, fly*0.400, flw*0.280, flh*0.190),
game_desc = fe.add_text("[!get_hisinfo]",flx*0.245, fly*0.300, flw*0.500, flh*0.720),
game_desc1 = fe.add_text("[Overview]",flx*0.245, fly*0.300, flw*0.500, flh*0.720),
}
OBJECTS.bg_black.alpha = 240;
OBJECTS.game_desc.word_wrap = true;
OBJECTS.game_desc.font = "Geforce Light";
OBJECTS.game_desc.align = Align.Centre;
OBJECTS.game_desc.word_wrap = true;
OBJECTS.game_desc.charsize = 35;
OBJECTS.game_desc1.word_wrap = true;
OBJECTS.game_desc1.font = "Geforce Light";
OBJECTS.game_desc1.align = Align.Centre;
OBJECTS.game_desc1.word_wrap = true;
OBJECTS.game_desc1.charsize = 35;
OBJECTS.bg_black.visible=false;
OBJECTS.game_flyer.visible=false;
OBJECTS.game_desc.visible=false;
OBJECTS.game_desc1.visible=false;
class displayPreview{
_trigger="Custom1";
constructor()
{
fe.add_signal_handler( this, "on_signal" )
_trigger=fe.get_config()["preview"].tolower();
}
function on_signal( signal )
{
if ( signal == _trigger )
{
local previewClick = fe.add_sound("images/popup/start.mp3")
previewClick.playing=true
display_preview();
return true;
}
return false;
}
}
displayPreview();
function display_preview()
{
if (OBJECTS.bg_black.visible == false) {
OBJECTS.bg_black.visible=true;
OBJECTS.game_flyer.visible=true;
OBJECTS.game_desc.visible=true;
OBJECTS.game_desc1.visible=true;
local shrink_bg_black = {
property = "scale", start = 0.1 end = 1.0, time = 500 tween = Tween.Quad,
}
local move_game_flyer_y = {
property = "y", start = fly*2 end = fly*0.00, time = 450
}
local move_game_desc_y = {
property = "y", start = fly*2 end = fly*0.190, time = 600
}
local move_game_desc1_y = {
property = "y", start = fly*2 end = fly*0.190, time = 600
}
animation.add( PropertyAnimation( OBJECTS.bg_black, shrink_bg_black ) );
animation.add( PropertyAnimation( OBJECTS.game_flyer, move_game_flyer_y ) );
animation.add( PropertyAnimation( OBJECTS.game_desc, move_game_desc_y ) );
animation.add( PropertyAnimation( OBJECTS.game_desc1, move_game_desc1_y ) );
}
else if (OBJECTS.bg_black.visible == true) {
OBJECTS.bg_black.visible=false;
OBJECTS.game_flyer.visible=false;
OBJECTS.game_desc.visible=false;
OBJECTS.game_desc1.visible=false;
}
}
Thanks!!!