Skip to content

Commit

Permalink
Merge pull request #10 from tuntematonjr/dev
Browse files Browse the repository at this point in the history
Fix bigger picture
  • Loading branch information
tuntematonjr authored Dec 10, 2023
2 parents 4368dfa + fd21b52 commit 1755688
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 21 deletions.
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 3
#define PATCH 2
#define PATCH 3
#define BUILD 20231210
5 changes: 4 additions & 1 deletion addons/startmarkers/functions/fnc_settingsDisplay.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ if (_open) then {
} else {
[] call FUNC(createSquadMarkers);
[] call FUNC(createVehicleMarkers);
};
};



File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions addons/utilities/biggerImage.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

class GVAR(biggerPictureInBriefingUI)
{
idd = 330000;
idd = BIGGER_PICTURE_MAIN_IDD;
onUnload = "_display closeDisplay 1;";
class ControlsBackground
{
class GVAR(BiggerPictureBackground): RscText
{
x = "safeZoneW + safeZoneX * 0.175156";
y = "safeZoneH + safeZoneY * 0.148";
x = "safeZoneX + safeZoneW * 0.175156";
y = "safeZoneY + safeZoneH * 0.148";
w = "safeZoneW * 0.665156";
h = "safeZoneH * 0.704";
style = 0;
Expand All @@ -19,19 +19,19 @@ class GVAR(biggerPictureInBriefingUI)
{
class GVAR(biggerPictureImage) : RscPictureKeepAspect
{
idc = 330001;
x = "safeZoneW + safeZoneX * 0.175156";
y = "safeZoneH + safeZoneY * 0.148";
idc = BIGGER_PICTURE_IMAGE_IDC;
x = "safeZoneX + safeZoneW * 0.175156";
y = "safeZoneY + safeZoneH * 0.148";
w = "safeZoneW * 0.665156";
h = "safeZoneH * 0.704";
text = "";
};

class GVAR(exitButton) : RscButton
{
idc = 330002;
x = "safeZoneW + safeZoneX * 0.783593";
y = "safeZoneH + safeZoneY * 0.148";
idc = BIGGER_PICTURE_BUTTON_IDC;
x = "safeZoneX + safeZoneW * 0.783593";
y = "safeZoneY + safeZoneH * 0.148";
w = "safeZoneW * 0.0515625";
h = "safeZoneH * 0.044";
//style = 0+2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

params ["_text", "_imagePath"];

private _text = format[ "<br/><font face='PuristaBold' size='15'><execute expression='[ %4 ] call %2'>%3 - Click here to open as bigger</execute></font> <br/><img image='%1' width='370m'/>", _imagePath, QFUNC(openBiggerPicture), _text, str _imagePath];
private _text = format[ "<br/><font face='PuristaBold' size='15'><execute expression='[%4] call %2'>%3 - Click here to open as bigger</execute></font> <br/><img image='%1' width='370m'/>", _imagePath, QFUNC(openBiggerPicture), _text, str _imagePath];

_text
21 changes: 14 additions & 7 deletions addons/utilities/functions/fnc_openBiggerPicture.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@
* [_imagePath] call tunuti_utilities_fnc_openBiggerPicture
*/
#include "script_component.hpp"

params ["_imagePath"];
private _display = findDisplay TUNUTI_FIND_MAPDISPLAY;

private _control = _display createDisplay QGVAR(biggerPictureInBriefingUI);
uiNamespace setVariable [QGVAR(biggerPictureInBriefingUI), _control ];
[{!isNull findDisplay 330000}, {
private _display = uiNamespace getVariable [QGVAR(biggerPictureInBriefingUI), displayNull];

if (!isNull _display) then {
_display closeDisplay 1;
diag_log "suljettiin vanha";
};

private _control = findDisplay TUNUTI_FIND_MAPDISPLAY createDisplay QGVAR(biggerPictureInBriefingUI);
uiNamespace setVariable [QGVAR(biggerPictureInBriefingUI), _control];

[{!isNull findDisplay BIGGER_PICTURE_MAIN_IDD}, {
private _imagePath = _this;
_textControl = (uiNamespace getVariable QGVAR(biggerPictureInBriefingUI)) displayCtrl 330001;
_textControl = (uiNamespace getVariable QGVAR(biggerPictureInBriefingUI)) displayCtrl BIGGER_PICTURE_IMAGE_IDC;
_textControl ctrlSetText _imagePath;
}, _imagePath] call CBA_fnc_waitUntilAndExecute;

}, _imagePath] call CBA_fnc_waitUntilAndExecute;
7 changes: 6 additions & 1 deletion addons/utilities/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_UTILITIES
#endif

#include "\x\tunuti\addons\main\script_macros.hpp"
#include "\x\tunuti\addons\main\script_macros.hpp"

#define BIGGER_PICTURE_MAIN_IDD 333333
#define BIGGER_PICTURE_IMAGE_IDC 333334
#define BIGGER_PICTURE_BUTTON_IDC 333335

0 comments on commit 1755688

Please sign in to comment.