From e80e1ce28ae7bbd9ba992deeea38f08e2a21f4ad Mon Sep 17 00:00:00 2001 From: NECDET COKYAZICI Date: Sun, 2 Oct 2011 09:18:23 +0100 Subject: [PATCH] Made the empty part of the scroll area in hex editor not apppear. Minor indentation of round brackets. --- najitool_GUI_0.3.0.0.src/naji_gui.src/naji_hex.ec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/najitool_GUI_0.3.0.0.src/naji_gui.src/naji_hex.ec b/najitool_GUI_0.3.0.0.src/naji_gui.src/naji_hex.ec index 047a854..255426c 100644 --- a/najitool_GUI_0.3.0.0.src/naji_gui.src/naji_hex.ec +++ b/najitool_GUI_0.3.0.0.src/naji_gui.src/naji_hex.ec @@ -79,20 +79,20 @@ class HexEditor : Window if (i >= buffer_size) break; - surface.WriteTextf((x-24) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%08X ", (offset * 16)); + surface.WriteTextf( (x-24) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%08X ", (offset * 16)); - surface.WriteTextf(( (x) + (xx) * (24) + 60 ) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%02X ", read_buffer[i]); + surface.WriteTextf( ( (x) + (xx) * (24) + 60 ) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%02X ", read_buffer[i]); if ( ( (read_buffer[i] >= ' ') && (read_buffer[i] <= '~') ) ) { - surface.WriteTextf(( ( (x) + (xx) * (12)) + 455) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%c", read_buffer[i]); + surface.WriteTextf( ( ( (x) + (xx) * (12)) + 455) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "%c", read_buffer[i]); } else { - surface.WriteTextf( (((x) + (xx) * (12)) + 455) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "."); + surface.WriteTextf( ( ((x) + (xx) * (12)) + 455) + scroll.x, ( (y) + (yy) * (12) -24 ) - scroll.y, "."); } @@ -154,8 +154,8 @@ class HexEditor : Window patch_load_file.Close(); - - scrollArea.h += buffer_size; + if ( (scrollArea.h != 0) && (buffer_size != 0) ) + scrollArea.h = buffer_size/1.333; } return true; }