fix style to match the linters
This commit is contained in:
parent
74e90c84e6
commit
0974960556
20
README.md
20
README.md
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
**2D box drawing library**
|
**2D box drawing library**
|
||||||
|
|
||||||
# Add to your project
|
## Add to your project
|
||||||
There are two ways to add BoxPainterLib to your project:
|
There are two ways to add BoxPainterLib to your project:
|
||||||
### 1. As [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
### 1. As [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||||
Open git-bash and go to your project: `cd <your_project_path>`
|
Open git-bash and go to your project: `cd <your_project_path>`
|
||||||
@ -19,32 +19,32 @@ Commit the changes: `git add BoxPainterLib && git commit -m 'update box painter
|
|||||||
### 2. As standalone sources
|
### 2. As standalone sources
|
||||||
Create a `BoxPainterLib` folder and put [this repo](https://github.com/GenZmeY/KF2-BoxPainterLib) there.
|
Create a `BoxPainterLib` folder and put [this repo](https://github.com/GenZmeY/KF2-BoxPainterLib) there.
|
||||||
|
|
||||||
# Using
|
## Using
|
||||||
1. Create `BoxPainter` object: `BoxPainter = new class'BoxPainterLib.BoxPainter';`
|
1. Create `BoxPainter` object: `BoxPainter = new class'BoxPainterLib.BoxPainter';`
|
||||||
2. Initialize the canvas: `BoxPainter.Canvas = <REPLACE_THIS_WITH_YOUR_CANVAS_OBJECT>;`
|
2. Initialize the canvas: `BoxPainter.Canvas = <REPLACE_THIS_WITH_YOUR_CANVAS_OBJECT>;`
|
||||||
3. `BoxPainter` is ready! Use functions [DrawBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainter.uc#L3) and [DrawShapedBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L129) to draw cool interface boxes.
|
3. `BoxPainter` is ready! Use functions [DrawBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainter.uc#L3) and [DrawShapedBox(...)](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L129) to draw cool interface boxes.
|
||||||
|
|
||||||
# Available Functions
|
## Available Functions
|
||||||
#### DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
### 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](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L13) for each corner:
|
Draws a box using the [shape code](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/Classes/BoxPainterBase.uc#L13) for each corner:
|
||||||
- ECS_Corner
|
- ECS_Corner
|
||||||
- ECS_BeveledCorner
|
- ECS_BeveledCorner
|
||||||
- ECS_VerticalCorner
|
- ECS_VerticalCorner
|
||||||
- ECS_HorisontalCorner
|
- ECS_HorisontalCorner
|
||||||
|
|
||||||
#### DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
### DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
||||||
Draws a box using the shape code:
|
Draws a box using the shape code:
|
||||||
![](rect_shapes.png)
|
![codes_table](rect_shapes.png)
|
||||||
|
|
||||||
# Build
|
## Build
|
||||||
If you are using [KF2-BuildTools](https://github.com/GenZmeY/KF2-BuildTools) open `builder.cfg` and add `BoxPainterLib` **first** in `PackageBuildOrder` and `PackageUpload` parameters
|
If you are using [KF2-BuildTools](https://github.com/GenZmeY/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`
|
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
|
Now build the mod. `BoxPainterLib.u` library will be next to your `*.u` files
|
||||||
|
|
||||||
# Examples
|
## Examples
|
||||||
[KF2-YetAnotherScoreboard](https://github.com/GenZmeY/KF2-YetAnotherScoreboard)
|
[KF2-YetAnotherScoreboard](https://github.com/GenZmeY/KF2-YetAnotherScoreboard)
|
||||||
|
|
||||||
# License
|
## License
|
||||||
[GNU LGPLv3](LICENSE)
|
[![license](https://www.gnu.org/graphics/lgplv3-with-text-154x68.png)](LICENSE)
|
||||||
|
Loading…
Reference in New Issue
Block a user