Skip to content

Commit d0bd4a6

Browse files
committed
Refactoring.
1 parent 2571d5c commit d0bd4a6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

uAffixes.pas

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,7 @@ constructor TAffixes.Create();
585585
begin
586586
P := TypeInfo(TSuffixEnum);
587587
for I := Low(TSuffixEnum) to High(TSuffixEnum) do
588-
FSuffixName[I] := StringReplace(GetEnumName(P, Ord(I)), '_', ' ',
589-
[rfReplaceAll]);
588+
FSuffixName[I] := GetEnumName(P, Ord(I)).GetName('');
590589
end;
591590

592591
procedure TAffixes.DoCraft(const Effect: TEffect; const Index: UInt);

uHelpers.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ function TItemHelper.DoIt: string;
9292

9393
function TStringHelper.GetName(const Pref: string): string;
9494
begin
95-
Result := StringReplace(Self, Pref, '', [rfReplaceAll]);
95+
if (Pref <> '') then
96+
Result := StringReplace(Self, Pref, '', [rfReplaceAll]);
9697
Result := StringReplace(Result, '_', ' ', [rfReplaceAll]);
9798
end;
9899

uScenes.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,10 @@ procedure TSceneHelp.Render;
573573
begin
574574
UI.Title(_('Keybindings'), 5);
575575

576-
Terminal.Print(CX, 6, Format('%s: %s, %s, %s', [_('Scroll pages and skills'), UI.KeyToStr('arrow keys'),
577-
UI.KeyToStr('numpad'), UI.KeyToStr('WADX')]), TK_ALIGN_CENTER);
578-
579576
X := 1;
580577
Y := 8;
578+
AddLine('Right/Left', _('Change tab'));
579+
AddLine('Up/Down', _('Scroll skills'));
581580
AddLine('Tab', _('Show Background'));
582581
AddLine('Space', _('Show Inventory'));
583582
end;
@@ -1811,10 +1810,11 @@ procedure TSceneRest.Update(var Key: UInt);
18111810

18121811
procedure TSceneName.Render;
18131812
begin
1814-
UI.Title(_('Name'));
1813+
UI.Title(_('Choose name'));
18151814

1816-
Terminal.Print(CX - 10, CY, _('Name') + ': ' + Player.Name + Game.GetCursor, TK_ALIGN_LEFT);
1815+
Terminal.Print(CX - 10, CY, _('Enter you name') + ': ' + Player.Name + Game.GetCursor, TK_ALIGN_LEFT);
18171816

1817+
AddKey('Enter', _('Confirm'));
18181818
AddKey('Esc', _('Back'), True);
18191819
end;
18201820

0 commit comments

Comments
 (0)