I liked this ideia!!! "I created" this with some infos:
// Step 1: Create a surface to store information objects
local infoSurface = fe.add_surface(fe.layout.width, fe.layout.height);
infoSurface.visible = false;
// Step 2: Add game information objects to the surface
local infoText = fe.add_text("", 50, 50, infoSurface.width - 100, infoSurface.height - 100);
infoText.set_rgb(255, 255, 255);
infoText.set_font("your_font", your_font_size);
local closeButton = fe.add_text("Close", infoSurface.width - 100, infoSurface.height - 50, 100, 50);
closeButton.set_rgb(255, 0, 0);
closeButton.set_font("your_font", your_font_size);
closeButton.preserve_aspect_ratio = true;
// Step 3: Add signal handler for the custom button
local showInfoButton = fe.add_text("Show Info", 100, 100, 100, 50);
showInfoButton.set_rgb(0, 255, 0);
showInfoButton.set_font("your_font", your_font_size);
showInfoButton.add_signal("on_trigger", "toggleInfoVisibility");
// Toggle visibility function
function toggleInfoVisibility()
{
infoSurface.visible = !infoSurface.visible;
}
// Use this function to update the information displayed on the infoText
function updateInfoText()
{
infoText.msg = "Game Title: " + fe.game_info(Info.Title) + "\n" +
"Year: " + fe.game_info(Info.Year) + "\n" +
"Genre: " + fe.game_info(Info.Genre);
}
// Add a signal handler to update the information when a game is selected
fe.add_signal("on_game_selected", "updateInfoText");
BUT i dont know how this work exacly... some part code or almost code dont work or something its wrong