所以我现在正在学习C++ 11,而且我已经掌握了它.我想使用不同的语言,因为我是越南语,我想制作一个使用越南字符的C++程序.
那么如何以与显示英语相同的方式显示越南语字符,如下所示:
cout << "Hello. This is English" << endl; //English
cout << "Chào. ?ây là ti?ng Vi?t." << endl; //Vietnamese
Run Code Online (Sandbox Code Playgroud)
我听说C++有<locale>.它有助于使越南人物出现吗?
您好,我是Unity新手,我试图使UI按钮在鼠标悬停在其上时更改其“源图像”,并且当鼠标不再位于该按钮上方时,该按钮的“源图像”恢复正常。我知道需要一个精灵作为按钮的源图像,所以我创建了两个图像精灵文件(一个是普通图像,另一个是鼠标悬停在按钮上时的点亮图像)。
现在这是具有正常源图像的播放按钮的屏幕截图
当鼠标移到按钮上时,按钮将通过点亮来更改其源图像
如何在C#中执行此任务?当鼠标悬停在C#上时,如何更改按钮的源图像?
这是我看了一些参考文献后得到的。我是Unity新手,对我的知识不足感到抱歉
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PlayButton : MonoBehaviour {
private PlayButton pb;
private Sprite newSprite;
// Use this for initialization
void Start () {
pb = GetComponentInChildren<PlayButton> ();
}
// Update is called once per frame
void Update () {
}
public void onClick(){
}
public void onPointerHover(PointerEventData eventData){
//When mouse hovers over the button, the button changes
pb.image.overrideSprite = newSprite;
}
}
Run Code Online (Sandbox Code Playgroud)