ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linux]

Oscoz
Posts: 25
Joined: 14 May 2014 12:28
Location: Brazil

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#21 Post by Oscoz » 01 Oct 2014 18:02

Hi NitroUK;

This is what Miz is working on right now I believe. It will be awesome to have it implemented. It would be a Remote Dashboard, all with icons and simbols or even the complete dashboard with functional buttons.
It's nice to have somebody else giving a try to get that challenge complete.
Hope you have success.

Oscoz
kokkie20
Posts: 53
Joined: 01 Feb 2014 12:05
Location: Somewhere underground in a bunker in The Netherlands

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#22 Post by kokkie20 » 05 Oct 2014 13:59

Well maybe u can help me cause i have no clue what i am doing wrong...
I downloaded your remote and bought the android version of the app (so i could use your remote)
Tough it finds the server, and the server receives all the "keys" (So as example the start engine = e) the server logs says it founds button press e
Also works fine in notepad, it will show up there.
Tough when i want to use it when i am driving my truck it just won't respond.
Any idea what can be wrong?

Hope you know a solution or else it's a waste of my money for the app :/

Edit:

also to note, am using the v3 as the remote as the server.
Server log for testing:
2014-10-05 14:15:42 (T) Agent: action: mizifih.ETS2ButtonBox.handbrake
2014-10-05 14:15:42 (T) EventLoop: enqueing event handler for
2014-10-05 14:15:42 (T) EventLoop: dequeued event handler for
2014-10-05 14:15:42 (T) LuaInstance: run: mizifih.ETS2ButtonBox.handbrake
Oscoz
Posts: 25
Joined: 14 May 2014 12:28
Location: Brazil

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#23 Post by Oscoz » 07 Oct 2014 01:19

kokkie20

Check were you placed Miz file.

It shoud be placed at

Code: Select all

C:\ProgramData\Unified Remote\Remotes\Custom
It is a hidden file, you must change Win proprieties to show hidden files.

Oscoz
User avatar
mizifih
Posts: 24
Joined: 18 Sep 2014 17:09
Location: Brazil
Contact:

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#24 Post by mizifih » 08 Oct 2014 14:23

Hey guys, sorry for my absence! I really appreciate all the feedback. I really needed to give it a little break, life got a little crazy and the little time off I had I used to recharge my batteries. But this little project is not dead and I'll keep stuff going. I'll try to reply the suggestions and problems you guys thrown here :)

Tell me if you guys need something for the state it is now, I mean, is it working ok, all keys/buttons? I'll fix stuff for this state and move on to the next build, with images. Fancy stuff, right!?


NitroUK

I'm glad it all worked fine for you. About your suggestion, I really didn't have the time to play around with images. It is possible to use images, that I know, and I can use PNGs as I please, I just really don't know yet how it works. I can also change buttons style, or replace them while the remote is being used, I actually did that with the Hold/Release Enter. But one thing I know for sure, the remote can't read your truck status, so let's assume you start using your remote when you already have your truck engine working, the remote will load saying your engine is turned off. So when you press the button on your remote, it'll turn your engine Off and say it's On. But I can definitely do that, use different images for On/Off state. All we'll need to do is start the engine using the remote. It can be done for lights, handbrake, whatever, if it's a switch, it's doable, just knowing that you'll need to adjust the remote to the current status of your truck. I'll test it more to check what is kept turned on when you stop and leave the game, like turn off the truck with lights on and leave the game and when you get back, if you turn on your engine, the lights will still be on. That can impact the remote switches.

About the dashboard looks, well, background is no go for now, we can't customize remote background, but I believe they will add more stuff. And I actually need to check some new stuff they were implementing, maybe I'm wrong and they added that option, I don't know, I've been away from it for a while and I need to check their forum and dev to update my knowledge. It would be impossible to merge all images giving the feeling it's a dashboard, like placing one image next to the other making it look like one big image, we all use different devices, meaning a lot of display sizes and resolutions. But if they add background, I would at least add a texture to give a dashboard vibe and use switches instead.

I really liked your suggestions. Also, if you know a place where I can find images for the buttons, that would be awesome. I'm not a designer myself. I googled a little last month and I didn't find suitable images for the remote. I could really use a good icon set.

