From e008d1193bce8f6c25c75a95004f7a86898f1978 Mon Sep 17 00:00:00 2001 From: koh-gt <101822992+koh-gt@users.noreply.github.com> Date: Sat, 2 Dec 2023 02:06:32 +0800 Subject: [PATCH] Update ferritext.ps1 to v0.8.2 --- ferritext.ps1 | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/ferritext.ps1 b/ferritext.ps1 index fa9563f..d78d8ce 100644 --- a/ferritext.ps1 +++ b/ferritext.ps1 @@ -4,8 +4,9 @@ # # Tested to work on the following Ferrite Core versions: # -# Recommended -- v3.1.2, v3.1.1, v3.1.0, v3.0.1, v3.0.0 -# Deprecated -- v2.1.2, v2.1.1, v2.1.0, v2.0.0 +# Recommended -- v3.1.3, v3.1.2, v3.1.1 +# Deprecated -- v3.1.0, v3.0.1, v3.0.0 +# Outdated -- v2.1.2, v2.1.1, v2.1.0, v2.0.0 # # A Powershell script to search for text inscriptions on the Ferrite blockchain. # @@ -1261,11 +1262,24 @@ function display-select-pushblock($push_block_select_index, $push_block_fee, $pu $offset_line_x = " " * $FERRITEXT_INPUT_OFFSET_X # spacing each line horizontal $pushblock_fixedfee_list_count = $pushblock_fixedfee_list.count $pushblock_output_arr = ,$null * ($pushblock_fixedfee_list_count + 1) + + if ($push_block_select_index -eq 0){ + $pushblock_output_arr[0] = "$highlight_white<- Send variable fee ($push_block_fee $COIN_SHORTHAND) ->$reset" + } else { + $pushblock_output_arr[0] = "<- Send variable fee ($push_block_fee $COIN_SHORTHAND) ->" + } + - $pushblock_output_arr[0] = "<- Send variable fee ($push_block_fee $COIN_SHORTHAND) ->" - [console]::WriteLine("aaaaaaaaaaaaaaaaaaaaaaaaaa") - foreach ($pushblock_fixedfee in $pushblock_fixedfee_list){ + #[console]::WriteLine("aaaaaaaaaaaaaaaaaaaaaaaaaa") + $pushblock_out_index = 1 + foreach ($pushblock_fixedfee in $pushblock_fixedfee_list){ + if ($push_block_select_index -eq $pushblock_out_index){ + $pushblock_output_arr[$pushblock_out_index] = "$highlight_white`Send $pushblock_fixedfee $COIN_SHORTHAND$reset" + } else { + $pushblock_output_arr[$pushblock_out_index] = "Send $pushblock_fixedfee $COIN_SHORTHAND" + } + $pushblock_out_index++ } cursor-goto(0)($FERRITEXT_INPUT_OFFSET_Y + $SEL_PUSHBLOCK_OFFSET) @@ -1279,6 +1293,9 @@ function push-block($push_block_select_index, $push_block_fee, $feature_enable, $cleanup_var = 0 + $pushblock_fixedfee_list = @(200,150,100,50) + $pushblock_fixedfee_list_count = $pushblock_fixedfee_list.count + if ($disable_input -eq 0){ Switch ($keypress_key) { @@ -1312,6 +1329,13 @@ function push-block($push_block_select_index, $push_block_fee, $feature_enable, #cleanup {($_ -eq 'Escape') -or ($_ -eq 'F5')} { $cleanup_var = 1 + cursor-goto(0)($FERRITEXT_INPUT_OFFSET_Y) + [console]::WriteLine("uwu") + cursor-goto(0)($FERRITEXT_INPUT_OFFSET_Y) + + clear-lines($SEL_PUSHBLOCK_OFFSET + $pushblock_fixedfee_list_count + 1) + + return $push_block_select_index, $push_block_fee, 0 } } @@ -1323,8 +1347,7 @@ function push-block($push_block_select_index, $push_block_fee, $feature_enable, $push_block_select_index = 0 $update = $false } - $pushblock_fixedfee_list = @(200,150,100,50) - $pushblock_fixedfee_list_count = $pushblock_fixedfee_list.count + if ($push_block_select_index -ge $pushblock_fixedfee_list_count + 1){ $push_block_select_index = $pushblock_fixedfee_list_count } @@ -1334,11 +1357,6 @@ function push-block($push_block_select_index, $push_block_fee, $feature_enable, } - if ($cleanup_var -eq 1){ - - return $push_block_select_index, $push_block_fee, 0 - } - return $push_block_select_index, $push_block_fee, $feature_enable }