Skip to main content

Advanced Cluster Part 1

Open the Scene Composer

Open the Empty solution

Save the solution to your custom destination

Import the resource bitmaps (right click in the Solution Explorer -> Solution -> Resources -> Bitmaps)

drawing-7-1676517003.png

grafik.png

Click at the "Select Files" button

drawing-7-1676517027.png

grafik.png

Select all the images in the "<cgi-studio-root>/cgi_studio_content/Resources/AdvancedCustomGauge" folder

Uncheck the "Create new folder for import" checkbox and press "OK"

drawing-7-1676517051.png

grafik.png

Now you should be able to see the imported bitmaps in the solution explorer (Solution -> Resources -> Bitmaps). By clicking at a single bitmap in the solution explorer, we can access its properties

drawing-7-1676517069.png

To be able to manipulate with the bitmaps easily, we can predefine their pivot point. Later we will use it as center of needle rotation and also for aligning the bitmaps together. Therefore we need to set the pivot to the middle of a gauge

drawing-7-1676517087.png

grafik.png

Click at the bitmaps and check the "Enable Pivot Hint" checkbox in its properties. Then set these numbers (in pixels) to set the pivot point to the bitmaps:

NeedleBmp: x = 17.5, y = 250

Needle_LighterBmp: x = 241, y = 245

Numbers_0-8Bmp: x = 325, y = 329

Numbers_0-240Bmp: x = 325, y = 329

Points_BlueBmp: x = 282, y = 282

Points_Blue_RedBmp: x = 282, y = 282

Delete the Scene3D (right click in the Solution Explorer -> Solution -> Scenes -> Scene3D and press "delete")

Open the Scene2D (double click in the Solution Explorer -> Solution -> Scenes -> Scene2D)

Set the display size (find the "Render Targets" tab) to X = 1680 and Y = 720 pixels

drawing-7-1676517112.png

grafik.png

Enable the camera swapping. This will lead to refreshing the display after each time this scene is renderred.

drawing-7-1676517131.pngdrawing-5-1688128256.png

Select the Editor camera option

drawing-7-1676517153.png

Now you should be able to move and zoom the camera view. The yellow rectangle will show the scene part that will be displayed

drawing-7-1676517186.png

Go to Toolbox -> Controls -> Common and copy the gauge control (right click -> copy)

drawing-5-1688128435.png
drawing-7-1676517205.png

Paste to the control folder in your solution (Solution Explorer -> Solution -> Controls)

Rename the gauge to “Custom_Gauge”“Custom_Gauge”

drawing-7-1676517224.png