Oscoz,

Thank you for holding the fort while I was away. I will yet need a little more time to get back to it, but I believe I can spare some time next week.

kokkie20

Have you got it working? I would hate to see you wasting your money. Sorry it took me like 3-4 days to reply.

I also had that problem, once it would just work initially and once I ALT-TABed the remote would stop working...

I'm assuming you put the remote in the right place, since it worked with notepad.

All I did was uninstall the remote and install it again. It was something with my installation. There is an option to use their input driver, I honestly don't remember if I had it installed or not, but try it, with and without and check what works better for you. I can even ALT+TAB now and my remote just don't stop working.

Reply here if you got it working, please.
ETS2 Virtual Button Box, for Android, iOS & Windows Phone,
Windows, Mac OS and Linux distros. Click to learn more.

My profile at worldoftrucks.com
Oscoz
Posts: 25
Joined: 14 May 2014 12:28
Location: Brazil

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#25 Post by Oscoz » 08 Oct 2014 16:46

Hi Miz;
Glad to see you back.
There is a small error at the Navigation (Zoom) box. When you tap it, instead of the Navigation it is pausing the game (F1).
I have corrected on my copy, so just take a look.

Single Enter key still not working with Ipad but the other enter (hold) takes care.

While you check the possibility of using images PNG, I would say it could be fixed images, maybe you can change the labels of the letters like (L) you can use Lights on/off, and so one.
By the way, think about to reserve the letter (U) which on the next update from scs will raise the wheels.
Look at :
http://blog.scssoft.com/

Keep in touch

Oscoz
kokkie20
Posts: 53
Joined: 01 Feb 2014 12:05
Location: Somewhere underground in a bunker in The Netherlands

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#26 Post by kokkie20 » 08 Oct 2014 17:24

got it working now :)
after reinstalled it about 10 times (for real) it finnaly worked on the game :D
modified it a little bit to my needs (thanks for the example you gave me :D )
And thanks again for letting me know about this, it's a faster solution at the moment for me then making my own button box :D

edit: ok this is awesome
just got it working so when u press a "button" it changes image :D
As example beacons :D

first its a red icon,
after pressing it it turns green icon :D
now only need to find a way to disable that the buttons become smaller, and that the background of the image (the green one) not turning gray...
User avatar
mizifih
Posts: 24
Joined: 18 Sep 2014 17:09
Location: Brazil
Contact:

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#27 Post by mizifih » 10 Oct 2014 12:36

Before I start answering you both, please, if you like, create a post with your work on this thread and I'll link your post on my first one.
People may like yours better. We are here to share, right!? It's not like I want people to use mine, I want people to use whatever they think works better in their case. And let's be honest, I am a little behind schedule, and you guys appear to be a little more invested then I am right now. So feel free to share your stuff here, I'll gladly link it on my first post :)

Thank you both, for helping and discussing this out :)

Oscoz,
I think I have a better version at home. I'm at work now and I'll probably have some spare time tonight to fix some stuff and upload it. I thought that I already changed the enter button, making it get held down for like half a second and release it, maybe a second, who knows how much it'd be necessary, but one thing is for sure, if holding it works, this method probably will, it's just a matter of how much time it must be held down. I think I have that done at home. I don't know... I'll try to check it out tonight and update it here. I hope so.

Sleep execution for time milliseconds: os.sleep(time);

Code: Select all

--@help Tap Enter
actions.enterTap = function ()
	kb.down("return");
	os.sleep(500);
	kb.up("return");
end
kokkie20,
I'm really happy it worked out fine.
You could replace the button for another one that does pretty much a whole lot of nothing and use any color you want, or image. Use visibility="gone", or mabe just replace it. Since I'm not using it for a while, I can't remember exactly how I did it, but I am using this "replace" workaround with Enter (Hold/Release) button. I remember I did that, just don't know why I didn't update it here. You can also change the text of a button, "text="hello world".

.lua file

Code: Select all

--@help Hold Enter
actions.enterHold = function ()
	layout.enterHold.visibility = "invisible";
	layout.enterRelease.visibility = "visible";
	kb.down("return");
