Ignore:
Timestamp:
May 7, 2020, 7:05:57 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code in HighDPI branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/Term.pas

    r179 r193  
    25032503          SetMainTextureByAge(-1);
    25042504        Tribes.Init;
    2505         HelpDlg.UserLeft := (Screen.width - HelpDlg.width) div 2;
    2506         HelpDlg.UserTop := (Screen.height - HelpDlg.height) div 2;
     2505        HelpDlg.UserLeft := (DpiScreen.width - HelpDlg.width) div 2;
     2506        HelpDlg.UserTop := (DpiScreen.height - HelpDlg.height) div 2;
    25072507        HelpDlg.Difficulty := 0;
    25082508        if Command = cStartCredits then
     
    25662566        ListDlg.UserLeft := 8;
    25672567        ListDlg.UserTop := TopBarHeight + 8;
    2568         HelpDlg.UserLeft := Screen.width - HelpDlg.width - 8;
     2568        HelpDlg.UserLeft := DpiScreen.width - HelpDlg.width - 8;
    25692569        HelpDlg.UserTop := TopBarHeight + 8;
    25702570        UnitStatDlg.UserLeft := 397;
    25712571        UnitStatDlg.UserTop := TopBarHeight + 64;
    2572         DiaDlg.UserLeft := (Screen.width - DiaDlg.width) div 2;
    2573         DiaDlg.UserTop := (Screen.height - DiaDlg.height) div 2;
    2574         NatStatDlg.UserLeft := Screen.width - NatStatDlg.width - 8;
    2575         NatStatDlg.UserTop := Screen.height - PanelHeight -
     2572        DiaDlg.UserLeft := (DpiScreen.width - DiaDlg.width) div 2;
     2573        DiaDlg.UserTop := (DpiScreen.height - DiaDlg.height) div 2;
     2574        NatStatDlg.UserLeft := DpiScreen.width - NatStatDlg.width - 8;
     2575        NatStatDlg.UserTop := DpiScreen.height - PanelHeight -
    25762576          NatStatDlg.height - 8;
    25772577        if NatStatDlg.UserTop < 8 then
     
    39083908      UnitStatDlg.Close;
    39093909  end;
    3910   for i := 0 to Screen.FormCount - 1 do
     3910  for i := 0 to DpiScreen.FormCount - 1 do
    39113911    if DpiScreen.Forms[i].Visible and (DpiScreen.Forms[i] is TBufferedDrawDlg) then
    39123912      DpiScreen.Forms[i].Enabled := false;
     
    51025102        dx := 0;
    51035103        dy := 0;
    5104         if Mouse.CursorPos.y < Screen.height - PanelHeight then
     5104        if Mouse.CursorPos.y < DpiScreen.height - PanelHeight then
    51055105          if Mouse.CursorPos.x = 0 then
    51065106            dx := -speed // scroll left
    5107           else if Mouse.CursorPos.x = Screen.width - 1 then
     5107          else if Mouse.CursorPos.x = DpiScreen.width - 1 then
    51085108            dx := speed; // scroll right
    51095109        if Mouse.CursorPos.y = 0 then
    51105110          dy := -speed // scroll up
    5111         else if (Mouse.CursorPos.y = Screen.height - 1) and
     5111        else if (Mouse.CursorPos.y = DpiScreen.height - 1) and
    51125112          (Mouse.CursorPos.x >= TerrainBtn.Left + TerrainBtn.width) and
    51135113          (Mouse.CursorPos.x < xRightPanel + 10 - 8) then
     
    54695469      if BattleDlg.Left < 0 then
    54705470        BattleDlg.Left := 0
    5471       else if BattleDlg.Left + BattleDlg.width > Screen.width then
    5472         BattleDlg.Left := Screen.width - BattleDlg.width;
     5471      else if BattleDlg.Left + BattleDlg.width > DpiScreen.width then
     5472        BattleDlg.Left := DpiScreen.width - BattleDlg.width;
    54735473      BattleDlg.Top := y - BattleDlg.height div 2;
    54745474      if BattleDlg.Top < 0 then
    54755475        BattleDlg.Top := 0
    5476       else if BattleDlg.Top + BattleDlg.height > Screen.height then
    5477         BattleDlg.Top := Screen.height - BattleDlg.height;
     5476      else if BattleDlg.Top + BattleDlg.height > DpiScreen.height then
     5477        BattleDlg.Top := DpiScreen.height - BattleDlg.height;
    54785478      BattleDlg.IsSuicideQuery := false;
    54795479      BattleDlg.Show;
Note: See TracChangeset for help on using the changeset viewer.