0
텍스처로 폴더 아이콘을로드하려고합니다. 나는 거의 모든 것을 지금 시험해 보았고 어떤 이유에서든 작동하도록 할 수 없다.클러 터 - 발라 텍스처로드 방법
나는 this thread이 내가 찾고있는 것이지만 너무 발전했다고 생각한다. 나는 지금 그것을 간단하게하고 싶다.
그리고 어떤 이유로 나는 this을 작업/번역 할 수 없습니다.
이것은 내가 작성한 코드입니다. 지금 무엇을 해야할지 모르겠다.
class nicholas
{
Gtk.Window window;
GtkClutter.Embed clutter;
Clutter.Rectangle r;
Clutter.Texture t;
public nicholas()
{
window = new Gtk.Window();
clutter = new GtkClutter.Embed();
var stage = clutter.get_stage() as Clutter.Stage;
stage.background_color = Clutter.Color.from_string ("black");
var o = new Cogl.Texture.from_file("/usr/share/icons/gnome/48x48/places/folder.png", Cogl.TextureFlags.NONE, Cogl.PixelFormat.ANY);
t = new Clutter.Texture.set_cogl_texture(o);
t.x = 80;
t.y = 80;
stage.add_child (t);
window.add (clutter);
window.destroy.connect (Gtk.main_quit);
window.set_default_size (500, 300);
window.show_all();
}
}
public static void main (string [] args)
{
GtkClutter.init (ref args);
nicholas nicholas = new nicholas();
Gtk.main();
}