Comments (4)
Take a look at the code within FramesPerSecond class, it uses a font
rendering class that I've included in that project under
Capture\Hook\Common\TextElement.cs is passed to Hook\DX11\OverlayEngine.cs
which in turn uses the DXFont.cs and DXSprite.cs classes to render the text.
So you can simply do something like:
new Capture.Hook.Common.TextElement(new System.Drawing.Font("Arial",
16)) {Text="The
Text to display", Location = new System.Drawing.Point(5,5), Color =
System.Drawing.Color.Red, AntiAliased = true }
Note the use of Text=".....".
Cheers,
J
On Fri, May 1, 2015 at 8:41 PM, Csharper1972 [email protected]
wrote:
For example this line in DXHookD3D11.cs write on the screen the fps(frames
per second).new Capture.Hook.Common.FramesPerSecond(new System.Drawing.Font("Arial",
16)) { Location = new System.Drawing.Point(5,5), Color =
System.Drawing.Color.Red, AntiAliased = true }Now let's say i want to write on screen something else for example the
words "Hello World" on location instead 5,5 but 5,30How can i do it ? So when i'm running the game a Directx 11 game i will
see the frapes per second and under it i will see the text "Hello World"I tried to read about how making a Font in directx11 . For example i
searched in google and found about DirectWrite:
http://sharpdx.org/documentation/api/n-sharpdx-directwrite
But i didn't understand how to use it since in the Capture project the
SharpDX dosen't have the namespace DirectWrite.Maybe you know and can show me how to add more text on screen ? Like it
show the frames per second on screen so show other texts.I found how to do it in DXHookD3D9.cs but in the DXHookD3D11.cs it's hard
i couldn't find how to dit yet.β
Reply to this email directly or view it on GitHub
#25.
from direct3dhook.
Ok it's working but not as i wanted i mean i see the text but what i did is added this line: new Capture.Hook.Common.TextElement(new System.Drawing.Font("Arial",16))
{Text=FramesPerSecond.RunTime.ToString(), Location = new System.Drawing.Point(5,30), Color =
System.Drawing.Color.Red, AntiAliased = true }
And you can see i did: Text=FramesPerSecond.RunTime.ToString() and in the FramesPerSecond class(Not the Capture.Hook.Common.FramesPerSecond) i added this part:
static DateTime _startTime = DateTime.Now;
public static TimeSpan RunTime
{
get
{
return DateTime.Now - _startTime;
}
}
This is working fine in the DXHookD3D9.cs it's showing a clock showing me in real time how much time i'm playing. But in the DXHookD3D11.cs the line with the Text= it's just showing still text of the clock.
What should i do that it will show the clock running ?
from direct3dhook.
I mean that the line that display the fps i see on the game screen the fps change in real time live.
But the line with the Text = "text to display" when i'm doing
Text = FramesPerSecond.RunTime.ToString() i need to make Atl+Tab all the time to go to the windows and back to the game window then the value of the Text change. But i want that the Text will change in real time live on screen just like the fps.
from direct3dhook.
Probably need to add to diff spot, checkout how the frames per second is
added to the overlay engine in dx11
On Saturday, 2 May 2015, Csharper1972 [email protected] wrote:
I mean that the line that display the fps i see on the game screen the fps
change in real time live.
But the line with the Text = "text to display" when i'm doingText = FramesPerSecond.RunTime.ToString() i need to make Atl+Tab all the
time to go to the windows and back to the game window then the value of the
Text change. But i want that the Text will change in real time live on
screen just like the fps.β
Reply to this email directly or view it on GitHub
#25 (comment)
.
from direct3dhook.
Related Issues (20)
- Attempt to update image element every frame in d3d11? HOT 4
- Memory leak in hooked application HOT 7
- Question: Interactive UI Overlay HOT 2
- Strange exception HOT 1
- Failed injection in League of Legends HOT 9
- Error in InitialiseHook: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. HOT 1
- can I use this for simulate dirext input for games?
- Π‘hange of path *.dll
- cann't inject wow,error code:93913088 HOT 1
- Screenshot background window HOT 3
- Black screen when capturing from multiple clients HOT 8
- Captures Complete but Do Not Display, Overlay Does Not Display
- Region settings not correct. HOT 1
- Memory leak on screenshot HOT 5
- Memory leak on image draw HOT 2
- I need some help HOT 31
- Memory leak after unreasonable ammount of DrawOverlayInGame calls and large ImageElement HOT 7
- When creating an ImageElement with the "Bitmap bitmap" override, DXHookD3D11 throws an exception HOT 1
- What is CaptureInterface.StartRecording()? HOT 1
- Memory leakage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from direct3dhook.