{"name":"ctrlSetPixelPrecision","operator":null,"title":"ctrlSetPixelPrecision","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPixelPrecision","revid":309215,"updated":"2022-05-03T22:40:41Z","groups":["GUI Control - Positioning"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.82"}],"since":{"game":"arma3","name":"Arma 3","version":"1.82"},"arma3_since":"1.82","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Switches mode of pixel precision (rounding) in a given control interface.","syntaxes":[{"syntax":"control ctrlSetPixelPrecision mode","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"},{"name":"mode","type":"Number or String","optional":false,"default":null,"description":"can be one of the following:\n- 0 / \"AUTO\" - control position (x, y, w, h) is always rounded to whole pixels (game default)\n- 1 / \"ON\" - control position (x, y, w, h) is rounded to whole pixels only when not animating\n- 2 / \"OFF\" - control position (x, y, w, h) is always precise, no pixel rounding applies here","types":["Number","String"],"since":null,"text":"mode: Number or String - can be one of the following:\n- 0 / \"AUTO\" - control position (x, y, w, h) is always rounded to whole pixels (game default)\n- 1 / \"ON\" - control position (x, y, w, h) is rounded to whole pixels only when not animating\n- 2 / \"OFF\" - control position (x, y, w, h) is always precise, no pixel rounding applies here"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"mode","types":["Number","String"]}}],"examples":[{"text":"```sqf\n_control ctrlSetPixelPrecision 2; // Enables pixel precision of the given control\n```","code":["_control ctrlSetPixelPrecision 2; // Enables pixel precision of the given control"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlCommit","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","ctrlSetPosition"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - Positioning","Introduced with Arma 3 version 1.82","Scripting Commands"]}