close Warning: Can't synchronize with repository "(default)" (No changeset 184 in the repository). Look in the Trac log for more information.

Changeset 178


Ignore:
Timestamp:
Jan 30, 2018, 10:23:49 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Open/Save dialog with file filter and initial directory and name from current game.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/xtactics.cs.po

    r170 r178  
    8686
    8787#: tcore.ashowcharts.caption
    88 #, fuzzy
    89 #| msgid "Show charts"
    9088msgctxt "tcore.ashowcharts.caption"
    9189msgid "Charts"
    92 msgstr "Grafy vývoje"
     90msgstr "Grafy"
    9391
    9492#: tcore.ashowunitmoves.caption
    95 #, fuzzy
    9693msgctxt "tcore.ashowunitmoves.caption"
    9794msgid "Unit moves"
     
    185182msgctxt "tformmain.menuitem19.caption"
    186183msgid "-"
    187 msgstr ""
     184msgstr "-"
    188185
    189186#: tformmain.menuitem5.caption
    190187msgctxt "tformmain.menuitem5.caption"
    191188msgid "-"
    192 msgstr ""
     189msgstr "-"
    193190
    194191#: tformmain.menuitem8.caption
     
    516513msgid "Do you want to end current game?"
    517514msgstr "Chcete ukončit aktuální hru?"
     515
     516#: ucore.sfiledialogfilter
     517msgid "xTactics games (.xtg)|*.xtg|All files|*.*"
     518msgstr "xTactics hry (.xtg)|*.xtg|Všechny soubory|*.*"
    518519
    519520#: ucore.splayersnotinitialized
     
    724725msgid "Zero zoom not allowed"
    725726msgstr "Nulové přiblížení není povoleno"
    726 
  • trunk/Languages/xtactics.po

    r170 r178  
    497497#: ucore.sendgamequestion
    498498msgid "Do you want to end current game?"
     499msgstr ""
     500
     501#: ucore.sfiledialogfilter
     502msgid "xTactics games (.xtg)|*.xtg|All files|*.*"
    499503msgstr ""
    500504
  • trunk/UCore.lfm

    r176 r178  
    77  VerticalOffset = 352
    88  Width = 940
    9   PPI = 120
    109  object ActionList1: TActionList
    1110    Images = ImageListSmall
  • trunk/UCore.pas

    r176 r178  
    111111  SRestartGameQuestion = 'Do you want to restart current game?';
    112112  SPlayersNotInitialized = 'Not all players were initialized with start cell. Needed %d, initialized %d. Change map parameters to have more terrain cells.';
     113  SFileDialogFilter = 'xTactics games (.xtg)|*.xtg|All files|*.*';
    113114
    114115
     
    307308procedure TCore.AGameLoadExecute(Sender: TObject);
    308309begin
    309   if (Game.FileName = '') and (LastOpenedList1.Items.Count > 0) then
    310     OpenDialog1.FileName := LastOpenedList1.Items[0]
    311     else OpenDialog1.FileName := Game.FileName;
     310  OpenDialog1.Filter := SFileDialogFilter;
     311  OpenDialog1.InitialDir := ExtractFileDir(Game.FileName);
     312  OpenDialog1.FileName := ExtractFileName(Game.FileName);
    312313  if OpenDialog1.Execute then begin
    313314    LoadGame(OpenDialog1.FileName);
     
    333334procedure TCore.AGameSaveExecute(Sender: TObject);
    334335begin
    335   if (Game.FileName = '') and (LastOpenedList1.Items.Count > 0) then
    336     SaveDialog1.FileName := ExtractFileDir(LastOpenedList1.Items[0])
    337     else SaveDialog1.FileName := Game.FileName;
     336  SaveDialog1.Filter := SFileDialogFilter;
     337  SaveDialog1.InitialDir := ExtractFileDir(Game.FileName);
     338  SaveDialog1.FileName := ExtractFileName(Game.FileName);
    338339  if SaveDialog1.Execute then begin
    339340    Game.SaveToFile(SaveDialog1.FileName);
Note: See TracChangeset for help on using the changeset viewer.