当前位置:网站首页>Combination of fairygui check box and progress bar
Combination of fairygui check box and progress bar
2022-07-06 12:42:00 【SQ Liu】
FairyGUI Combination of check box and progress bar
One 、 preparation
1、 New package ProgressBar
You can create a new package based on the previous case .

2、 New component


3、 Import material
Click here to download the material 
Two 、 Progress bar
1、 New progress bar


2、 Fine tune the progress bar

3、 Progress bar running animation
In order to make the progress bar less monotonous , You can add an animation to it . When making the progress bar stretch , The squirrel moves to the right as the progress bar increases . That is, there is such an effect of running with , It looks more vivid .
Set correlation 

3、 ... and 、 A drop-down box
1、 Create a new drop-down box






2、 Set the drop-down box


3、 The drop-down box completes the effect

Four 、 Packaging releases



5、 ... and 、Unity It shows that


6、 ... and 、 coded

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using System;
public class ProgressBar : MonoBehaviour
{
private GComponent mainUI;
private GProgressBar progressBar;
private GComboBox comboBox;
void Start()
{
mainUI = GetComponent<UIPanel>().ui;
progressBar = mainUI.GetChild("n0").asProgress;
progressBar.TweenValue(100, 5); //100 Is the progress to be loaded ,5 It takes time
comboBox = mainUI.GetChild("n4").asComboBox;
comboBox.onChanged.Add(SetCompleteTime);
}
private void SetCompleteTime()
{
progressBar.value = 0; // Each reload sets its progress to 0
progressBar.TweenValue(100, Convert.ToInt32(comboBox.value));
}
}
7、 ... and 、 Final effect




边栏推荐
- [leetcode19] delete the penultimate node in the linked list
- How to add music playback function to Arduino project
- 1081 rational sum (20 points) points add up to total points
- 如何给Arduino项目添加音乐播放功能
- (一)R语言入门指南——数据分析的第一步
- C programming exercise
- Database course design: college educational administration management system (including code)
- Introduction to the daily practice column of the Blue Bridge Cup
- [899] ordered queue
- InnoDB dirty page refresh mechanism checkpoint in MySQL
猜你喜欢

基於Redis的分布式ID生成器

Latex learning

基于Redis的分布式ID生成器

Derivation of logistic regression theory

Easy to use shortcut keys in idea

(三)R语言的生物信息学入门——Function, data.frame, 简单DNA读取与分析

JS 函数提升和var变量的声明提升

Types de variables JS et transformations de type communes

Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights

Unity scene jump and exit
随机推荐
Introduction to the daily practice column of the Blue Bridge Cup
Conditional probability
單片機藍牙無線燒錄
FairyGUI复选框与进度条的组合使用
[leetcode19]删除链表中倒数第n个结点
Postman 中级使用教程【环境变量、测试脚本、断言、接口文档等】
FairyGUI简单背包的制作
idea中导包方法
Guided package method in idea
NRF24L01 troubleshooting
[offer9] implement queues with two stacks
JS variable types and common type conversions
Navigator object (determine browser type)
ORA-02030: can only select from fixed tables/views
Basic operations of databases and tables ----- modifying data tables
Esp8266 connect onenet (old mqtt mode)
Programming homework: educational administration management system (C language)
Detailed explanation of truncate usage
Naive Bayesian theory derivation
Solution to the problem of automatic login in Yanshan University Campus Network