Commit a63622a

Nick Faro committed on
Draw jump column in hex if row numbers are in hex
commit a63622ac35ee5195f4ed84c7584e55e1871138f5 parent 58fa2f8
2 changed files +14−4
Modifiedsrc/tracker.pas +1−0
@@ -2487,6 +2487,7 @@ begin
2487 2487
2488 RecreateRowNumbers; 2488 RecreateRowNumbers;
2489 TrackerGrid.Invalidate; 2489 TrackerGrid.Invalidate;
2490 TableGrid.Invalidate;
2490 2491
2491 CreateKeymap 2492 CreateKeymap
2492 end; 2493 end;
Modifiedsrc/trackergrid.pas +13−4
@@ -7,7 +7,7 @@ interface
7 uses 7 uses
8 Classes, SysUtils, Controls, Graphics, Constants, LCLType, math, LCLIntf, 8 Classes, SysUtils, Controls, Graphics, Constants, LCLType, math, LCLIntf,
9 LMessages, HugeDatatypes, ClipboardUtils, gdeque, gstack, utils, effecteditor, 9 LMessages, HugeDatatypes, ClipboardUtils, gdeque, gstack, utils, effecteditor,
10 Keymap, LazLoggerBase; 10 Keymap, LazLoggerBase, hUGESettings;
11 11
12 const 12 const
13 UNDO_STACK_SIZE = 100; 13 UNDO_STACK_SIZE = 100;
@@ -218,7 +218,10 @@ begin
218 218
219 if Cell.Volume <> 0 then begin 219 if Cell.Volume <> 0 then begin
220 Font.Color := clTblJump; 220 Font.Color := clTblJump;
221 TextOut(PenPos.X, PenPos.Y, 'J'+FormatFloat('00', Cell.Volume)); 221 if TrackerSettings.DisplayRowNumbersAsHex then
222 TextOut(PenPos.X, PenPos.Y, 'J'+IntToHex(Cell.Volume, 2))
223 else
224 TextOut(PenPos.X, PenPos.Y, 'J'+FormatFloat('00', Cell.Volume));
222 end 225 end
223 else begin 226 else begin
224 Font.Color := clDots; 227 Font.Color := clDots;
@@ -251,8 +254,14 @@ begin
251 BeginUndoAction; 254 BeginUndoAction;
252 with Patterns[Cursor.X]^[Cursor.Y] do begin 255 with Patterns[Cursor.X]^[Cursor.Y] do begin
253 if Key = VK_DELETE then Volume := 0 256 if Key = VK_DELETE then Volume := 0
254 else if KeycodeToHexNumber(Key, Temp) and InRange(Temp, 0, 9) then 257 else if KeycodeToHexNumber(Key, Temp) then begin
255 Volume := ((Volume mod 10) * 10) + Temp; 258 if TrackerSettings.DisplayRowNumbersAsHex then begin
259 Volume := ((Volume mod 16) * 16) + Temp;
260 if Volume > 99 then Volume := Temp;
261 end
262 else if InRange(Temp, 0, 9) then
263 Volume := ((Volume mod 10) * 10) + Temp;
264 end;
256 end; 265 end;
257 266
258 Invalidate; 267 Invalidate;