Beowulfv

Arma 3 Action text

10 posts in this topic

I'm trying to figure out how the text interaction works. When you look at a vehicle, container, ect. you get a list of actions and they are all displayed as a light grey color. When you scroll over a selection it turns to white. I've looked around the Arma 3 wiki and haven't found how to replicate this with my own custom actions. Currently I have a similar grey color set as the text color but when I scroll over it, it will stay the same color. Can anyone point me in the right direction?

1.4.7.png

Edited by Beowulfv

Share this post


Link to post
Share on other sites

Hello @Beowulf

What do you actually want?  Your own text appear or the colors to be changed?

 

Here is ONE way to ADD it:

In the vehicle's init field put:

this addAction ["<t color='#FF9900'>Select Me To Run Script</t>","RunMyScript.sqf",[],-1,false,true,"","_this distance _target < 8"];

 

Do note:  This script is old.  Will it work now?  I think so.  If not, you will have to consult the Wiki and modify.  Regardless, you have a FOUNDATION on which to build from...

 

:)

Edited by Z80CPU

Share this post


Link to post
Share on other sites
Advertisement
15 hours ago, Beowulfv said:

Currently I have a similar grey color set as the text color but when I scroll over it, it will stay the same color.

Might got ya wrong, do you even WANT a similar grey color and not the exact one exile is using?

If you add in an action without altering the colors (text formatting) it take the  values from CfgInGameUI deposited in config.bin 

colorBackground = {"19/255", "22/255", "27/255", 0.900000}; //dark grex action box
colorText = {"111/255", "113/255", "122/255", 1}; //light grey text
colorSelect = {1, 1, 1, 1}; //white text on selection
colorBackgroundSelected = {"63/255", "212/255", "252/255", 0.600000}; //light blue selected box

But i guess, you really want just a slight different grey for your custom action and once chaning the color on addaction by structured text, it'll will be that color only - selected or unselected.

Not sure if there is even a smart way to get around that and have a 2nd color if selected. If you find a way, let us know pls :)

 

class CfgInGameUI {

	class Actions {
		align = "0x00 + 0x08";
		shadow = 0;
		x = "(safeZoneX + safeZoneW * 0.5)";
		y = "(safeZoneY + safeZoneH * 0.6)";
		w = "300 * pixelW";
		font = "PuristaMedium";
		size = "18 * pixelH";
		rows = "5*SafeZoneH";
		arrowWidth = 0.015000;
		arrowHeight = 0.020000;
		iconArrowUp = "\A3\ui_f\data\igui\cfg\actions\arrow_up_gs.paa";
		iconArrowDown = "\A3\ui_f\data\igui\cfg\actions\arrow_down_gs.paa";
		background = "\A3\ui_f\data\igui\cfg\imageCornerElement_ca.paa";
		underlineSelected = 0;
		colorBackground = {"19/255", "22/255", "27/255", 0.900000};
		colorText = {"111/255", "113/255", "122/255", 1};
		colorSelect = {1, 1, 1, 1};
		colorBackgroundSelected = {"63/255", "212/255", "252/255", 0.600000};
	};

	class DefaultAction {
		font = "PuristaMedium";
		size = "18 * pixelH";
		colorText = {"255/255", "180/255", "24/255", 1};
		shadow = 2;
		showHint = 0;
		showNext = 0;
		showLine = 0;
		relativeToCursor = 1;
		offsetX = 0.000000;
		offsetY = 0.045000;
		hotspotX = 0.000000;
		hotspotY = 0.000000;
		textTipFade = 0.400000;
		textTipDelay = 0.400000;
	};

	class CommandBar {
		left = -1;
		top = -1;
		show = 0;
	};
};

 

Edited by WURSTKETTE
  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Z80CPU said:

What do you actually want?  Your own text appear or the colors to be changed?

I can make custom actions all day. I'm just trying to make them alter colors when highlighted like in the picture. An example would be the Interior Lock and Unlock I posted today in the script section. You'll see that when you scroll over Lock or Unlock the action isn't highlighted in white, but the original grey I have it set to.

 

