Changeset 91 for trunk/UCore.pas
- Timestamp:
- Dec 4, 2014, 10:18:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r83 r91 7 7 uses 8 8 Classes, SysUtils, XMLConf, FileUtil, ActnList, Controls, Dialogs, Forms, 9 UGame, UApplicationInfo, UPersistentForm, U CoolTranslator;9 UGame, UApplicationInfo, UPersistentForm, UScaleDPI, UCoolTranslator; 10 10 11 11 type … … 31 31 PersistentForm: TPersistentForm; 32 32 SaveDialog1: TSaveDialog; 33 ScaleDPI1: TScaleDPI; 33 34 XMLConfig1: TXMLConfig; 34 35 procedure AAboutExecute(Sender: TObject); … … 46 47 private 47 48 FInitialized: Boolean; 49 StoredDimension: TControlDimension; 48 50 procedure DoOnMove(CellFrom, CellTo: TCell; var CountOnce, 49 51 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); … … 157 159 AutoSaveEnabled := XMLConfig1.GetValue('AutoSave', True); 158 160 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(XMLConfig1.GetValue('Language', '')); 161 ScaleDPI1.DPI := Point(XMLConfig1.GetValue('DPIX', 96), XMLConfig1.GetValue('DPIY', 96)); 162 ScaleDPI1.AutoDetect := XMLConfig1.GetValue('DPIAuto', True); 159 163 end; 160 164 … … 166 170 XMLConfig1.SetValue('AnimationSpeed', AnimationSpeed); 167 171 XMLConfig1.SetValue('AutoSave', AutoSaveEnabled); 172 XMLConfig1.SetValue('DPIX', ScaleDPI1.DPI.X); 173 XMLConfig1.SetValue('DPIY', ScaleDPI1.DPI.Y); 174 XMLConfig1.SetValue('DPIAuto', ScaleDPI1.AutoDetect); 168 175 end; 169 176 … … 291 298 Game.OnWin := DoOnWin; 292 299 Game.OnNewTurn := GameNewTurnExecute; 300 StoredDimension := TControlDimension.Create; 293 301 end; 294 302 295 303 procedure TCore.DataModuleDestroy(Sender: TObject); 296 304 begin 305 StoredDimension.Free;; 297 306 Game.SaveConfig(XMLConfig1, 'Game'); 298 307 SaveConfig; … … 314 323 Game.Running := True; 315 324 FormMain.AZoomAll.Execute; 325 {with Core.ScaleDPI1 do begin 326 //ApplyToAll(DesignDPI); 327 FormNew.Show; 328 for I := 0 to Screen.FormCount - 1 do begin 329 StoreDimensions(Screen.Forms[I], StoredDimension); 330 ScaleDimensions(Screen.Forms[I], StoredDimension); 331 end; 332 FormNew.Hide; 333 ScaleImageList(Core.ImageListSmall, DesignDPI); 334 ScaleImageList(Core.ImageListLarge, DesignDPI); 335 end;} 316 336 end; 317 337
Note:
See TracChangeset
for help on using the changeset viewer.