Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Doom3Doom : Element
- {
- TextureID mDoom;
- override void OnCreate()
- {
- mRect = mParent.GetClientRect();
- mRect.X = mRect.Width-320;
- mRect.Y = mRect.Height-240;
- mRect.Width = 320;
- mRect.Height = 240;
- Console.Printf("mRect = %f,%f,%f,%f", mRect.x, mRect.y, mRect.Width, mRect.Height);
- mScale = 0.5;
- mDoom = TexMan.CheckForTexture("graphics/doom.png", TexMan.Type_Any);
- }
- override void Draw()
- {
- Drawer d = GetDrawer();
- Rect pc = GetClientRect();
- d.DrawTexture(mDoom, false, pc.Width/2, pc.Height/2);
- }
- }
- class Doom3Element : Element
- {
- TextureID mMouseCursor;
- override void OnCreate()
- {
- mRect = Rect.FromXYWH(0, 0, Screen.GetWidth(), Screen.GetHeight());
- mScale = 2;
- mMouseCursor = TexMan.CheckForTexture("graphics/D3Mouse.png", TexMan.Type_Any);
- AddChild(new('Doom3Doom').Init());
- }
- override void Draw()
- {
- Drawer d = GetDrawer();
- vector2 mouse = GetMouseXY();
- d.DrawTexture(mMouseCursor, false, mouse.x, mouse.y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement