Mr Sin

Dialog Button Actions

6 posts in this topic

So I have been playing around with some dialogs and have created two buttons and I'm interested to see if it's possible to have one of them open the clients Teamspeak to the correct channel and then the other button to navigate to a website.

This is what I tried:

			class TSButton: RscButton
		{
			idc = 1600;
			text = "Teamspeak"; //--- ToDo: Localize;
			action = "<a href='ts3server://ts.hegexile.com'</a>";
			x = 0.422656 * safezoneW + safezoneX;
			y = 0.489 * safezoneH + safezoneY;
			w = 0.0773437 * safezoneW;
			h = 0.055 * safezoneH;
			tooltip = "Click this to join a help room in TS!"; //--- ToDo: Localize;
		};

			class WebButton: RscButton
		{
			idc = 1601;
			text = "Website"; //--- ToDo: Localize;
			action = "<a href='https://www.hegexile.com'</a>";
			x = 0.505156 * safezoneW + safezoneX;
			y = 0.489 * safezoneH + safezoneY;
			w = 0.0773437 * safezoneW;
			h = 0.055 * safezoneH;
			tooltip = "Click this to go to our website!"; //--- ToDo: Localize;
		};

I wasn't sure if HTML was even able to be used but I gave it a shot anyway. I tried reading up on anything similar but couldn't find anything. 

Thanks for giving this a read and appreciate anyone pointing me in the right direction.

Share this post


Link to post
Share on other sites

Don't know if you can attach a hyperlink to a button like that, share when you've tried it. 

If that doesn't work you can just create hyperlinks in a structured text instead, I know that works. Used it on my old SP4R Server. 

2 people like this

Share this post


Link to post
Share on other sites
Advertisement
11 hours ago, Janski said:

Don't know if you can attach a hyperlink to a button like that, share when you've tried it. 

If that doesn't work you can just create hyperlinks in a structured text instead, I know that works. Used it on my old SP4R Server. 

I didn't know if it was possible either, so I gave it a shot with no success.

This is the first time I have attempted to create anything from scratch by myself at all in Arma, so I will just substitute my idea for the structured text until I get more familiar with everything and give it another attempt at a later date. 

It's not really worth showing off what I had considering anyone could have made it in 5 minutes in the editor. I am also at work so I will give you an update later on as I'm keen to see whether I can actually add the teamspeak link and have it work as intended.

Share this post


Link to post
Share on other sites

Doesn't look like you can even add a "ts3server://" link as it just doesn't seem to open. An HTML redirect works, but it wasn't really the smooth transition from Arma > Teamspeak I was hoping for.

Share this post


Link to post
Share on other sites
2 hours ago, Mr Sin said:

Doesn't look like you can even add a "ts3server://" link as it just doesn't seem to open. An HTML redirect works, but it wasn't really the smooth transition from Arma > Teamspeak I was hoping for.

What if you rhyperlink it to a webpage which then redirect it to the TS

 

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

17 minutes ago, Janski said:

What if you rhyperlink it to a webpage which then redirect it to the TS

 

Ooh. I never thought of that. Will post results.

Edit: Works. Created new hidden page on website that the user will be directed to. I then used:

<HEAD>
	<META HTTP-EQUIV="Refresh" CONTENT="0;URL=ts3server://ts.hegexile.com?channel=%5Bcspacer%5DHelpTest">
</HEAD>

So as soon as the page opens, it will open up Teamspeak and place them in our help channel.

Thanks for your input.

Edited by Mr Sin
1 person likes this

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.