Skip to content
Permalink
Browse files
Multi-User Surfaces!
  • Loading branch information
nevercast committed Sep 27, 2013
1 parent d45371c commit fa2ebf9
Show file tree
Hide file tree
Showing 8 changed files with 938 additions and 606 deletions.
@@ -88,5 +88,14 @@ public String getGuid(IComputerAccess computer, TileEntityGlassesBridge bridge)
public int getStringWidth(IComputerAccess computer, TileEntityGlassesBridge bridge, String text) {
return bridge.getStringWidth(text);
}

@LuaMethod(
returnType = LuaType.OBJECT, onTick = false, description = "Get the surface of a user to draw privately on their screen",
args = {
@Arg(name = "username", description = "The username of the user to get the draw surface for", type = LuaType.STRING)
})
public ILuaObject getUserSurface(IComputerAccess computer, TileEntityGlassesBridge bridge, String username) {
return bridge.getUserSurface(username);
}

}
@@ -0,0 +1,28 @@
package openperipheral.core.interfaces;

import dan200.computer.api.ILuaObject;

public interface ISurface {

public abstract Short getKeyForDrawable(IDrawable d);

public abstract void setDeleted(IDrawable d);

public abstract void markChanged(IDrawable d, int slot);

public abstract ILuaObject addBox(int x, int y, int width, int height,
int color, double alpha) throws InterruptedException;

public abstract ILuaObject addGradientBox(int x, int y, int width,
int height, int color, double alpha, int color2, double alpha2,
byte gradient) throws InterruptedException;

public abstract ILuaObject getById(int id);

public abstract ILuaObject addText(int x, int y, String text, int color);

public abstract Short[] getAllIds();

public abstract void clear();

}

0 comments on commit fa2ebf9

Please sign in to comment.