Actually it is very simple. As usual, we need to export the functions we are interested in to the Dynamic Library (DLL), and then import them into our C# program. Let's start.
C++ DLL
The first thing we need is to create a project in C++ for our future DLL, and of course configure it for the Leadwerks engine
Configuration for Release
Right-click on the project and select Property. In the window that appears, go to the tab "С/C++" / "General".
Copy and Paste to a "Additional In
Hello community, long time no see. I am working on my own graphical user interface, for my super duper rpg game :). The use separate textures for each button state, etc. I consider it not effective!
It is better to load the texture with the atlas of the whole GUI once. And use her.
In order to draw a texture from the atlas, we need to slightly modify the standard shader (drawimage), and save it under a different name (drawimagerect).
Shader
#version 400
uniform vec4 drawcolor
Hello again. Implemented UTF8 support for LE4. Works fine?.
context->SetBlendMode(Blend::Alpha);
context->DrawText(u8"Привет мир! Hello world!", 25.0f, 25.0f);
context->SetBlendMode(Blend::Solid);
Add yours symbols to "familychars" and make own "family" in Font.cpp
if (family==Font::English)
{
familychars = L"abcdefghijklmnopqrstuvwxyzабвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!@#$%^&*()_+[]\\{}|;':\",./<>