Old 10-20-2023, 06:39 AM   #1
mister happy
Human being with feelings
 
Join Date: Mar 2017
Location: in the moment
Posts: 632
Default WALTER for custom TCP elements?

Hi,
I am interested in learning about the ability to add custom TCP elements.

To get started I set up a new theme with an empty TCP and have been trying to add a simple button and a command ID for "go to marker number 1." (I just picked that command because it seemed like an easy way to observe if the interaction worked).



This button is named tcp-custom-button-001.png



I am generally perplexed by code and syntax, but I tried to add WALTER code to the rtconfig that I thought might work.

Here is the code I used. It does not work. :-)

Code:
clear tcp.*

set tcp.size [460 80 ]

  ;custom tcp.custom.xyz text_label command_id accessibility_description button_image
  ;command_id 40161 = Markers: Go to marker 01

custom tcp.custom.button-001.button_image       tcp-custom-button-001.png
custom tcp.custom.button-001.command_id         40161

set tcp.custom.button-001 [20 20 20 20]

I am writing here to ask if someone can demonstrate-for-dummies what the code should really look like to make the button appear and work.

Thank you!

Last edited by mister happy; 10-25-2023 at 02:48 PM.
mister happy is offline   Reply With Quote
Old 10-20-2023, 07:05 AM   #2
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

Massive kudos for working with a blank theme!

Code:
+ WALTER: allow custom elements : custom mcp.custom.foo "Text Desc" command_id "accessibility_string" "image_name"
means one line to create the custom element, so

Code:
custom tcp.custom.button-001 "my button 1" 40161 "greetings tooltip users" "tcp-custom-button-001"
...not...

Code:
custom tcp.custom.button-001.button_image       tcp-custom-button-001.png
custom tcp.custom.button-001.command_id         40161
if you want to see some examples, I did some on the transport in v6.81+dev0715 here, and script.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 10-20-2023, 07:31 AM   #3
mister happy
Human being with feelings
 
Join Date: Mar 2017
Location: in the moment
Posts: 632
Default

Hi,
Thank you for the helpful info.

I was able to get it working just as I hoped.

Thank you for the links to the repository. I felt like Mr. McGoo visiting GitHub :-).

I'll spend some time reviewing the code in v6.81+dev0715.

Thank you!
mister happy is offline   Reply With Quote
Old 10-26-2023, 03:17 AM   #4
ArmTazar
Human being with feelings
 
ArmTazar's Avatar
 
Join Date: Feb 2022
Posts: 93
Default

Hello.
The truth is that the new functionality of adding buttons is quite simple. The tedious thing is knowing where to place it within the skin. I have already made four personalized ones, which I show you. It may be that in other layouts they are all, some or none.

I'll show it to you.


ArmTazar is offline   Reply With Quote
Old 10-26-2023, 06:57 AM   #5
mister happy
Human being with feelings
 
Join Date: Mar 2017
Location: in the moment
Posts: 632
Default

You're Awesome.

Thank you.
mister happy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.