Editing a single character now prompts for ASCII # instead of forcing people to play the ALT-NUMPAD game.
This commit is contained in:
parent
f1e779a383
commit
6eef3d211b
|
@ -72,6 +72,7 @@ Type
|
||||||
Procedure EditPercentBar (Var Bar: RecPercent);
|
Procedure EditPercentBar (Var Bar: RecPercent);
|
||||||
Function GetColorAttr (C: Byte) : Byte;
|
Function GetColorAttr (C: Byte) : Byte;
|
||||||
Procedure EditAccessFlags (Var Flags: TMenuFormFlagsRec);
|
Procedure EditAccessFlags (Var Flags: TMenuFormFlagsRec);
|
||||||
|
Procedure EditCharacter (Var C: Char);
|
||||||
Procedure AddBasic (HK: Char; D: String; X, Y, FX, FY, DS, FS, MS: Byte; I: FormItemType; P: Pointer; H: String);
|
Procedure AddBasic (HK: Char; D: String; X, Y, FX, FY, DS, FS, MS: Byte; I: FormItemType; P: Pointer; H: String);
|
||||||
Procedure BarON;
|
Procedure BarON;
|
||||||
Procedure BarOFF (RecPos: Word);
|
Procedure BarOFF (RecPos: Word);
|
||||||
|
@ -222,6 +223,25 @@ Begin
|
||||||
Box.Free;
|
Box.Free;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Procedure TAnsiMenuForm.EditCharacter (Var C: Char);
|
||||||
|
Var
|
||||||
|
Box : TAnsiMenuBox;
|
||||||
|
Str : String[3];
|
||||||
|
Begin
|
||||||
|
Box := TAnsiMenuBox.Create;
|
||||||
|
|
||||||
|
Box.Open (19, 8, 62, 10);
|
||||||
|
|
||||||
|
WriteXY ( 21, 9, 113, 'Enter ASCII character number (1-254)');
|
||||||
|
|
||||||
|
Str := strI2S(Ord(C));
|
||||||
|
Str := Input.GetStr(58, 9, 3, 3, 1, Str);
|
||||||
|
C := Chr(strS2I(Str));
|
||||||
|
|
||||||
|
Box.Close;
|
||||||
|
Box.Free;
|
||||||
|
End;
|
||||||
|
|
||||||
Procedure TAnsiMenuForm.EditAccessFlags (Var Flags: TMenuFormFlagsRec);
|
Procedure TAnsiMenuForm.EditAccessFlags (Var Flags: TMenuFormFlagsRec);
|
||||||
Var
|
Var
|
||||||
Box : TAnsiMenuBox;
|
Box : TAnsiMenuBox;
|
||||||
|
@ -567,7 +587,6 @@ End;
|
||||||
|
|
||||||
Procedure TAnsiMenuForm.EditOption;
|
Procedure TAnsiMenuForm.EditOption;
|
||||||
Var
|
Var
|
||||||
TempStr : String;
|
|
||||||
TempByte : Byte;
|
TempByte : Byte;
|
||||||
TempLong : LongInt;
|
TempLong : LongInt;
|
||||||
Begin
|
Begin
|
||||||
|
@ -598,11 +617,7 @@ Begin
|
||||||
If Not DirCreate(S^) Then
|
If Not DirCreate(S^) Then
|
||||||
ShowMsgBox(0, 'Unable to create');
|
ShowMsgBox(0, 'Unable to create');
|
||||||
End;
|
End;
|
||||||
ItemChar : Begin
|
ItemChar : EditCharacter(C^);
|
||||||
TempStr := Input.GetStr(FieldX, FieldY, FieldSize, MaxSize, 1, C^);
|
|
||||||
Changed := TempStr[1] <> C^;
|
|
||||||
C^ := TempStr[1];
|
|
||||||
End;
|
|
||||||
ItemAttr : Begin
|
ItemAttr : Begin
|
||||||
TempByte := GetColorAttr(B^);
|
TempByte := GetColorAttr(B^);
|
||||||
Changed := TempByte <> B^;
|
Changed := TempByte <> B^;
|
||||||
|
|
Loading…
Reference in New Issue