This commit is contained in:
Valeria Fadeeva 2023-11-22 14:33:18 +05:00
parent 63eabc887a
commit 46f380646b
20 changed files with 54 additions and 27 deletions

15
.github/FUNDING.yml vendored
View File

@ -1,15 +0,0 @@
# These are supported funding model platforms
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
#github: [Valeria-Fadeeva]
custom: ["https://www.tinkoff.ru/rm/fadeeva.valeriya96/9bLRi79066", "https://yoomoney.ru/to/4100115921160758", "https://qiwi.com/n/VALERIAFADEEVA", "valeria.fadeeva.me"]

32
dev/script.js Executable file → Normal file
View File

@ -108,7 +108,7 @@ SetSpriteImage = function(asset, x, y, z) {
// TEXT
common_font = "Noto Sans Mono Regular 10";
progressfont = "Noto Sans Mono Regular 12";
progress_font = "Noto Sans Mono Regular 12";
link_font = "Noto Sans Italic 16";
starting_text = "Starting up...";
@ -240,7 +240,7 @@ spinner.sprite.SetPosition(spinner.x, spinner.y, 3); // позиция за ил
// PROGRESS TEXT
progress_text.image = Image.Text(progress_t + "%", 0.5, 0.5, 0.5, 1, progressfont);
progress_text.image = Image.Text(progress_t + "%", 0.5, 0.5, 0.5, 1, progress_font);
progress_text.width = progress_text.image.GetWidth();
progress_text.height = progress_text.image.GetHeight();
@ -298,7 +298,7 @@ function progress_callback(duration, progress) {
progress_bar.sprite.SetImage(progress_bar.image);
f = Math.Int(progress_bar.image.GetWidth() /progress_bar.original_image.GetWidth() * 100);
progress_t.image = Image.Text(f + "%", 0.5, 0.5, 0.5, 1, progressfont);
progress_t.image = Image.Text(f + "%", 0.5, 0.5, 0.5, 1, progress_font);
progress_text.sprite.SetImage(progress_t.image);
}
}
@ -524,16 +524,27 @@ Plymouth.SetMessageFunction(message_callback);
// конечная точка, где допустимо показывать сообщения = 389 - 43 (10% от высоты messages_box.x) = 346
// если высота всех сообщений выше, чем высота (messages_box.height - 20%), то уменьшать количество строк, пока высота всех сообщений не быдет меньше (messages_box.height - 20%)
padding_top_bottom = Percent(10, messages_box.height);
padding_left_right = Percent(5, messages_box.width);
// высота символа = common_font = 10pt, предположим что 10px
// предположим, что ширина символа = 60% от высоты символа = 6px
// ширина side_panel = 25% от screen.width = 1080 * 0.25 = 270
// ширина messages_box = 80 % от side_panel = 270 * 0.8 = 216
// ширина всех сообщений = LINE_WIDTH * ширину символа = 40 * 6 = 240
// необходимо снижать количество LINE_WIDTH пока реальная ширина сообщения не будет меньше или равно ширине messages_box
padding_top_bottom = Percent(10, messages_box.height); // отступы сверху и снизу
padding_left_right = Percent(5, messages_box.width); // отступы слева и справа
message_sprite_.x = messages_box.x + (padding_left_right); // позиция % по X (слева направо)
message_sprite_.y = messages_box.y + (padding_top_bottom); // позиция % по Y (сверху вниз)
// LOG //
common_symbol.image = Image.Text("M", 0.5, 0.5, 0.5, 1, common_font);
common_symbol.height = common_symbol.image.GetHeight(); // высота символа
common_symbol.width = common_symbol.image.GetWidth(); // ширина символа
NUM_SCROLL_LINES=20; //количество строк лога
LINE_WIDTH=40; //ширина строк лога
LINE_HEIGHT=17;
LINE_HEIGHT = common_symbol.height * 1.5; // межстрочный интервал x1,5
for (index = NUM_SCROLL_LINES; index > 0; index--) {
if ((NUM_SCROLL_LINES * LINE_HEIGHT) > (messages_box.height - (padding_top_bottom * 2))) {
@ -544,6 +555,15 @@ for (index = NUM_SCROLL_LINES; index > 0; index--) {
}
}
for (index = LINE_WIDTH; index > 0; index--) {
if ((LINE_WIDTH * common_symbol.width) > (messages_box.width - (padding_left_right * 2))) {
LINE_WIDTH=LINE_WIDTH-1;
}
else {
break;
}
}
// Initialising text images and their positions
// 20 is the height(including line spacing) of each line
for (i=0; i < NUM_SCROLL_LINES; i++) {

0
dev/src/dark-red-border/ENTRY.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

0
dev/src/dark-red-border/PROGRESS_BAR.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
dev/src/dark-red-border/PROGRESS_BOX.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

0
dev/src/light-red-border/ENTRY.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

0
dev/src/light-red-border/PROGRESS_BAR.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

0
dev/src/light-red-border/PROGRESS_BOX.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 858 B

0
dev/src/light/ENTRY.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

0
dev/src/light/PROGRESS_BAR.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

0
dev/src/light/PROGRESS_BOX.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 858 B

0
melawy-nier-a2/BULLET.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 376 B

0
melawy-nier-a2/ENTRY.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

0
melawy-nier-a2/LOCK.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
melawy-nier-a2/LOGO_BOX.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

0
melawy-nier-a2/MAIN_LOGO.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

0
melawy-nier-a2/PROGRESS_BAR.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
melawy-nier-a2/PROGRESS_BOX.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

32
melawy-nier-a2/script.script Executable file → Normal file
View File

@ -108,7 +108,7 @@ SetSpriteImage = fun(asset, x, y, z) {
// TEXT
common_font = "Noto Sans Mono Regular 10";
progressfont = "Noto Sans Mono Regular 12";
progress_font = "Noto Sans Mono Regular 12";
link_font = "Noto Sans Italic 16";
starting_text = "Starting up...";
@ -240,7 +240,7 @@ spinner.sprite.SetPosition(spinner.x, spinner.y, 3); // позиция за ил
// PROGRESS TEXT
progress_text.image = Image.Text(progress_t + "%", 0.5, 0.5, 0.5, 1, progressfont);
progress_text.image = Image.Text(progress_t + "%", 0.5, 0.5, 0.5, 1, progress_font);
progress_text.width = progress_text.image.GetWidth();
progress_text.height = progress_text.image.GetHeight();
@ -298,7 +298,7 @@ fun progress_callback(duration, progress) {
progress_bar.sprite.SetImage(progress_bar.image);
f = Math.Int(progress_bar.image.GetWidth() /progress_bar.original_image.GetWidth() * 100);
progress_t.image = Image.Text(f + "%", 0.5, 0.5, 0.5, 1, progressfont);
progress_t.image = Image.Text(f + "%", 0.5, 0.5, 0.5, 1, progress_font);
progress_text.sprite.SetImage(progress_t.image);
}
}
@ -524,16 +524,27 @@ Plymouth.SetMessageFunction(message_callback);
// конечная точка, где допустимо показывать сообщения = 389 - 43 (10% от высоты messages_box.x) = 346
// если высота всех сообщений выше, чем высота (messages_box.height - 20%), то уменьшать количество строк, пока высота всех сообщений не быдет меньше (messages_box.height - 20%)
padding_top_bottom = Percent(10, messages_box.height);
padding_left_right = Percent(5, messages_box.width);
// высота символа = common_font = 10pt, предположим что 10px
// предположим, что ширина символа = 60% от высоты символа = 6px
// ширина side_panel = 25% от screen.width = 1080 * 0.25 = 270
// ширина messages_box = 80 % от side_panel = 270 * 0.8 = 216
// ширина всех сообщений = LINE_WIDTH * ширину символа = 40 * 6 = 240
// необходимо снижать количество LINE_WIDTH пока реальная ширина сообщения не будет меньше или равно ширине messages_box
padding_top_bottom = Percent(10, messages_box.height); // отступы сверху и снизу
padding_left_right = Percent(5, messages_box.width); // отступы слева и справа
message_sprite_.x = messages_box.x + (padding_left_right); // позиция % по X (слева направо)
message_sprite_.y = messages_box.y + (padding_top_bottom); // позиция % по Y (сверху вниз)
// LOG //
common_symbol.image = Image.Text("M", 0.5, 0.5, 0.5, 1, common_font);
common_symbol.height = common_symbol.image.GetHeight(); // высота символа
common_symbol.width = common_symbol.image.GetWidth(); // ширина символа
NUM_SCROLL_LINES=20; //количество строк лога
LINE_WIDTH=40; //ширина строк лога
LINE_HEIGHT=17;
LINE_HEIGHT = common_symbol.height * 1.5; // межстрочный интервал x1,5
for (index = NUM_SCROLL_LINES; index > 0; index--) {
if ((NUM_SCROLL_LINES * LINE_HEIGHT) > (messages_box.height - (padding_top_bottom * 2))) {
@ -544,6 +555,15 @@ for (index = NUM_SCROLL_LINES; index > 0; index--) {
}
}
for (index = LINE_WIDTH; index > 0; index--) {
if ((LINE_WIDTH * common_symbol.width) > (messages_box.width - (padding_left_right * 2))) {
LINE_WIDTH=LINE_WIDTH-1;
}
else {
break;
}
}
// Initialising text images and their positions
// 20 is the height(including line spacing) of each line
for (i=0; i < NUM_SCROLL_LINES; i++) {

View File

@ -1,3 +1,5 @@
#!/bin/bash
git add . && git commit -m "Update" && git push
echo "Ready"