teamcrisiz Posted February 26, 2015 Report Share Posted February 26, 2015 transparent images do not display correctly, why? I have a .png file converted to .paa. it does not display properly, you only see the shadow. hpp: class RscTitles { class wm_disp { idd = -1; onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]"; fadein = 0; fadeout = 0; duration = 10e10; controlsBackground[] = {}; objects[] = {}; class controls { class wm_text2 { idc = 1; x = safeZoneX+0.027;//safeZoneW*0.01; y = safeZoneY+safeZoneH-0.16; w = 0.151*safeZoneH; h = 0.057*safeZoneH; shadow = 2; class Attributes { font = "EtelkaNarrowMediumPro"; color = "#24FFFFFF"; align = "left"; valign = "middle"; shadow = 2; }; colorBackground[] = { 1, 0.3, 0, 0 }; font = "EtelkaNarrowMediumPro"; size = 0.06*safeZoneH; type = 13; style = 0; text=""; }; }; }; }; sqf: _pic = "images\bottompic.paa"; [ '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />', safeZoneX+0.02, safeZoneY+safeZoneH-0.18, 99999, 0, 0, 3090 ] spawn bis_fnc_dynamicText; at the moment I just took jpeg with a white background. this is ugly. kayzee 1 Link to comment Share on other sites More sharing options...
0 KiloSwiss Posted February 27, 2015 Report Share Posted February 27, 2015 Save the .paa as "rgba". teamcrisiz 1 Link to comment Share on other sites More sharing options...
0 Zupa Posted February 27, 2015 Report Share Posted February 27, 2015 Save the image as a power of 2 in a square. So accepted sizes in pixels: 2 x 2 4 x 4 8 x 8 16x16 32x32 64x64 128x128 256x256 512x512 1024x1024 2048x2048 and so on. I had the same issue once for my Hud, ^^ took me a while of debugging why it happenned to me, such a stupid mistake of mine. Picture of where the issue came up. teamcrisiz 1 Link to comment Share on other sites More sharing options...
0 KiloSwiss Posted February 27, 2015 Report Share Posted February 27, 2015 It also accepts other combinations like 6x12, 48x48, 386x386,64x128, 512x1024, 900x1200, 1024x2048 etc.Greez KiloSwiss teamcrisiz 1 Link to comment Share on other sites More sharing options...
0 teamcrisiz Posted February 27, 2015 Author Report Share Posted February 27, 2015 thx guys. saved as rgba and 128x128. @zupa daamn, looks pretty good ;) axeman 1 Link to comment Share on other sites More sharing options...
0 kayzee Posted April 13, 2015 Report Share Posted April 13, 2015 thx guys. saved as rgba and 128x128. @zupa daamn, looks pretty good ;) how did you go abt the script and what will safe sone be for top right conner, thanks in advance Link to comment Share on other sites More sharing options...
0 Tango2k13 Posted April 14, 2015 Report Share Posted April 14, 2015 is there any tutorial about this? I try to get this to work and would be very happy if someone can make a short 3 lines Tutorial for this. Kind Regards Link to comment Share on other sites More sharing options...
0 Tango2k13 Posted April 15, 2015 Report Share Posted April 15, 2015 Bump Can anyone help me out please? Link to comment Share on other sites More sharing options...
0 Darth_Rogue Posted April 16, 2015 Report Share Posted April 16, 2015 Ooooo.....I like this! :D Link to comment Share on other sites More sharing options...
0 Darth_Rogue Posted April 16, 2015 Report Share Posted April 16, 2015 I'll throw up a tutorial now that I've got it working. Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted April 16, 2015 Report Share Posted April 16, 2015 init.sqf watermark = compile preprocessFileLineNumbers "watermark.sqf"; player spawn watermark; watermark.sqf _pic = "your_picture.paa"; [ '<img align=''LEFT'' size=''1.5'' shadow=''0.2'' image='+(str(_pic))+' />', safeZoneX+0.015, safeZoneY+safeZoneH-0.12, 99999, 0, 0, 3090 ] spawn bis_fnc_dynamicText; Have Fun!!! Link to comment Share on other sites More sharing options...
0 PAR4NA Posted April 20, 2015 Report Share Posted April 20, 2015 init.sqf watermark = compile preprocessFileLineNumbers "watermark.sqf"; player spawn watermark; watermark.sqf _pic = "your_picture.paa"; [ '<img align=''LEFT'' size=''1.5'' shadow=''0.2'' image='+(str(_pic))+' />', safeZoneX+0.015, safeZoneY+safeZoneH-0.12, 99999, 0, 0, 3090 ] spawn bis_fnc_dynamicText; Have Fun!!! How do I add in the upper right side? Link to comment Share on other sites More sharing options...
0 raymix Posted April 20, 2015 Report Share Posted April 20, 2015 How do I add in the upper right side? Adjust position values from the example. They are scalar 0.0 - 1.0, or you can think of them as 0% - 100% https://community.bistudio.com/wiki/SafeZone http://killzonekid.com/arma-scripting-tutorials-gui-part-3/ try something like (remember min value is 0 and max value is 1): safeZoneX+safeZoneW - 0.015, //since X axis top-right is 1, we need to remove a bit to move it left safeZoneY+0.12, //since Y axis top right is 0, we want to add a bit to it to move it down PAR4NA 1 Link to comment Share on other sites More sharing options...
0 PredatoRX91 Posted August 15, 2015 Report Share Posted August 15, 2015 Hello, I am trying to get this working but i am failing to do so. I have done the .hpp file, and included the file in description, also made the .sqf file, and the picture, but i doesnt showing up :( here is my sqf file: http://pastebin.com/g1uaiWZt hpp file: http://pastebin.com/wQWsHwPL description ext: http://pastebin.com/xUT06eSY Init.sqf: http://pastebin.com/uhcXnfBi I dont know but is it possible that DZGM is interfering with this? Can someone help me, what am i doing wrong? Thanks in advance Link to comment Share on other sites More sharing options...
0 kayzee Posted August 20, 2015 Report Share Posted August 20, 2015 create a an sqf file, name it watermark.sqf and paste this : _pic = "pics\pic.paa"; [ '<img align=''LEFT'' size=''1.8'' shadow=''0'' image='+(str(_pic))+' />', safeZoneX+0.02, safeZoneY+safeZoneH-0.18, 99999, 0, 0, 3090 ] spawn bis_fnc_dynamicText; In your init paste this: watermark = compile preprocessFileLineNumbers "custom\watermark.sqf"; player spawn watermark; make sure what ever picture your using is a perfect square, 256 x 256, or 128 x 128, hope this helps, dont change or add anything to description. Link to comment Share on other sites More sharing options...
Question
teamcrisiz
transparent images do not display correctly, why?
I have a .png file converted to .paa. it does not display properly, you only see the shadow.
hpp:
sqf:
at the moment I just took jpeg with a white background. this is ugly.
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now