Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Window-creation/D/window-creation-1.d
Normal file
9
Task/Window-creation/D/window-creation-1.d
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module Window;
|
||||
|
||||
import fltk4d.all;
|
||||
|
||||
void main() {
|
||||
auto window = new Window(300, 300, "A window");
|
||||
window.show;
|
||||
FLTK.run;
|
||||
}
|
||||
32
Task/Window-creation/D/window-creation-2.d
Normal file
32
Task/Window-creation/D/window-creation-2.d
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import derelict.sdl.sdl;
|
||||
|
||||
int main(char[][] args)
|
||||
{
|
||||
DerelictSDL.load();
|
||||
|
||||
SDL_Event event;
|
||||
auto done = false;
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
scope(exit) SDL_Quit();
|
||||
|
||||
SDL_SetVideoMode(1024, 768, 0, SDL_OPENGL);
|
||||
SDL_WM_SetCaption("My first Window", "SDL test");
|
||||
|
||||
while (!done)
|
||||
{
|
||||
if (SDL_PollEvent(&event) == 1)
|
||||
{
|
||||
switch (event.type)
|
||||
{
|
||||
case SDL_QUIT:
|
||||
done = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
6
Task/Window-creation/D/window-creation-3.d
Normal file
6
Task/Window-creation/D/window-creation-3.d
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import qd;
|
||||
|
||||
void main() {
|
||||
screen(640, 480);
|
||||
while (true) events();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue