„Object Inventory - Set Dynamic Texture [v0.07.02]“ hinzufügen

master
Kxirya 2020-07-07 10:40:22 +00:00
parent b4568fd0db
commit ba769a7d52
1 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,39 @@
// 4CGS - Objekt Inventory - Set Dynamic Texture
string back_url = "http://navi-lernen.square7.ch/Pangea/hud-background_big.png";
string draw = "";
string body = "width:512, height:256, aplha:FF, bgcolour:Black";
string m_lang_title = "Inventarinhalt";
string obj_name = "";
draw_background()
{
string name = m_lang_title + " " + obj_name;
draw = osMovePen(draw, 0,0);
draw = osDrawImage(draw, 512, 256, back_url);
draw = osMovePen(draw, 30, 7);
draw = osSetFontName(draw, "Arial Black");
draw = osSetFontSize(draw, 16);
draw = osSetPenColor(draw, "FF7070FF");
draw = osDrawText(draw, name);
osSetDynamicTextureDataBlendFace("", "vector", draw, body, 0, 2, 0, 150, 4);
}
default
{
state_entry()
{
draw_background();
}
link_message(integer source, integer num, string str, key id)
{
if(id = "showname")
{
obj_name = str;
draw_background();
}
}
}