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

CREATE GAME menu tweaks #1067

Merged
merged 1 commit into from
Feb 17, 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
15 changes: 14 additions & 1 deletion addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ private _fnc_findMissions = {
_display setVariable [QGVAR(stockMissions), _stockMissions];

lbSort _ctrlMaps;
_ctrlMaps lbSetCurSel 0;

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

private _ctrlSearch = _display ctrlCreate ["RscEdit", IDC_SEARCH];
Expand All @@ -34,6 +36,9 @@ _ctrlSearch ctrlSetPosition [
];
_ctrlSearch ctrlCommit 0;

private _filter = profileNamespace getVariable [QGVAR(Filter), ""];
_ctrlSearch ctrlSetText _filter;

private _ctrlSearchButton = _display ctrlCreate ["RscButtonSearch", IDC_SEARCH_BUTTON];
_ctrlSearchButton ctrlSetPosition [
_left + _width - 21 * GUI_GRID_W,
Expand Down Expand Up @@ -103,7 +108,15 @@ _display setVariable [QFUNC(filter), {
private _ctrlSearch = _display displayCtrl IDC_SEARCH;
private _ctrlMissions = _display displayCtrl IDC_SERVER_MISSION;

private _filter = toLower ctrlText _ctrlSearch;
private _filter = ctrlText _ctrlSearch;

if (_filter != profileNamespace getVariable [QGVAR(Filter), ""]) then {
profileNamespace setVariable [QGVAR(Filter), _filter];
saveProfileNamespace;
};

_filter = toLower _filter;

private _missions = _ctrlMissions getVariable QGVAR(missions);
private _stockMissions = _display getVariable QGVAR(stockMissions);
private _showStockMissions = profileNamespace getVariable [QGVAR(ShowStockMissions), true];
Expand Down