How do I code a jpeg image of a group photo of my son's soccer team to pop-up info on individual players? - modal-dialog

I have a group photo of my son's soccer team. I'd like to learn how to code this .jpeg image as a web page that can display information (in a small dialog box) about each individual player upon rolling over that individual.
For example, if the web page is presented to you and roll over the goal keeper, it would display his name, position, age, and various notes. As soon as you move the cursor to another player, information on that player would pop-up in another dialog box. Of course, only ONE (the current active) dialog box would be shown.
I'm a newbie, so please be gentle as I would need very explicit step-by-step instructions.
I've attached an example of the team photo.
SOCCER TEAM PHOTO

Related

SwiftUI tap on image to select an area - better way than this?

Updating an app I did for a car club that connects their customers (dealerships, parties, firehouse events, town events, tv commercials, magazine ads, etc) with their members to rent out fancy/classic/muscle cars for photo ops and eye-candy at events. The car owner gets paid, the car club takes a small percentage for club costs and events. It handles CRM stuff, scheduling, photos, etc.
The new feature they want is a way to quickly look over a car before and after an event, tap an area on the screen and describe any damages (plus other functions). They want to be able to look up stuff over time and do comparisons, etc., perhaps generate repair invoices, etc.
I have come up with a basic formula that works: image of the car is displayed, a transparent mask image above it in the z-order, masked with different colors. The user taps, I look up the color at the tap event, draw a circle on the image, use that color as an index into part or region list, record all the info, and bob's your uncle.
This just shortcuts having a bunch of drop downs or selectors or whatever to manually pick a part or region from a list, and give is some visual sugar.
Works, works nicely, and is consistently reliable (images are PNG - colors get munched up too much in JPG compression). This works great. It all falls apart if they decide they want to change images; they want me to retroactively draw circles on the new images based on old records' information. My firm line so far has been "no, you can't do that", because the tap locations are tied to the original images. They're insistent on trying, so...
I have two questions.
First is simple - am I missing something painfully obvious as a better way to do this? (select a known value for a section of a graphic)?
Second one is - loading stock images into the asset catalog, displaying them from 1x images, finding the scale value and adjusting tap locations, etc., all works great. At 2x and 3x, the scaling gets wonky. Loading from storage is the bigger issue... it seems when I load a pair image files from storage, turn it into a Data object, then shove that into a UIImage for display in a SwiftUI Image View, I lose the easy scaling from when I embed images in the assets catalog under the 1x slot. Is there a way to load the file->Data->UIImage->Image( uiImage: xxx ) and force a 1x rendering, skipping any auto-rendering/scaling that iOS might do?
Thoughts?
Below are quickly masked sample images I'm using to display the car and mask, each green area is slightly different in the RGB's G value, and I just use that as the lookup key for the part name in the description ("Front left fender", "Rocker panel", "Left rear wheel", "Windshield", and so forth).

Dynamically generate interface using ScriptableObjects

Hello fellas!
Currently working on an AR application, I am learning and playing around with the ScriptableObjects.
With a little to no programming background (less than an effective year), I am struggling a little bit on some parts.
I am trying to create a frame, for a "home-made" video player, with interactive elements (aka buttons).
So far, both the sprites and external links for theses buttons (social media, shops, websites) are stored inside ScriptableObjects (same goes for the frame's sprite, and the video player related elements, such as the renderTexture or the videoClip).
I would like to go further, by creating a prefab letting me choose the number of buttons and their positioning.
For example, let say I have to create 2 different video players :
VideoPlayer_A the player and the frame, and 3 buttons (facebook, twitter and website)
VideoPlayer_B the player and the frame, and 2 buttons (facebook and website)
How can I achieve this, considering that the buttons (either be it 1, 2 or 4 -maximum-) must hold and have equal space on top of the frame (see screenshot bellow).
The final goal is to have a very modular system, creating frames according to the data I have.
As a final note, I am not asking for the "already made" solution, but more for the path to achieve what I am looking to. As I am still learning, I am looking for hints, "ways to do" but not directly the solution.
Thanks, by advance ;)

Displaying an image on Unity's timeline

I am looking to create a Unity timeline tool that will display images onscreen in the manor of a story board, one after another, I have the display part down but I would love to be able to preview the image that is being shown on the timeline itself
any tips or pointer you can give me will be appreciated.
Select the object that contains the PlayableDirector your scene hierarchy.
Select "Preview" in the timeline and,
Use the "Scrubber" (the white vertical line) to move through the timeline sequence.
The "Game" and "Scene" window will both display the animation while out of play mode.

Show a select emoji screen

I am doing a game with Unity3D in which there are 2 players using the same mobile device in turns to play.
I am adding a Settings scene in which each players enters his/her name and can select an Emojicon to use as an avatar in the game.
I have already imported the png file in to my Resources folder and cut it to 80 sprites using the sprite editor called emojicons1_0 to emojicons1_79.
What I need is to enable the players to change the default emojicon in the Settings if they touch the existing emojicon or a button "Change" beside it.
I was thinking of showing a scroll list from the asset called Gamestrap UI and display an array of 4 x 20 emojicons, and they can select there the desired emojicon. I don't know how to do this, and I appreciate any help. I am open to other suggestions of course.
Thanks in advance for any help.
if you are using uGui, there is a number of ways to do it. I would simply create a view prefab, which will composed of scroll list with grid layout inside. It will have a script attach, which will initialise the view by loading textures/sprites and set it to image component of an instantiated button prefab, which represents one icon to select. Then view has callback and on click simply call it with selected image.
Here is references:
https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-scroll-rect
https://docs.unity3d.com/ScriptReference/UI.GridLayoutGroup.html

know object behind another object is fully visible

I have developed scratch card effect.I am stuck at logic of how can I know object got visible which is behind the scratch card image? So that I can show reward screen.
PS: with modifications in this link I able to work this scratch card effect in uGUI.
There are many ways you could go about this. Assuming you know the dimensions of the red "target image" that the user is trying to uncover, you could take a fixed number of samples from the area that the target is under. Once, say, 80% of those samples are transparent (i.e. the target is visible at those positions), you can consider the object visible and show the reward screen.
You can use GetPixel to get the individual samples from the scratch texture.