end

--@help Release Enter
actions.enterRelease = function ()
	layout.enterHold.visibility = "visible";
	layout.enterRelease.visibility = "invisible";
	kb.up("return");
end
.xml file:

Code: Select all

<row>
	<button ontap="advisorDiagnosticsPage" color="#225533" text="Diagnostic"/>
	<button ontap="advisorInformationPage" color="#225533" text="Info"/>
	<button ontap="advisorMode" color="#797A9D" text="Toggle Advisor"/>
	<button ontap="enterHold" color="#73965F" text="Enter (Hold)" visibility="visible" id="enterHold"/>
</row>

<row>
	<button ontap="cameraInterior" color="#B36329" text="Seat Camera"/>
	<button ontap="roofCamera" color="#B36329" text="Top-Down Camera"/>
	<button ontap="nextCamera" color="#B36329" text="Toggle Camera"/>
	<button ontap="enterRelease" color="#73965F" text="Enter (Release)" visibility="invisible" id="enterRelease"/>
</row>
You must set the visibility on your XML, if you don't, it doesn't change when you use function. I'd placed both buttons on the same row, one next to the other, and use the visibility property switching between "gone" and "visible", instead of "visible and "invisible", so it would give the impression that the button is changing. Try that out, see how it works for you. That's what I'm planning on doing with mine to give this feeling of changing buttons.
ETS2 Virtual Button Box, for Android, iOS & Windows Phone,
Windows, Mac OS and Linux distros. Click to learn more.

My profile at worldoftrucks.com
kokkie20
Posts: 53
Joined: 01 Feb 2014 12:05
Location: Somewhere underground in a bunker in The Netherlands

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#28 Post by kokkie20 » 10 Oct 2014 13:37

got it all working now as it should be :)
It shows just the beacon image as a big "button" (as far as i could find , unified remote auto fills the row with what ever u have in it) so u can't set a width size (hope they will fix that soon....)
but thanks for the help tough
User avatar
mizifih
Posts: 24
Joined: 18 Sep 2014 17:09
Location: Brazil
Contact:

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#29 Post by mizifih » 10 Oct 2014 16:05

You can set sizes, but I wouldn't recommend it. Since each device has it's screen size. That's the thing, you must know and make it ready to show on 1080p tablets as well as 720p phones (or even smaller ones). One solution would be make one for each resolution level (480p, 720p and 1080p), all you have to do is change the image, since the remote itself would fit the screen, at least they are supposed to do that. Find the size, and use blank space.

I hope I can play around with it tonight :)
ETS2 Virtual Button Box, for Android, iOS & Windows Phone,
Windows, Mac OS and Linux distros. Click to learn more.

My profile at worldoftrucks.com
kokkie20
Posts: 53
Joined: 01 Feb 2014 12:05
Location: Somewhere underground in a bunker in The Netherlands

Re: ETS2 Button Box [Android, iOS & WPhone - Win, Mac & Linu

#30 Post by kokkie20 » 11 Oct 2014 17:48

This is what i got so far (still a WIP)

Red buttons are not activated
[ external image ]

Green buttons are activated
[ external image ]

Don't mind the placement of the beacon one ( the single icon thingy)
Still need to adjust a few more buttons and make images for it :)

also i made a little change to your enter hold code :)
It's easier and it saves you 1 space for a extra button :D
Its almost the same as you have, just mine is in 1 button, auto changes text (was easy to do :D) and it just is a toggle button :)
Using almost the same code for my other buttons i got on my remote.

Code stuff;

layout.xml:

Code: Select all

<toggle id="EnterHold" text="Enter (Hold)" light="normal:#73965F;focus:#73965F;active:#73965F;color:#FFFFFF" checked="false" onchange="enterHold" />
remote.lua:

Code: Select all

actions.enterHold = function (checked)
	if checked == true then
		kb.down("return");
		layout.EnterHold.text = "Enter (Release)";
		--print("enter on");
	else
		kb.up("return");
		layout.EnterHold.text = "Enter (Hold)";
		--print("enter off");
	end
end
Post Reply

Return to “Other”

Who is online

Users browsing this forum: No registered users and 6 guests