Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
f1408da29a | |||
8464cf5367 | |||
86685f9b55 | |||
bf19cfa7b7 | |||
4d60429c7b | |||
dd4cde6a61 | |||
3bab74361c | |||
a2421820ed | |||
2b595fdce1 | |||
81cc7791a4 | |||
c40114ee56 | |||
b824302069 | |||
1ad79aba1c | |||
4ee7d2cc59 | |||
5f6aefea7d | |||
9cd56e94df | |||
145439ef10 | |||
741bb7279c | |||
ab21f050de | |||
bdacf980c6 | |||
11f61e9da6 | |||
9894b67d22 | |||
b1635b8e28 | |||
fdf420a75c | |||
b50680554f | |||
0dc735b800 | |||
9cf94dfba5 | |||
b9410073cf | |||
e29d18ea1c | |||
da1914f612 | |||
37db37f97c | |||
206aebc98e | |||
430b3250be | |||
05b8055ef1 | |||
95c3f414f9 | |||
8b305519c2 | |||
5cb5be5656 | |||
07c37c7cb2 | |||
8d432066ca |
33
.editorconfig
Normal file
33
.editorconfig
Normal file
@ -0,0 +1,33 @@
|
||||
root = true
|
||||
|
||||
# Global
|
||||
[*]
|
||||
indent_style = unset
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = unset
|
||||
|
||||
# Unreal Engine 3 / Source
|
||||
[*.uc]
|
||||
indent_style = tab
|
||||
|
||||
[*.{uci,upkg}]
|
||||
|
||||
# Unreal Engine 3 / i18n
|
||||
[*.{chn,cht,cze,dan,deu,dut,esl,esn,fra,frc,hun,int,ita,jpn,kor,pol,por,ptb,rus,tur,ukr}]
|
||||
charset = utf-16le
|
||||
|
||||
# Other
|
||||
[*.md]
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{txt,cfg,conf}]
|
||||
indent_style = tab
|
114
.github/workflows/mega-linter.yml
vendored
Normal file
114
.github/workflows/mega-linter.yml
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
---
|
||||
name: MegaLinter
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
APPLY_FIXES: none
|
||||
APPLY_FIXES_EVENT: pull_request
|
||||
APPLY_FIXES_MODE: commit
|
||||
FILTER_REGEX_EXCLUDE: (mega-linter.yml)
|
||||
DISABLE: SPELL
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
megalinter:
|
||||
name: MegaLinter
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: MegaLinter
|
||||
uses: oxsecurity/megalinter@7e042c726c68415475b05a65a686c612120a1232
|
||||
id: ml
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: MegaLinter reports
|
||||
path: |
|
||||
megalinter-reports
|
||||
mega-linter.log
|
||||
|
||||
- name: Set APPLY_FIXES_IF var
|
||||
run: |
|
||||
printf 'APPLY_FIXES_IF=%s\n' "${{
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
)
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Set APPLY_FIXES_IF_* vars
|
||||
run: |
|
||||
printf 'APPLY_FIXES_IF_PR=%s\n' "${{
|
||||
env.APPLY_FIXES_IF == 'true' &&
|
||||
env.APPLY_FIXES_MODE == 'pull_request'
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
printf 'APPLY_FIXES_IF_COMMIT=%s\n' "${{
|
||||
env.APPLY_FIXES_IF == 'true' &&
|
||||
env.APPLY_FIXES_MODE == 'commit' &&
|
||||
(!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref))
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Create Pull Request with applied fixes
|
||||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
|
||||
id: cpr
|
||||
if: env.APPLY_FIXES_IF_PR == 'true'
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
title: "[MegaLinter] Apply linters automatic fixes"
|
||||
labels: bot
|
||||
|
||||
- name: Create PR output
|
||||
if: env.APPLY_FIXES_IF_PR == 'true'
|
||||
run: |
|
||||
echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
|
||||
- name: Prepare commit
|
||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||
run: sudo chown -Rc $UID .git/
|
||||
|
||||
- name: Commit and push applied linter fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d
|
||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||
with:
|
||||
branch: >-
|
||||
${{
|
||||
github.event.pull_request.head.ref ||
|
||||
github.head_ref ||
|
||||
github.ref
|
||||
}}
|
||||
commit_message: "[MegaLinter] Apply linters fixes"
|
||||
commit_user_name: "github-actions"
|
||||
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
BIN
Localization/CHN/YAS.CHN
Normal file
BIN
Localization/CHN/YAS.CHN
Normal file
Binary file not shown.
BIN
Localization/CHT/YAS.CHT
Normal file
BIN
Localization/CHT/YAS.CHT
Normal file
Binary file not shown.
BIN
Localization/CZE/YAS.CZE
Normal file
BIN
Localization/CZE/YAS.CZE
Normal file
Binary file not shown.
BIN
Localization/DAN/YAS.DAN
Normal file
BIN
Localization/DAN/YAS.DAN
Normal file
Binary file not shown.
BIN
Localization/DEU/YAS.DEU
Normal file
BIN
Localization/DEU/YAS.DEU
Normal file
Binary file not shown.
BIN
Localization/ESN/YAS.ESN
Normal file
BIN
Localization/ESN/YAS.ESN
Normal file
Binary file not shown.
BIN
Localization/FRA/YAS.FRA
Normal file
BIN
Localization/FRA/YAS.FRA
Normal file
Binary file not shown.
BIN
Localization/HUN/YAS.HUN
Normal file
BIN
Localization/HUN/YAS.HUN
Normal file
Binary file not shown.
Binary file not shown.
BIN
Localization/ITA/YAS.ITA
Normal file
BIN
Localization/ITA/YAS.ITA
Normal file
Binary file not shown.
BIN
Localization/JPN/YAS.JPN
Normal file
BIN
Localization/JPN/YAS.JPN
Normal file
Binary file not shown.
BIN
Localization/KOR/YAS.KOR
Normal file
BIN
Localization/KOR/YAS.KOR
Normal file
Binary file not shown.
BIN
Localization/POL/YAS.POL
Normal file
BIN
Localization/POL/YAS.POL
Normal file
Binary file not shown.
BIN
Localization/POR/YAS.POR
Normal file
BIN
Localization/POR/YAS.POR
Normal file
Binary file not shown.
BIN
Localization/PTB/YAS.PTB
Normal file
BIN
Localization/PTB/YAS.PTB
Normal file
Binary file not shown.
Binary file not shown.
BIN
Localization/TUR/YAS.TUR
Normal file
BIN
Localization/TUR/YAS.TUR
Normal file
Binary file not shown.
BIN
Localization/UKR/YAS.UKR
Normal file
BIN
Localization/UKR/YAS.UKR
Normal file
Binary file not shown.
@ -15,7 +15,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m
|
||||
[*]Subscribe to this mutator;
|
||||
[*]Start KF2;
|
||||
[*]Open console (`) and input:
|
||||
[b]open KF-BioticsLab?Mutator=YAS.YASMut?[/b]
|
||||
[b]open KF-BioticsLab?Mutator=YAS.Mut?[/b]
|
||||
(replace the map and add the parameters you need)
|
||||
[*]<Enter>.
|
||||
[/olist]
|
||||
@ -30,7 +30,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m
|
||||
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
||||
[b]ServerSubscribedWorkshopItems=2521826524[/b]
|
||||
[*]Start the server and wait until the mutator is downloading;
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=YAS.YASMut[/b] and restart the server.
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=YAS.Mut[/b] and restart the server.
|
||||
[/olist]
|
||||
|
||||
[h1]Important setup information[/h1]
|
||||
@ -110,7 +110,10 @@ If you need a SteamID64 for a steam group, open the group in a browser and add t
|
||||
[img]https://raw.githubusercontent.com/GenZmeY/KF2-YetAnotherScoreboard/master/PublicationContent/ID4.png[/img]
|
||||
|
||||
[h1]Notes[/h1]
|
||||
📌 VersusSurvival mode not supported (yet).
|
||||
📌 VersusSurvival mode not supported.
|
||||
|
||||
[h1]Translators:[/h1]
|
||||
[url=https://steamcommunity.com/profiles/76561199126205919]cheungfatzong[/url] - Traditional [CHT] and Simplified [CHN] Chinese.
|
||||
|
||||
[h1]Sources[/h1]
|
||||
[url=https://github.com/GenZmeY/KF2-YetAnotherScoreboard]https://github.com/GenZmeY/KF2-YetAnotherScoreboard[/url] [b](GNU GPLv3)[/b]
|
22
README.md
22
README.md
@ -3,22 +3,22 @@
|
||||
[![Steam Workshop](https://img.shields.io/static/v1?message=workshop&logo=steam&labelColor=gray&color=blue&logoColor=white&label=steam%20)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![Steam Downloads](https://img.shields.io/steam/downloads/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![Steam Favorites](https://img.shields.io/steam/favorites/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![Steam Update Date](https://img.shields.io/steam/update-date/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![MegaLinter](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/actions/workflows/mega-linter.yml/badge.svg?branch=master)](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/actions/workflows/mega-linter.yml)
|
||||
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-YetAnotherScoreboard)](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/tags)
|
||||
[![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-YetAnotherScoreboard)](LICENSE)
|
||||
|
||||
# Description
|
||||
## Description
|
||||
Yet another scoreboard...
|
||||
Based on the scoreboard from [ClassicHUD](https://steamcommunity.com/sharedfiles/filedetails/?id=1963099942) and heavily modified.
|
||||
|
||||
# Usage
|
||||
## Usage
|
||||
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
|
||||
***
|
||||
|
||||
**Note:** If you want to build/test/brew/publish a mutator without git-bash and/or scripts, follow [these instructions](https://tripwireinteractive.atlassian.net/wiki/spaces/KF2SW/pages/26247172/KF2+Code+Modding+How-to) instead of what is described here.
|
||||
|
||||
# Build
|
||||
## Build
|
||||
1. Install [Killing Floor 2](https://store.steampowered.com/app/232090/Killing_Floor_2/), Killing Floor 2 - SDK and [git for windows](https://git-scm.com/download/win);
|
||||
2. open git-bash and go to any folder where you want to store sources:
|
||||
`cd <ANY_FOLDER_YOU_WANT>`
|
||||
@ -31,14 +31,7 @@ Based on the scoreboard from [ClassicHUD](https://steamcommunity.com/sharedfiles
|
||||
5. The compiled files will be here:
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script\`
|
||||
|
||||
# Testing
|
||||
Open git-bash in the source folder and run command:
|
||||
`./tools/builder -t`
|
||||
(or `./tools/builder -ct` if you haven't compiled the mutator yet)
|
||||
|
||||
A local single-user test will be launched with parameters from `test.cfg` (edit this file if you want to test mutator with different parameters).
|
||||
|
||||
# Bug reports
|
||||
## Bug reports
|
||||
If you find a bug, go to the [issue page](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/issues) and check if there is a description of your bug. If not, create a new issue.
|
||||
Describe what the bug looks like and how reproduce it.
|
||||
Attach screenshots if you think it might help.
|
||||
@ -47,5 +40,6 @@ If it's a crash issue, be sure to include the `Launch.log` files. You can find t
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Logs\`
|
||||
Please note that these files are overwritten every time you start the game/server. Therefore, you must take these files immediately after the game crashes in order not to lose information.
|
||||
|
||||
# License
|
||||
[GNU GPLv3](LICENSE)
|
||||
## License
|
||||
[![license](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](LICENSE)
|
||||
|
||||
|
12
TODO.md
12
TODO.md
@ -1,12 +0,0 @@
|
||||
# TODO List:
|
||||
|
||||
+ ability to display HP on the left
|
||||
- ability to hide rank
|
||||
- ability to turn off the panel on the client
|
||||
+ colors for perks
|
||||
+ dynamic colors for dosh
|
||||
+ dynamic colors for assists
|
||||
- abbreviated dosh display (10K, 15K, etc.)
|
||||
- images for HP (cross, skull with bones if dead)
|
||||
+ show armor
|
||||
+ use rank id as priority
|
595
YAS/Classes/BoxPainter.uc
Normal file
595
YAS/Classes/BoxPainter.uc
Normal file
@ -0,0 +1,595 @@
|
||||
class BoxPainter extends BoxPainterBase;
|
||||
|
||||
public final function DrawBox(float X, float Y, float Width, float Height, float Edge, optional byte Shape = 0)
|
||||
{
|
||||
Edge = FMin(FMin(Edge, Width * 0.5), Height * 0.5);
|
||||
|
||||
switch (Shape)
|
||||
{
|
||||
case 100:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 110:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 111:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\____/|
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | ____ |
|
||||
ECS_VerticalCorner // BottomRight // |/ \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 121:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // | |
|
||||
ECS_HorisontalCorner // BottomRight // /_____\
|
||||
);
|
||||
break;
|
||||
|
||||
case 130:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 131:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 132:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 133:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 140:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 141:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 142:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 143:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 150:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | ____ |
|
||||
ECS_VerticalCorner // BottomRight // |/ \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 151:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_BeveledCorner, // TopLeft // / /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 152:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\____/|
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 153:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 160:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \_____/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 161:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 162:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 163:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 170:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 171:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 172:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 173:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____/
|
||||
ECS_BeveledCorner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_Corner, // TopLeft // | /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 181:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 182:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 183:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 190:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 191:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 193:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____|
|
||||
ECS_Corner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | ____ |
|
||||
ECS_VerticalCorner // BottomRight // |/ \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 201:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_Corner, // TopLeft // | /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 202:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\____/|
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 203:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 210:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ________
|
||||
ECS_HorisontalCorner, // TopLeft // \ /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 211:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____/
|
||||
ECS_BeveledCorner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 212:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 213:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 220:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ________
|
||||
ECS_HorisontalCorner, // TopLeft // \ /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 221:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____|
|
||||
ECS_Corner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 222:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 223:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 230:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_BeveledCorner, // TopLeft // / /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 231:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 232:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 233:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____/
|
||||
ECS_BeveledCorner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_Corner, // TopLeft // | /
|
||||
ECS_HorisontalCorner, // TopRight // | |
|
||||
ECS_HorisontalCorner, // BottomLeft // /______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 241:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // |\_____
|
||||
ECS_VerticalCorner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |_____ |
|
||||
ECS_VerticalCorner // BottomRight // \|
|
||||
);
|
||||
break;
|
||||
|
||||
case 242:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _______
|
||||
ECS_HorisontalCorner, // TopLeft // \ |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______\
|
||||
ECS_HorisontalCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 243:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // _____/|
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_VerticalCorner, // TopRight // | |
|
||||
ECS_VerticalCorner, // BottomLeft // | _____|
|
||||
ECS_Corner // BottomRight // |/
|
||||
);
|
||||
break;
|
||||
|
||||
case 250:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 251:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_BeveledCorner, // TopLeft // / |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______|
|
||||
ECS_Corner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 252:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | |
|
||||
ECS_Corner, // TopRight // | |
|
||||
ECS_BeveledCorner, // BottomLeft // \______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 253:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, // ______
|
||||
ECS_Corner, // TopLeft // | \
|
||||
ECS_BeveledCorner, // TopRight // | |
|
||||
ECS_Corner, // BottomLeft // |______/
|
||||
ECS_BeveledCorner // BottomRight //
|
||||
);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
DrawShapedBox(
|
||||
X, Y, Width, Height, Edge, //
|
||||
ECS_BeveledCorner, // TopLeft // ______
|
||||
ECS_BeveledCorner, // TopRight // / \
|
||||
ECS_BeveledCorner, // BottomLeft // | |
|
||||
ECS_BeveledCorner // BottomRight // \______/
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
185
YAS/Classes/BoxPainterBase.uc
Normal file
185
YAS/Classes/BoxPainterBase.uc
Normal file
@ -0,0 +1,185 @@
|
||||
class BoxPainterBase extends Object;
|
||||
|
||||
const Texture = Texture2D'UI_LevelChevrons_TEX.UI_LevelChevron_Icon_02';
|
||||
|
||||
enum EPosition
|
||||
{
|
||||
ECP_TopLeft,
|
||||
ECP_TopRight,
|
||||
ECP_BottomLeft,
|
||||
ECP_BottomRight
|
||||
};
|
||||
|
||||
enum EShape
|
||||
{
|
||||
ECS_Corner,
|
||||
ECS_BeveledCorner,
|
||||
ECS_VerticalCorner,
|
||||
ECS_HorisontalCorner
|
||||
};
|
||||
|
||||
var public Canvas Canvas;
|
||||
|
||||
private final function DrawBoxTexture(float X, float Y)
|
||||
{
|
||||
Canvas.DrawTile(Texture, X, Y, 19, 45, 1, 1);
|
||||
}
|
||||
|
||||
private final function DrawCornerTexture(float Size, byte Position)
|
||||
{
|
||||
switch (Position)
|
||||
{
|
||||
case ECP_TopLeft: Canvas.DrawTile(Texture, Size, Size, 77, 15, -66, 58); return;
|
||||
case ECP_TopRight: Canvas.DrawTile(Texture, Size, Size, 11, 15, 66, 58); return;
|
||||
case ECP_BottomLeft: Canvas.DrawTile(Texture, Size, Size, 77, 73, -66, -58); return;
|
||||
case ECP_BottomRight: Canvas.DrawTile(Texture, Size, Size, 11, 73, 66, -58); return;
|
||||
}
|
||||
}
|
||||
|
||||
private final function DrawCorner(float X, float Y, float Edge, byte Position, byte Shape)
|
||||
{
|
||||
switch (Position)
|
||||
{
|
||||
case ECP_TopLeft: switch (Shape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||
return;
|
||||
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_TopRight);
|
||||
return;
|
||||
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||
return;
|
||||
}
|
||||
|
||||
case ECP_TopRight: switch (Shape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTexture(Edge, ECP_TopRight);
|
||||
return;
|
||||
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||
return;
|
||||
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||
return;
|
||||
}
|
||||
|
||||
case ECP_BottomLeft: switch (Shape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||
return;
|
||||
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||
return;
|
||||
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_TopLeft);
|
||||
return;
|
||||
}
|
||||
|
||||
case ECP_BottomRight: switch (Shape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_BottomRight);
|
||||
return;
|
||||
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTexture(Edge, ECP_BottomLeft);
|
||||
return;
|
||||
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTexture(Edge, ECP_TopRight);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final function DrawShapedBox(float X, float Y, float W, float H, float Edge, byte TopLeftShape, byte TopRightShape, byte BottomLeftShape, byte BottomRightShape)
|
||||
{
|
||||
local float BoxX, BoxW;
|
||||
|
||||
Canvas.PreOptimizeDrawTiles((
|
||||
3 // x3 DrawBoxTexture(...) + x1..x4 DrawCornerTexture(...)
|
||||
+ (TopLeftShape == ECS_Corner ? 0 : 1)
|
||||
+ (TopRightShape == ECS_Corner ? 0 : 1)
|
||||
+ (BottomLeftShape == ECS_Corner ? 0 : 1)
|
||||
+ (BottomRightShape == ECS_Corner ? 0 : 1)
|
||||
), Texture);
|
||||
|
||||
// Top Line
|
||||
DrawCorner(X, Y, Edge, ECP_TopLeft, TopLeftShape);
|
||||
|
||||
BoxX = X; BoxW = W;
|
||||
if (TopLeftShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxX += Edge;
|
||||
BoxW -= Edge;
|
||||
}
|
||||
if (TopRightShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxW -= Edge;
|
||||
}
|
||||
Canvas.SetPos(BoxX, Y);
|
||||
DrawBoxTexture(BoxW, Edge);
|
||||
|
||||
DrawCorner(X + W, Y, Edge, ECP_TopRight, TopRightShape);
|
||||
|
||||
// Mid Line
|
||||
Canvas.SetPos(X, Y + Edge);
|
||||
DrawBoxTexture(W, H - Edge * 2);
|
||||
|
||||
// Bottom Line
|
||||
DrawCorner(X, Y + H, Edge, ECP_BottomLeft, BottomLeftShape);
|
||||
|
||||
BoxX = X; BoxW = W;
|
||||
if (BottomLeftShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxX += Edge;
|
||||
BoxW -= Edge;
|
||||
}
|
||||
if (BottomRightShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxW -= Edge;
|
||||
}
|
||||
Canvas.SetPos(BoxX, Y + H - Edge);
|
||||
DrawBoxTexture(BoxW, Edge);
|
||||
|
||||
DrawCorner(X + W, Y + H, Edge, ECP_BottomRight, BottomRightShape);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -422,4 +422,5 @@ function RenderButton(KFGUI_Button B)
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -16,6 +16,8 @@ var transient YAS_HUD HUDOwner;
|
||||
var Font MainFont, NumberFont, InfiniteFont;
|
||||
var Color BlurColor, BlurColor2;
|
||||
|
||||
var BoxPainter BoxPainter;
|
||||
|
||||
enum ECornerPosition
|
||||
{
|
||||
ECP_TopLeft,
|
||||
@ -54,6 +56,8 @@ function InitStyle()
|
||||
if (ItemTex == None)
|
||||
ItemTex=Texture2D'EngineMaterials.DefaultWhiteGrid';
|
||||
|
||||
BoxPainter = new class'BoxPainter';
|
||||
|
||||
NumberFont = Font(DynamicLoadObject("UI_Canvas_Fonts.Font_General", class'Font'));
|
||||
|
||||
BlurColor = MakeColor(60, 60, 60, 220);
|
||||
@ -556,693 +560,10 @@ final function DrawWhiteBox(float XS, float YS, optional bool bClip)
|
||||
Canvas.DrawTile(ItemTex, XS, YS, 19, 45, 1,1, ,bClip);
|
||||
}
|
||||
|
||||
final function DrawCornerSmart(float X, float Y, float Edge, int CornerPosition, int CornerShape)
|
||||
{
|
||||
switch (CornerPosition)
|
||||
{
|
||||
case ECP_TopLeft:
|
||||
switch (CornerShape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTex(Edge, 0);
|
||||
return;
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTex(Edge, 1);
|
||||
return;
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTex(Edge, 2);
|
||||
return;
|
||||
}
|
||||
case ECP_TopRight:
|
||||
switch (CornerShape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTex(Edge, 1);
|
||||
return;
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTex(Edge, 0);
|
||||
return;
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTex(Edge, 3);
|
||||
return;
|
||||
}
|
||||
case ECP_BottomLeft:
|
||||
switch (CornerShape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTex(Edge, 2);
|
||||
return;
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X, Y);
|
||||
DrawCornerTex(Edge, 3);
|
||||
return;
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTex(Edge, 0);
|
||||
return;
|
||||
}
|
||||
case ECP_BottomRight:
|
||||
switch (CornerShape)
|
||||
{
|
||||
case ECS_Corner:
|
||||
return;
|
||||
case ECS_BeveledCorner:
|
||||
Canvas.SetPos(X - Edge, Y - Edge);
|
||||
DrawCornerTex(Edge, 3);
|
||||
return;
|
||||
case ECS_VerticalCorner:
|
||||
Canvas.SetPos(X - Edge, Y);
|
||||
DrawCornerTex(Edge, 2);
|
||||
return;
|
||||
case ECS_HorisontalCorner:
|
||||
Canvas.SetPos(X, Y - Edge);
|
||||
DrawCornerTex(Edge, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final function DrawRectBoxSmart(float X, float Y, float W, float H, float Edge, int TopLeftShape, int TopRightShape, int BottomLeftShape, int BottomRightShape)
|
||||
{
|
||||
local float BoxX, BoxW;
|
||||
|
||||
// Top Line
|
||||
DrawCornerSmart(X, Y, Edge, ECP_TopLeft, TopLeftShape);
|
||||
|
||||
BoxX = X; BoxW = W;
|
||||
if (TopLeftShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxX += Edge;
|
||||
BoxW -= Edge;
|
||||
}
|
||||
if (TopRightShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxW -= Edge;
|
||||
}
|
||||
Canvas.SetPos(BoxX, Y);
|
||||
DrawWhiteBox(BoxW, Edge);
|
||||
|
||||
DrawCornerSmart(X + W, Y, Edge, ECP_TopRight, TopRightShape);
|
||||
|
||||
// Mid Line
|
||||
Canvas.SetPos(X, Y + Edge);
|
||||
DrawWhiteBox(W, H - Edge * 2);
|
||||
|
||||
// Bottom Line
|
||||
DrawCornerSmart(X, Y + H, Edge, ECP_BottomLeft, BottomLeftShape);
|
||||
|
||||
BoxX = X; BoxW = W;
|
||||
if (BottomLeftShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxX += Edge;
|
||||
BoxW -= Edge;
|
||||
}
|
||||
if (BottomRightShape == ECS_BeveledCorner)
|
||||
{
|
||||
BoxW -= Edge;
|
||||
}
|
||||
Canvas.SetPos(BoxX, Y + H - Edge);
|
||||
DrawWhiteBox(BoxW, Edge);
|
||||
|
||||
DrawCornerSmart(X + W, Y + H, Edge, ECP_BottomRight, BottomRightShape);
|
||||
}
|
||||
|
||||
final function DrawRectBox(float X, float Y, float Width, float Height, float Edge, optional byte Extrav)
|
||||
{
|
||||
if (Extrav == 2)
|
||||
Edge=Min(FMin(Edge, (Width)*0.5), Height);// Verify size.
|
||||
else
|
||||
Edge=Min(FMin(Edge, (Width)*0.5), (Height)*0.5);// Verify size.
|
||||
|
||||
Canvas.PreOptimizeDrawTiles(Extrav == 0 ? 7 : 6, ItemTex);
|
||||
|
||||
switch (Extrav)
|
||||
{
|
||||
case 100:
|
||||
// ______
|
||||
// | |
|
||||
// | |
|
||||
// |______|
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 110:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 111:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 121:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 130:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 131:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 132:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 133:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 140:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 141:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 142:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 143:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 150:
|
||||
// ______
|
||||
// / \
|
||||
// | ____ |
|
||||
// |/ \|
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 151:
|
||||
// _______
|
||||
// / /
|
||||
// | |
|
||||
// \______\
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 152:
|
||||
//
|
||||
// |\____/|
|
||||
// | |
|
||||
// \______/
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 153:
|
||||
// _______
|
||||
// \ \
|
||||
// | |
|
||||
// /______/
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 160:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 161:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 162:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 163:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 170:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 171:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 172:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 173:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 181:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 182:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 183:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 190:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 191:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 193:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 201:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 202:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 203:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 210:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 211:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 212:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 213:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 220:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 221:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 222:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 223:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 230:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 231:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 232:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 233:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_HorisontalCorner, // TopRight
|
||||
ECS_HorisontalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 241:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_VerticalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_VerticalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 242:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_HorisontalCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_HorisontalCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 243:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_VerticalCorner, // TopRight
|
||||
ECS_VerticalCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 250:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 251:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_Corner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 252:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_Corner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
case 253:
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_Corner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_Corner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
|
||||
default: // 0
|
||||
// ______
|
||||
// / \
|
||||
// | |
|
||||
// \______/
|
||||
|
||||
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||
ECS_BeveledCorner, // TopLeft
|
||||
ECS_BeveledCorner, // TopRight
|
||||
ECS_BeveledCorner, // BottomLeft
|
||||
ECS_BeveledCorner // BottomRight
|
||||
);
|
||||
break;
|
||||
}
|
||||
if (BoxPainter.Canvas == None) BoxPainter.Canvas = Canvas;
|
||||
if (BoxPainter.Canvas != None) BoxPainter.DrawBox(X, Y, Width, Height, Edge, Extrav);
|
||||
}
|
||||
|
||||
final function DrawBoxHollow(float X, float Y, float Width, float Height, float Thickness)
|
||||
|
@ -59,4 +59,5 @@ function PreClientTravel(string PendingURL, ETravelType TravelType, bool bIsSeam
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -77,4 +77,5 @@ function DrawMenu()
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -86,4 +86,5 @@ function EmptyList()
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -13,6 +13,7 @@ function InitMenu()
|
||||
Components[i].InitMenu();
|
||||
}
|
||||
}
|
||||
|
||||
function ShowMenu()
|
||||
{
|
||||
local int i;
|
||||
@ -20,6 +21,7 @@ function ShowMenu()
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].ShowMenu();
|
||||
}
|
||||
|
||||
function PreDraw()
|
||||
{
|
||||
local int i;
|
||||
@ -41,6 +43,7 @@ function PreDraw()
|
||||
Components[i].PreDraw();
|
||||
}
|
||||
}
|
||||
|
||||
function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
{
|
||||
local int i;
|
||||
@ -48,6 +51,7 @@ function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].InventoryChanged(Wep, bRemove);
|
||||
}
|
||||
|
||||
function MenuTick(float DeltaTime)
|
||||
{
|
||||
local int i;
|
||||
@ -72,6 +76,7 @@ function CloseMenu()
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].CloseMenu();
|
||||
}
|
||||
|
||||
function bool CaptureMouse()
|
||||
{
|
||||
local int i;
|
||||
@ -87,6 +92,7 @@ function bool CaptureMouse()
|
||||
MouseArea = None;
|
||||
return Super.CaptureMouse(); // check with frame itself.
|
||||
}
|
||||
|
||||
function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent Event)
|
||||
{
|
||||
local int i;
|
||||
@ -101,6 +107,7 @@ function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent E
|
||||
|
||||
return Super.ReceievedControllerInput(ControllerId, Key, Event);
|
||||
}
|
||||
|
||||
function KFGUI_Base FindComponentID(name InID)
|
||||
{
|
||||
local int i;
|
||||
@ -115,6 +122,7 @@ function KFGUI_Base FindComponentID(name InID)
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
{
|
||||
local int i;
|
||||
@ -124,6 +132,7 @@ function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].FindAllComponentID(InID, Res);
|
||||
}
|
||||
|
||||
function RemoveComponent(KFGUI_Base B)
|
||||
{
|
||||
local int i;
|
||||
@ -138,6 +147,7 @@ function RemoveComponent(KFGUI_Base B)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].RemoveComponent(B);
|
||||
}
|
||||
|
||||
function NotifyLevelChange()
|
||||
{
|
||||
local int i;
|
||||
|
60
YAS/Classes/Mut.uc
Normal file
60
YAS/Classes/Mut.uc
Normal file
@ -0,0 +1,60 @@
|
||||
class Mut extends KFMutator;
|
||||
|
||||
var private YAS YAS;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'YAS', YAS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (YAS == None)
|
||||
{
|
||||
YAS = WorldInfo.Spawn(class'YAS');
|
||||
}
|
||||
|
||||
if (YAS == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'YAS'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator M)
|
||||
{
|
||||
if (M == Self) return;
|
||||
|
||||
if (M.Class == Class)
|
||||
Mut(M).SafeDestroy();
|
||||
else
|
||||
Super.AddMutator(M);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
YAS.NotifyLogin(C);
|
||||
|
||||
Super.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
YAS.NotifyLogout(C);
|
||||
|
||||
Super.NotifyLogout(C);
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
GroupNames.Add("Scoreboard")
|
||||
}
|
@ -355,6 +355,7 @@ public function YAS_RepInfoOwner CreateRepInfo(Controller C)
|
||||
{
|
||||
RepInfos.AddItem(OwnerRepInfo);
|
||||
|
||||
PlayerRepInfo.Rank = class'YAS_Types'.static.FromSystemRank(CfgRanks.default.Player);
|
||||
OwnerRepInfo.PlayerRepInfo = PlayerRepInfo;
|
||||
OwnerRepInfo.YAS = Self;
|
||||
OwnerRepInfo.LogLevel = LogLevel;
|
||||
|
@ -1,60 +1 @@
|
||||
class YASMut extends KFMutator;
|
||||
|
||||
var private YAS YAS;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'YAS', YAS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (YAS == None)
|
||||
{
|
||||
YAS = WorldInfo.Spawn(class'YAS');
|
||||
}
|
||||
|
||||
if (YAS == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'YAS'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator Mut)
|
||||
{
|
||||
if (Mut == Self) return;
|
||||
|
||||
if (Mut.Class == Class)
|
||||
Mut.Destroy();
|
||||
else
|
||||
Super.AddMutator(Mut);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
YAS.NotifyLogin(C);
|
||||
|
||||
Super.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
YAS.NotifyLogout(C);
|
||||
|
||||
Super.NotifyLogout(C);
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
|
||||
}
|
||||
class YASMut extends Mut; // backward compatibility
|
||||
|
34
YAS/Classes/YAS_LocalMessage.uc
Normal file
34
YAS/Classes/YAS_LocalMessage.uc
Normal file
@ -0,0 +1,34 @@
|
||||
class YAS_LocalMessage extends Object
|
||||
abstract;
|
||||
|
||||
var const String PlayersDefault;
|
||||
var private localized String Players;
|
||||
|
||||
var const String SpectatorsDefault;
|
||||
var private localized String Spectators;
|
||||
|
||||
enum E_YAS_LocalMessageType
|
||||
{
|
||||
YAS_Players,
|
||||
YAS_Spectators
|
||||
};
|
||||
|
||||
public static function String GetLocalizedString(E_YAS_LocalMessageType LMT)
|
||||
{
|
||||
switch (LMT)
|
||||
{
|
||||
case YAS_Players:
|
||||
return (default.Players != "" ? default.Players : default.PlayersDefault);
|
||||
|
||||
case YAS_Spectators:
|
||||
return (default.Spectators != "" ? default.Spectators : default.SpectatorsDefault);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
PlayersDefault = "Players"
|
||||
SpectatorsDefault = "Spectators"
|
||||
}
|
@ -40,6 +40,8 @@ public simulated event ReplicatedEvent(name VarName)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
`Log_Debug(`Location @ "Var:" @ VarName);
|
||||
|
||||
switch (VarName)
|
||||
{
|
||||
case 'LogLevel':
|
||||
|
@ -1,6 +1,8 @@
|
||||
class YAS_ScoreBoard extends KFGUI_Page
|
||||
dependson(YAS_Types);
|
||||
|
||||
const LocalMessage = class'YAS_LocalMessage';
|
||||
|
||||
const HeaderWidthRatio = 0.30f;
|
||||
const PlayerListWidthRatio = 0.6f;
|
||||
const PlayerEntryHeightMod = 1.05f;
|
||||
@ -16,10 +18,10 @@ const FontScalarModDefault = 1.25f;
|
||||
const ShowDamage = true;
|
||||
|
||||
const IconRanked = Texture2D'DailyObjective_UI.KF2_Dailies_Icon_PerkLvl'; // where the hell is the right icon?
|
||||
const IconCustom = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I26';
|
||||
const IconUnranked = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I28';
|
||||
//const IconCustom = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I26';
|
||||
//const IconUnranked = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I28';
|
||||
const IconUnrankedAlt = Texture2D'UI_VoiceComms_TEX.UI_VoiceCommand_Icon_Negative';
|
||||
const IconPassword = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I20';
|
||||
const IconPassword = Texture2D'UI_Menus.ServerBrowserMenu_SWF_I28';
|
||||
//const IconDosh = Texture2D'UI_HUD.InGameHUD_SWF_I13A';
|
||||
const IconPlayer = Texture2D'UI_HUD.InGameHUD_ZED_SWF_I1F5';
|
||||
//const IconClock = Texture2D'UI_HUD.InGameHUD_SWF_I17D';
|
||||
@ -50,8 +52,6 @@ var KFPlayerController OwnerPC;
|
||||
var Color PingColor;
|
||||
var float PingBars;
|
||||
|
||||
var localized String Players, Spectators;
|
||||
|
||||
// Cache
|
||||
var public Array<YAS_RepInfoPlayer> RepInfos;
|
||||
|
||||
@ -73,7 +73,12 @@ function YAS_RepInfoPlayer FindRepInfo(KFPlayerReplicationInfo KFPRI)
|
||||
{
|
||||
if (RepInfo.UID.Uid == KFPRI.UniqueId.Uid)
|
||||
{
|
||||
return RepInfo;
|
||||
if (RepInfo.bPendingDelete || RepInfo.bDeleteMe)
|
||||
{
|
||||
RepInfos.RemoveItem(RepInfo);
|
||||
break;
|
||||
}
|
||||
else return RepInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,6 +86,8 @@ function YAS_RepInfoPlayer FindRepInfo(KFPlayerReplicationInfo KFPRI)
|
||||
{
|
||||
if (RepInfo.UID.Uid == KFPRI.UniqueId.Uid)
|
||||
{
|
||||
if (RepInfo.bPendingDelete || RepInfo.bDeleteMe) continue;
|
||||
|
||||
RepInfos.AddItem(RepInfo);
|
||||
return RepInfo;
|
||||
}
|
||||
@ -423,7 +430,9 @@ function DrawMenu()
|
||||
*/
|
||||
|
||||
Canvas.SetDrawColorStruct(Settings.Style.PlayerCountTextColor);
|
||||
S = Players $ ":" @ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " " $ Spectators $ ": " $ NumSpec; ;
|
||||
S = LocalMessage.static.GetLocalizedString(YAS_Players) $ ":"
|
||||
@ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " "
|
||||
$ LocalMessage.static.GetLocalizedString(YAS_Spectators) $ ": " $ NumSpec; ;
|
||||
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar);
|
||||
DrawTextShadowHLeftVCenter(S, BoxX + EdgeSize, YPos, BoxH, FontScalar);
|
||||
|
||||
@ -615,7 +624,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
|
||||
ShapeHealth = Settings.Style.ShapeStateHealthBoxMidPlayer;
|
||||
|
||||
if (!KFGRI.bMatchHasBegun)
|
||||
if (!(KFGRI.bMatchHasBegun || KFGRI.bTraderIsOpen || KFGRI.bWaveIsActive))
|
||||
{
|
||||
HealthBoxColor = Settings.Style.StateBoxColorLobby;
|
||||
}
|
||||
@ -638,7 +647,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
EdgeSize,
|
||||
ShapeHealth);
|
||||
|
||||
if (!KFGRI.bMatchHasBegun)
|
||||
if (!(KFGRI.bMatchHasBegun || KFGRI.bTraderIsOpen || KFGRI.bWaveIsActive))
|
||||
{
|
||||
ColorTMP = Settings.Style.ListHeaderTextColor;
|
||||
ColorTMP.A = 200;
|
||||
@ -662,11 +671,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
||||
HealthWBox - BorderSize * 4,
|
||||
Height - BorderSize * 4);
|
||||
}
|
||||
|
||||
C.SetDrawColorStruct(Settings.Style.StateTextColorHealthHigh);
|
||||
|
||||
if (KFPRI.PlayerHealth > 0)
|
||||
else
|
||||
{
|
||||
C.SetDrawColorStruct(Settings.Style.StateTextColorHealthHigh);
|
||||
DrawTextShadowHVCenter(String(KFPRI.PlayerHealth), HealthXPos, YOffset, HealthWBox, Height, FontScalar);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ Map="KF-Nuked"
|
||||
# Endless: KFGameContent.KFGameInfo_Endless
|
||||
# Objective: KFGameContent.KFGameInfo_Objective
|
||||
# Versus: KFGameContent.KFGameInfo_VersusSurvival
|
||||
Game="KFGameContent.KFGameInfo_VersusSurvival"
|
||||
Game="KFGameContent.KFGameInfo_Survival"
|
||||
|
||||
# Difficulty:
|
||||
# Normal: 0
|
||||
@ -55,7 +55,7 @@ Difficulty="0"
|
||||
GameLength="0"
|
||||
|
||||
# Mutators
|
||||
Mutators="YAS.YASMut,FriendlyHUD.FriendlyHUDMutator"
|
||||
Mutators="YAS.YASMut"
|
||||
|
||||
# Additional parameters
|
||||
Args=""
|
||||
|
2
tools
2
tools
@ -1 +1 @@
|
||||
Subproject commit d830a5ea169e230fa40d63319b838fde1e25f6c1
|
||||
Subproject commit fb458ac61f7e6c6426b8dff366dd5e7499e0d95f
|
Loading…
Reference in New Issue
Block a user