Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash when hosting server with large ui scale #1224

Merged
merged 1 commit into from
Sep 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ _ctrlMaps lbSetCurSel 0;

ctrlPosition _ctrlMissions params ["_left", "_top", "_width", "_height"];

private _widthSearchBar = (_width - 11 * GUI_GRID_W) min (10 * GUI_GRID_W);

private _ctrlSearch = _display ctrlCreate ["RscEdit", IDC_SEARCH];
_ctrlSearch ctrlSetPosition [
_left + 0.1 * GUI_GRID_W,
_top,
_width - 21.2 * GUI_GRID_W,
_widthSearchBar,
GUI_GRID_H
];
_ctrlSearch ctrlCommit 0;
Expand All @@ -44,7 +46,7 @@ _ctrlSearch ctrlSetText _filter;

private _ctrlSearchButton = _display ctrlCreate ["RscButtonSearch", IDC_SEARCH_BUTTON];
_ctrlSearchButton ctrlSetPosition [
_left + _width - 21 * GUI_GRID_W,
_left + 0.1 * GUI_GRID_W + _widthSearchBar,
_top,
GUI_GRID_W,
GUI_GRID_H
Expand Down