Skip to content

Ruuv1337/KF2-BoxPainterLib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KF2-BoxPainterLib

GitHub tag (latest by date) GitHub top language GitHub

2D box drawing library

Add to your project

There are two ways to add BoxPainterLib to your project:

Open git-bash and go to your project: cd <your_project_path>
Add submodule: git submodule add https://github.com/GenZmeY/KF2-BoxPainterLib BoxPainterLib

updating library:
Get updates: pushd BoxPainterLib && git pull && popd
Commit the changes: git add BoxPainterLib && git commit -m 'update box painter lib'

2. As standalone sources

Create a BoxPainterLib folder and put this repo there.

Using

  1. Create BoxPainter object: BoxPainter = new class'BoxPainterLib.BoxPainter';
  2. Initialize the canvas: BoxPainter.Canvas = <REPLACE_THIS_WITH_YOUR_CANVAS_OBJECT>;
  3. BoxPainter is ready! Use functions DrawBox(...) and DrawShapedBox(...) to draw cool interface boxes.

Available Functions

DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)

Draws a box using the shape code for each corner:

  • ECS_Corner
  • ECS_BeveledCorner
  • ECS_VerticalCorner
  • ECS_HorisontalCorner

DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)

Draws a box using the shape code:

Build

If you are using KF2-BuildTools open builder.cfg and add BoxPainterLib first in PackageBuildOrder and PackageUpload parameters

If you are building manually add line ModPackages=BoxPainterLib to your KFEditor.ini before all other ModPackages

Now build the mod. BoxPainterLib.u library will be next to your *.u files

Examples

KF2-YetAnotherScoreboard (BoxPainterLib branch)

License

GNU LGPLv3

About

2D Box Drawing Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • UnrealScript 100.0%