Alert23 215 Posted April 13, 2020 hi all, i have a question, how can i set the right coordinates for the bis_fnc_dynamicText? i use this code to display an image for example: Clear All Rooms (image): Task1 = ["<img align=''right'' img size='8' image='images\task1.paa' shadow='0'/>",safeZoneX+0.235, safeZoneY+0.225 * safezoneH + safezoneY, 50,1,0,222] spawn bis_fnc_dynamicText; this is how it looks on my screen: Spoiler and this is how it looks on the screen of a friend: Spoiler how can i obtain same results for everyone? how must i adapt safezone to bis_fnc_dynamictext? Share this post Link to post Share on other sites
7erra 629 Posted April 13, 2020 You should use the GUI_GRID for this (or pixelGrid but meh): #include "\a3\ui_f\hpp\definecommongrids.inc" Task1 = [ "<img align=''right'' img size='8' image='images\task1.paa' shadow='0'/>", GUI_GRID_TOPLEFT_X + 1 * GUI_GRID_TOPLEFT_W, GUI_GRID_TOPLEFT_Y + 1 * GUI_GRID_TOPLEFT_H, 50, 1, 0, 222 ] spawn bis_fnc_dynamicText; GUI_GRID_TOPLEFT_X is the same as safeZoneX, GUI_GRID_TOPLEFT_Y is safeZoneY. The important ones are GUI_GRID_TOPLEFT_W and _H. You can try around with the 1* multiplier to find a suitable location for the text. 1 1 Share this post Link to post Share on other sites
Larrow 2822 Posted April 14, 2020 12 hours ago, 7erra said: or pixelGrid Something like... // Pixel grid #define SCALEFACTOR getNumber( configFile >> "uiScaleFactor" ) #define GRID_X( gridType, gridScale, num ) ( pixelW * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) #define GRID_Y( gridType, gridScale, num ) ( pixelH * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) //Size of a grid cell #define GRID_SCALE 8 Task1 = [ "<t size='1.2' align='left' underline='1'>TEST</t><t size='.7' align='left'><br />Testing<br />Tested</t>", safeZoneXAbs + GRID_X( pixelGrid, GRID_SCALE, 2 ), safeZoneY + GRID_Y( pixelGrid, GRID_SCALE, 5 ), 50, 1, 0, 222 ] spawn BIS_fnc_dynamicText; Where GRID_SCALE is the size of a grid. Where 2 and 5 are the number of grids to place your dynamic text at. So x is left hand side of the screen( safeZoneXAbs ) plus 2 grids of size 8( GRID_SCALE ). And y is top of the screen( safeZoneY ) plus 5 grids of size 8( GRID_SCALE ) Where pixelGrid obeys screen resolution and games UI scale setting. Can be replaced with pixelGridNoUIScale if you do not want it to scale with games UI scale. 1 1 Share this post Link to post Share on other sites
Alert23 215 Posted April 14, 2020 (edited) Thank you guys for your help! Edited January 25, 2021 by Alert23 Share this post Link to post Share on other sites
Alert23 215 Posted September 29, 2020 On 4/13/2020 at 11:34 PM, 7erra said: You should use the GUI_GRID for this (or pixelGrid but meh): #include "\a3\ui_f\hpp\definecommongrids.inc" Task1 = [ "<img align=''right'' img size='8' image='images\task1.paa' shadow='0'/>", GUI_GRID_TOPLEFT_X + 1 * GUI_GRID_TOPLEFT_W, GUI_GRID_TOPLEFT_Y + 1 * GUI_GRID_TOPLEFT_H, 50, 1, 0, 222 ] spawn bis_fnc_dynamicText; GUI_GRID_TOPLEFT_X is the same as safeZoneX, GUI_GRID_TOPLEFT_Y is safeZoneY. The important ones are GUI_GRID_TOPLEFT_W and _H. You can try around with the 1* multiplier to find a suitable location for the text. hey, sry but i had to returne to this topic again because im still encountering the same problems now, calling this from a sqf works great but how would i call this via trg or debug-console? Share this post Link to post Share on other sites
Alert23 215 Posted January 25, 2021 On 4/14/2020 at 12:38 PM, Larrow said: Something like... // Pixel grid #define SCALEFACTOR getNumber( configFile >> "uiScaleFactor" ) #define GRID_X( gridType, gridScale, num ) ( pixelW * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) #define GRID_Y( gridType, gridScale, num ) ( pixelH * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) //Size of a grid cell #define GRID_SCALE 8 Task1 = [ "<t size='1.2' align='left' underline='1'>TEST</t><t size='.7' align='left'><br />Testing<br />Tested</t>", safeZoneXAbs + GRID_X( pixelGrid, GRID_SCALE, 2 ), safeZoneY + GRID_Y( pixelGrid, GRID_SCALE, 5 ), 50, 1, 0, 222 ] spawn BIS_fnc_dynamicText; Where GRID_SCALE is the size of a grid. Where 2 and 5 are the number of grids to place your dynamic text at. So x is left hand side of the screen( safeZoneXAbs ) plus 2 grids of size 8( GRID_SCALE ). And y is top of the screen( safeZoneY ) plus 5 grids of size 8( GRID_SCALE ) Where pixelGrid obeys screen resolution and games UI scale setting. Can be replaced with pixelGridNoUIScale if you do not want it to scale with games UI scale. cant get this to work, i still need some help. where would i put this part: // Pixel grid #define SCALEFACTOR getNumber( configFile >> "uiScaleFactor" ) #define GRID_X( gridType, gridScale, num ) ( pixelW * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) #define GRID_Y( gridType, gridScale, num ) ( pixelH * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) //Size of a grid cell #define GRID_SCALE 8 and can i call this part then from sqf/trigger etc..? Task1 = [ "<t size='1.2' align='left' underline='1'>TEST</t><t size='.7' align='left'><br />Testing<br />Tested</t>", safeZoneXAbs + GRID_X( pixelGrid, GRID_SCALE, 2 ), safeZoneY + GRID_Y( pixelGrid, GRID_SCALE, 5 ), 50, 1, 0, 222 ] spawn BIS_fnc_dynamicText; Share this post Link to post Share on other sites
Larrow 2822 Posted January 26, 2021 Spoiler //description.ext class CfgFunctions { class ProjectName { tag = "TAG"; class Category { file = "TAG\functions"; class dynamicText { }; }; }; }; //TAG\functions\fn_dynamicText.sqf #define SCALEFACTOR getNumber( configFile >> "uiScaleFactor" ) #define GRID_X( gridType, gridScale, num ) ( pixelW * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) #define GRID_Y( gridType, gridScale, num ) ( pixelH * gridType * ((( num ) * ( gridScale )) / SCALEFACTOR )) #define GRID_SCALE 8 Task1 = [ "<t size='1.2' align='left' underline='1'>TEST</t><t size='.7' align='left'><br />Testing<br />Tested</t>", safeZoneXAbs + GRID_X( pixelGrid, GRID_SCALE, 2 ), safeZoneY + GRID_Y( pixelGrid, GRID_SCALE, 5 ), 50, 1, 0, 222 ] spawn BIS_fnc_dynamicText; //in trigger [] call TAG_fnc_dynamicText; Replace TAG ( in CfgFunctions(tag and file), file path and function call ) with your own identifier. 1 Share this post Link to post Share on other sites
Alert23 215 Posted January 26, 2021 Thank you it finally solved my problem after years =) Share this post Link to post Share on other sites
Alert23 215 Posted February 2, 2021 is there also a way to ignore "Interface size"? because i noticed if some people changed their "Interface Size" then the text also will be offscreen or not were its supposed to be. Share this post Link to post Share on other sites
Larrow 2822 Posted February 3, 2021 https://community.bistudio.com/wiki/Arma_3:_Pixel_Grid_System Quote The following three script commands offer different variants of the pixelGrid: pixelGridBase: Returns grid size based on screen resolution. pixelGridNoUIScale: Returns grid size based on screen resolution and configs pixelGrid: Returns grid size based on screen resolution, interface size and configs Task1 = [ "<t size='1.2' align='left' underline='1'>TEST</t><t size='.7' align='left'><br />Testing<br />Tested</t>", safeZoneXAbs + GRID_X( pixelGridNoUIScale, GRID_SCALE, 2 ), safeZoneY + GRID_Y( pixelGridNoUIScale, GRID_SCALE, 5 ), 50, 1, 0, 222 ] spawn BIS_fnc_dynamicText; 1 Share this post Link to post Share on other sites
Alert23 215 Posted February 4, 2021 thank you very much for all of your help on the forum! this is the outcome Spoiler 1 Share this post Link to post Share on other sites