Hi everyone,
I just tried to draw some images using Cairo well it actually works !
But I've some conception problems. I'm developing a game that requires
refreshing the game area each time a command is received over network
(Poker game).
At this moment, I do image printing in the ExposeEvent of a Image
(GtkImage) just like the Afc example, but I really don't see how should
I do to be able to draw at a given moment !
Any ideas about this ?
Second question (might be silly) but I really have no idea about it:
Say: Button btn = new Button("Do Something");
btn.connect(new Button.Clicked(){
@Override
public void onClicked(Button arg0) {
// Here I want to access some classes instances
instantiated somewhere
}
});
What I want to do are things like:
- When a button A is clicked: Send some data over some Socket descriptor
- When a button B is clicked: Change some part of the GUI
(redrawing,... etc)
But I've no idea on how to pass arguments to these events... any help?
Thank you.
Miloud Bel.
|