5 hours ago, WURSTKETTE said:

Might got ya wrong, do you even WANT a similar grey color and not the exact one exile is using?

I just want it to look more normal. Grey when not selected, but when you scroll over it, it is highlighted in white. Like the picture above. When I scroll over Inventory it changes to white lettering and the others are still that transparent grey. Currently my custom actions will just remain that same transparent grey. I'm assuming I need to call the dialog to achieve this.

Share this post


Link to post
Share on other sites

I'm almost certain this should just work, as the colouring and design is already set in the mod itself. I run a couple of custom addActions and as far as I can remember they match the colouring and design of the default exile actions exactly.

Share this post


Link to post
Share on other sites
4 hours ago, kuplion said:

I'm almost certain this should just work, as the colouring and design is already set in the mod itself. I run a couple of custom addActions and as far as I can remember they match the colouring and design of the default exile actions exactly.

If you are adding them to an existing config in the the client side PBO, then yes. However, I am spawning these actions in thru the initPlayer.sqf which then I am setting the color and full functionality of the scroll wheel action. So I'm left trying to figure out what file to look at to get my example of how to replicate the already existing scroll wheel options.
 

[] spawn {
	while {true} do {
		waitUntil{!isNil "ExileClientLoadedIn"};
		UISleep 0.1;
		waitUntil{ExileClientLoadedIn};
		UISleep 0.1;
		waitUntil{alive player};

			LOCK_ACTION = player addAction ["<t color='#99ffffff'>Lock</t>", "true spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 0"];
			UNLOCK_ACTION = player addAction ["<t color='#99ffffff'>Unlock</t>", "false spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 2"];
			
		waitUntil{!alive player};
		player removeAction LOCK_ACTION;
		player removeAction UNLOCK_ACTION;
	};
};

 

Share this post


Link to post
Share on other sites

Also just a little clarification as to why I am spawning in the functions, any actions in the config require an interaction object to get the scroll wheel option. So with me spawning them in, I can control the condition as to why they appear i.e. no object need to interact with. Which leaves me to my A.D.D. delmar of trying to make the new scroll wheel actions look like and act like the already existing options. I know, annoying right? If I can't figure it out, it's really no big deal. This is strictly cosmetic, and my own annoying brain coming back to it.

Share this post


Link to post
Share on other sites
10 hours ago, Beowulfv said:

I am setting the color

I could be wrong but if i remember correctly, if you don't set a color it'll take the one defined by exile - did you tried that?

Instead of spawning it in, alternative, you could use class CfgInteractionsmenu in config.cpp it alsow allows conditions, wouldn't that also suit your needs?

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

Actually, I think this color is set by ARMA itself.  I remember in the Alpha stage others were complaining (and I was one of them in a minor way), that you could not define colors as individuals.  In a 'group' setting you could, but not as a separate item.  For example, you could select ALL menus to be a particular color, but not individual menus.

I did not put this in as I am not 100% sure of what you were asking, but I am 99% sure this color is controlled by ARMA set via the options menu.

Now, can you modify this?  Possible, BUT, all menus will have the ghosted color, not just your menu.

 

See:  http://www.armaholic.com/page.php?id=1252

Maybe this can give you some hints on it.  Do note, this is for ARMA 2 though (2008).

 

Also try this:

https://community.bistudio.com/wiki/setUserActionText

More HERE

 

Sadly, I think you're out of luck on this one.  I believe you can set the color (via the 'addaction' command)  it shows in the menu, but you cannot control the selected/ghosted colors except via options menu, which is applied system wide.  I could be wrong as this is getting beyond my skillset in ARMA scripting.

:(

Share this post


Link to post
Share on other sites

So I finally had more time to sit down and play around with this. @WURSTKETTE was right, if I remove the color settings for the text, then it functions normally. Simple grey text and switches to white highlight when selected. So simple and I was over thinking this way too much. Thank you all for the input. I'll still be able to use the rest of this information in later developments.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.