如何执行C#Directx文字叠加层 [英] How to do a C# Directx Text Overlay

查看:142
本文介绍了如何执行C#Directx文字叠加层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google上进行了搜索,但是找不到想要的东西.
我正在为游戏制作一个应用程序,它将在屏幕中央的底部覆盖一些文本,但是我似乎无法弄清楚,该文本最多为16个字符,需要加载从我的标签输出文本.

有什么办法可以在C#中做到这一点吗?如果是这样,有人可以告诉我怎么做吗?

I searched on Google, but I couldn''t find what I wanted.
I am making an app for a game, which will overlay some text in the centre of the screen, at the bottom, but I can''t seem to figure it out, the text will be 16 characters maximum, and needs to be loaded from my labels output text.

Is there a way I can do this in C#? If so, could someone please tell me how?

推荐答案

问题表明您没有使用WPF进行开发,这就是为什么覆盖层有问题.为什么? WPF本身完全基于DirectX.结果是:没有重叠的概念,因为任何东西都可以重叠"在任何东西上;什么都没有.例如,您可以在视频剪辑的顶部放置任何控件.

您没有询问有关基础的具体UI库的任何问题,问题是在C#中执行此操作",因此,这实际上是答案,一种可能的方法,最简单的方法.

—SA
The question shows that you don''t develop using WPF, that''s why you have problems with overlays. Why? WPF itself is totally based on DirectX. One consequence is this: there is no a notion of overlay as anything can be "overlayed" on anything; anything at all. You can put any control on top of video clip, for example.

You did not ask anything about concrete UI library of foundation, the question was "do this in C#", so this is the answer, one of the possible ways, the easiest one, in fact.

—SA


这篇关于如何执行C#Directx文字叠加层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