This commit is contained in:
Robert Vokac 2024-12-17 16:19:05 +01:00
parent 354c7ecd11
commit defe2a04ed
Signed by: robertvokac
GPG Key ID: FB9CE8E20AADA55F
14 changed files with 339 additions and 3 deletions

View File

@ -12,5 +12,12 @@ import com.openeggbert.jdotnet.System.IDisposable;
*/
public abstract class ContentManager implements IDisposable {
public abstract <T> T Load(String assetName);
public String getRootDirectory() {
return "";
//todo
}
public void setRootDirectory(String rootDirectory) {
//todo
}
}

View File

@ -0,0 +1,18 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework;
import com.openeggbert.jdotnet.System.EventArgs;
import lombok.Getter;
import lombok.Setter;
/**
*
* @author robertvokac
*/
public class ExitingEventArgs extends EventArgs {
@Getter @Setter
public boolean Cancel;
}

View File

@ -4,10 +4,57 @@
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework;
import com.openeggbert.jdotnet.System.*;
import com.openeggbert.jdotnet.System.Event;
import com.openeggbert.jdotnet.System.EventHandler;
import com.openeggbert.jdotnet.System.EventHandlerImpl;
import com.openeggbert.jxna.Microsoft.Xna.Framework.Content.ContentManager;
import lombok.Getter;
import lombok.Setter;
/**
*
* @author robertvokac
*/
public class Game {
private final EventHandler<ExitingEventArgs> ExitingInternal = new EventHandlerImpl<ExitingEventArgs>();
public @Event EventHandler<ExitingEventArgs> Exiting() {return ExitingInternal;}
public boolean isMouseVisible() {
return true;
//todo
}
public void setMouseVisible(boolean mouseVisible) {
//todo
}
@Getter @Setter
public ContentManager Content;
@Getter @Setter
public TimeSpan TargetElapsedTime;
@Getter @Setter
public TimeSpan InactiveSleepTime;
protected void Initialize()
{
}
protected void LoadContent()
{
}
protected void UnloadContent()
{
}
protected void OnDeactivated(Object sender, EventArgs args) {
}
protected void OnActivated(Object sender, EventArgs args) {
}
protected void Update(GameTime gameTime) {
}
public void Exit() {}
}

View File

@ -0,0 +1,19 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework;
import com.openeggbert.jdotnet.System.TimeSpan;
import lombok.Getter;
/**
*
* @author robertvokac
*/
public class GameTime {
@Getter
public TimeSpan TotalGameTime;
}

View File

@ -9,5 +9,15 @@ package com.openeggbert.jxna.Microsoft.Xna.Framework;
* @author robertvokac
*/
public class GraphicsDeviceManager {
public GraphicsDeviceManager(Game game) {
//todo
}
public boolean isFullScreen() {
return true;
//todo
}
public void setFullScreen(boolean value) {
//todo
}
}

View File

@ -2,13 +2,14 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.GameAAA;
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
/**
*
* @author robertvokac
*/
public class NewClass {
public enum ButtonState {
Released,
Pressed
}

View File

@ -0,0 +1,18 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
import com.openeggbert.jxna.Microsoft.Xna.Framework.PlayerIndex;
/**
*
* @author robertvokac
*/
public class GamePad {
public static GamePadState GetState(PlayerIndex playerIndex) {
return null;
}
}

View File

@ -0,0 +1,49 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
import com.openeggbert.jdotnet.System.Struct;
import lombok.Getter;
/**
*
* @author robertvokac
*/
@Getter
public class GamePadButtons extends Struct<GamePadButtons> {
@Override
public GamePadButtons copy() {
return new GamePadButtons();
}
@Override
public GamePadButtons reset() {
return this;
}
public ButtonState A;
public ButtonState B;
public ButtonState Back;
public ButtonState X;
public ButtonState Y;
public ButtonState Start;
public ButtonState LeftShoulder;
public ButtonState LeftStick;
public ButtonState RightShoulder;
public ButtonState RightStick;
public ButtonState BigButton;
}

View File

@ -0,0 +1,28 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
import com.openeggbert.jdotnet.System.Struct;
import lombok.Getter;
/**
*
* @author robertvokac
*/
public class GamePadState extends Struct<GamePadState>{
@Override
public GamePadState copy() {
return new GamePadState();
}
@Override
public GamePadState reset() {
return this;
}
@Getter
public GamePadButtons Buttons;
}

View File

@ -0,0 +1,16 @@
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
/**
*
* @author robertvokac
*/
public class Mouse {
public static void SetCursor(MouseCursor mouseCursor) {
//todo
}
}

View File

@ -0,0 +1,40 @@
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input;
import lombok.Getter;
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
/**
*
* @author robertvokac
*/
public class MouseCursor {
@Getter public static MouseCursor Arrow;
@Getter public static MouseCursor IBeam;
@Getter public static MouseCursor Wait;
@Getter public static MouseCursor Crosshair;
@Getter public static MouseCursor WaitArrow;
@Getter public static MouseCursor SizeNWSE;
@Getter public static MouseCursor SizeNESW;
@Getter public static MouseCursor SizeWE;
@Getter public static MouseCursor SizeNS;
@Getter public static MouseCursor SizeAll;
@Getter public static MouseCursor No;
@Getter public static MouseCursor Hand;
}

View File

@ -0,0 +1,16 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch;
/**
*
* @author robertvokac
*/
public class TouchPanel {
public static TouchPanelCapabilities GetCapabilities () {
return null;//todo
}
}

View File

@ -0,0 +1,51 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch;
import com.openeggbert.jdotnet.System.Struct;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
/**
*
* @author robertvokac
*/
@AllArgsConstructor
@NoArgsConstructor
public class TouchPanelCapabilities extends Struct<TouchPanelCapabilities>{
private boolean hasPressure;
private boolean isConnected;
private int maximumTouchCount;
private boolean initialized;
@Override
public TouchPanelCapabilities copy() {
return new TouchPanelCapabilities(hasPressure, isConnected, maximumTouchCount, initialized);
}
@Override
public TouchPanelCapabilities reset() {
return new TouchPanelCapabilities(false, false, 0, false);
}
public boolean HasPressure() {return hasPressure;}
public boolean IsConnected() {return isConnected;}
public int MaximumTouchCount() {return maximumTouchCount;}
public void Initialize()
{
if (!initialized)
{
initialized = true;
hasPressure = false;
isConnected = false;
}
}
}

View File

@ -0,0 +1,16 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.jxna.Microsoft.Xna.Framework;
/**
*
* @author robertvokac
*/
public enum PlayerIndex {
One,
Two,
Three,
Four
}