Changeset 19 for trunk/UCore.pas
- Timestamp:
- Oct 5, 2019, 1:00:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r17 r19 115 115 CurrentContext := ApplicationInfo1.GetRegistryContext; 116 116 117 Game.TopScore := ReadIntegerWithDefault('TopScore', 0);118 Game.Board.Size := Point(ReadIntegerWithDefault('SizeX', 4), ReadIntegerWithDefault('SizeY', 4));119 Game.AnimationDuration := ReadIntegerWithDefault('AnimationDuration', 30);120 117 if ValueExists('LanguageCode') then 121 118 Translator1.Language := Translator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) … … 124 121 Free; 125 122 end; 123 Game.LoadFromRegistry(ApplicationInfo1.GetRegistryContext); 126 124 end; 127 125 … … 132 130 CurrentContext := ApplicationInfo1.GetRegistryContext; 133 131 134 WriteInteger('TopScore', Game.TopScore);135 WriteInteger('SizeX', Game.Board.Size.X);136 WriteInteger('SizeY', Game.Board.Size.Y);137 WriteInteger('AnimationDuration', Game.AnimationDuration);138 132 if Assigned(Translator1.Language) and (Translator1.Language.Code <> '') then 139 133 WriteString('LanguageCode', Translator1.Language.Code) … … 142 136 Free; 143 137 end; 138 Game.SaveToRegistry(ApplicationInfo1.GetRegistryContext); 144 139 end; 145 140
Note:
See TracChangeset
for help on using the changeset viewer.