From d5178bd7418415bc8d065fdb5ca39ffcb708be76 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sat, 18 May 2024 21:43:01 +0100 Subject: [PATCH] Console * Add hover events * Add copypaste events --- game/scripts/utility/console.rpy | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/game/scripts/utility/console.rpy b/game/scripts/utility/console.rpy index 176a124a..fab5c144 100644 --- a/game/scripts/utility/console.rpy +++ b/game/scripts/utility/console.rpy @@ -627,13 +627,13 @@ screen console: $ info = f"{{size=-2}}{{color=#ffffff80}}{timestamp}{{/color}}{{color=#228b22}}{stdout}{{/color}}{{/size}}" if entry.command is not None: - text "[info!i][entry.command!q]" style "console_command_text" + textbutton "[info!i][entry.command!q]" style "console_command" action [CopyToClipboard(entry.command), Notify("Copied to clipboard.")] if entry.result is not None: if entry.is_error: - text "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_error_text" + textbutton "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_error" action [CopyToClipboard(entry.result), Notify("Copied to clipboard.")] else: - text "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_result_text" + textbutton "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_result" action [CopyToClipboard(entry.result), Notify("Copied to clipboard.")] hbox: text "Command:" @@ -653,6 +653,14 @@ style console_text: font "gui/creamy_pumpkin_pie/fonts/Hack-Regular.ttf" adjust_spacing False +style console_line_button is empty: + xfill True + hover_background "#ffffff25" + +style console_command is console_line_button +style console_error is console_line_button +style console_result is console_line_button + style console_button_text is console_text style console_command_text is console_text