Page 1 of 1

UI resize

Posted: Thu Feb 02, 2023 14:14 pm
by Zidell
For scaling you must change:
  1. SetPos(int, int) and SetSize(int, int) functions in the ...\Scripts\Game\UI classes
  2. CCardBitmapMgr.GetBlendBitmap(string p_ksrSpec) function in classes ...\Scripts\Game\UI
  3. CMiniMap.SetDestinationSize(point p_kxrSize) function
  4. Other functions in classes ...\Scripts\Game\UI that use interface dimensions
  5. Width and height values in ...\Scripts\Game\UI\*.srf files
  6. Scale (if scale = int) in ...\Scripts\Game\UI*.srf files
  7. Interface textures in Data\Base\UI
  8. x, y, w, h values in Data\Base\UI\All_def.txt
  9. Font size in Data\Base\UI\VisDef_GAM2.vis
Scaling problems:
  1. Unit icons in AC (we can use the original icon size for AC or try rendering scaled icons on top)
  2. WG, HQ, etc timers
  3. Map image in the loading window and lobby
    (we can use CGameWrap.GetMapInfoList(string p_ksrDir, ref CMapInfoList po_xrMapInfoList, int p_iPreviewPicWidth, int p_iPreviewPicHeight) but its too slow, because it scales all map images at once)
  4. Position of the lobby and gameinfo windows
  5. Players map ping (we can use CMiniMap.NewMarker() and CMiniMap.NewMarkerReuse())

Re: UI resize

Posted: Fri Feb 03, 2023 10:37 am
by Zidell
This can also be useful for images with a relative position
CWindowMgr.AddAutoscalePatternAbs(string p_ksrFilenamePattern , int p_iNewWidth , int p_iNewHeight)
CWindowMgr.AddAutoscalePatternRel(string p_ksrFilenamePattern , int p_iNewWidth , int p_iNewHeight)