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-5-1731053141.png

• A Windows Open File Dialog titled "Import Resources" will be opened.

• Select all the images in folder "<cgi-studio-root>/cgi_studio_content/Resources/AdvancedCustomGauge" and press [ Open ].

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

drawing-5-1731053893.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-5-1731054028.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-5-1731054311.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-5-1731055033.png

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

drawing-5-1731055159.png

• Select the Editor camera option

drawing-5-1731055259.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-5-1731055363.png

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

drawing-5-1731056073.png

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

• Rename the gauge to “Custom_Gauge”

drawing-5-1731056126.png