{"id":119408,"date":"2024-11-25T14:18:39","date_gmt":"2024-11-25T06:18:39","guid":{"rendered":"https:\/\/www.tm-robot.com\/?post_type=docs&p=119408"},"modified":"2024-11-25T14:27:54","modified_gmt":"2024-11-25T06:27:54","slug":"how-to-use-tmcraft-shell-to-program-the-customized-ui","status":"publish","type":"docs","link":"https:\/\/www.tm-robot.com.cn\/en\/docs\/how-to-use-tmcraft-shell-to-program-the-customized-ui\/","title":{"rendered":"How to Use TMcraft Shell to Program the Customized UI"},"content":{"rendered":"
Examples are valid for:
\nTMflow Software version: 2.16 or above.
\nTM Robot Hardware version: HW 3.2 or above
\nOther specific requirements: None
\nNote that older or newer software versions may have different results.<\/p>\n
The following will use the game of blackjack to explain.<\/span><\/p>\n BlackJack is a game that combines human-computer interaction. This document will teach you how to use simple coding skills to make a game screen. For example: the main game screen transfers the variables of the TMflow project to the corresponding image, and the START button, etc.<\/p>\n \ud83d\udd25 Download<\/span> the<\/span> Black<\/span> Jack<\/span> Shell<\/span> ZIP<\/span> File<\/span>! <\/span>\ud83d\udc49\u00a0<\/span>Download Here!<\/a><\/p>\n You can design the main screen of the game by yourself. Here we convert our design to an image to show on the screen.<\/p>\n This button connects to the TMflow play function. When you tap it, the game will start.<\/p>\n After the game starts, the screen will show the introduction of the game so the player can check the game rules.<\/p>\n To help players understand the game process, we show the game status on the right top of the screen. Including the :<\/p>\n 1. Dealing cards<\/p>\n 2. Please replenish the cards<\/p>\n 3. Detecting gestures<\/p>\n 4. Poker card stuck<\/p>\n To make sure the UI follows the TMflow project, we use several global variables<\/strong> as commands and set up the connections to these variables in Visual Studio to display different images on the screen. For example the values of the cards.<\/p>\n After the player does the NO gesture, the TMflow project will follow the rules to calculate the total points of the card and send the result (as the variables: g_player_t) out to the TMcraft shell. When TMcraft gets the variable value, it will show the corresponding image of the number. Same as the dealer. (as the variables: g_dealer_total)<\/p>\n When both the player and the dealer reach the ideal total points, one of whom is busted, or one of whose total points are 21 within two cards, the TMflow project will compare the two, give the final result, and return the variable to the TMcraft shell.<\/p>\n <\/p>\nIntroduction<\/h1>\n
\n
<\/a><\/p>\n
<\/a><\/p>\n\n
<\/a><\/p>\n
<\/a><\/p>\n\n
<\/a><\/p>\n\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n\n
\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n\n