39 lines
1002 B
Plaintext
39 lines
1002 B
Plaintext
// 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();
|
|
}
|
|
|
|
}
|
|
} |