-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rewrite to composition api
- Loading branch information
Showing
63 changed files
with
8,719 additions
and
6,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
extends: [ | ||
'@nextgis/eslint-config', | ||
'plugin:vue/recommended', | ||
'@vue/typescript/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
rules: { | ||
'vue/script-setup-uses-vars': 'error', | ||
'vue/no-mutating-props': 'error', | ||
'vue/require-default-prop': 'off', | ||
'vue/no-v-html': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'prefer-rest-params': 0, | ||
'@typescript-eslint/no-use-before-define': 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "@nextgis"] | ||
path = @nextgis | ||
url = [email protected]:nextgis/nextgis_frontend.git | ||
[submodule "@nextgis_vue2"] | ||
path = @nextgis_vue2 | ||
url = [email protected]:nextgis/nextgis_frontend_vue2.git |
Submodule @nextgis
updated
1157 files
Submodule @nextgis_vue2
added at
0ca608
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import curses | ||
|
||
def main(stdscr): | ||
# Отключаем отображение курсора | ||
curses.curs_set(0) | ||
|
||
# Получаем размеры окна | ||
height, width = stdscr.getmaxyx() | ||
|
||
# Определяем меню | ||
menu = ["Начать игру", "Выход"] | ||
current_row = 0 | ||
|
||
def print_menu(stdscr, selected_row_idx): | ||
stdscr.clear() | ||
for idx, row in enumerate(menu): | ||
x = width//2 - len(row)//2 | ||
y = height//2 - len(menu)//2 + idx | ||
if idx == selected_row_idx: | ||
stdscr.attron(curses.color_pair(1)) | ||
stdscr.addstr(y, x, row) | ||
stdscr.attroff(curses.color_pair(1)) | ||
else: | ||
stdscr.addstr(y, x, row) | ||
stdscr.refresh() | ||
|
||
# Настраиваем цветовую пару для выделения | ||
curses.start_color() | ||
curses.init_pair(1, curses.COLOR_BLACK, curses.COLOR_WHITE) | ||
|
||
print_menu(stdscr, current_row) | ||
|
||
while True: | ||
key = stdscr.getch() | ||
|
||
if key == curses.KEY_UP and current_row > 0: | ||
current_row -= 1 | ||
elif key == curses.KEY_DOWN and current_row < len(menu) - 1: | ||
current_row += 1 | ||
elif key == curses.KEY_ENTER or key in [10, 13]: | ||
if current_row == 0: | ||
stdscr.addstr(height//2 + len(menu)//2 + 1, width//2 - len("Начинаем игру...")//2, "Начинаем игру...") | ||
stdscr.refresh() | ||
stdscr.getch() | ||
elif current_row == 1: | ||
break | ||
|
||
print_menu(stdscr, current_row) | ||
|
||
curses.wrapper(main) |
Oops, something went wrong.