Открыть боковую панель
Парфиненко Роман Сергеевич
universo-phaser
Коммиты
0d9b44ec
Коммит
0d9b44ec
создал
Дек 14, 2023
по автору
avathar
Просмотр файлов
#174 вынес цвета в константы
владелец
e00639c0
Изменения
6
Скрыть пробелы
Построчно
Рядом
universo-frontend/src/apps/cards/CreateItem.ts
Просмотр файла @
0d9b44ec
...
...
@@ -7,6 +7,7 @@ import {
DragObjectDepth
,
FONT_SMALL
,
FONT_LARGE
,
COLOR_DRAG_STROKE
,
}
from
'
../kanbans/Const
'
;
import
{
ItemType
}
from
'
src/types/kanban_types
'
;
import
{
EventBus
,
Events
}
from
'
src/boot/eventBus
'
;
...
...
@@ -124,7 +125,7 @@ const SetDraggable = (item: ItemType): void => {
const
OnItemDragStart
=
function
(
this
):
void
{
this
.
setDepth
(
DragObjectDepth
);
this
.
getElement
(
'
background
'
).
setStrokeStyle
(
3
,
0xff0000
);
this
.
getElement
(
'
background
'
).
setStrokeStyle
(
3
,
COLOR_DRAG_STROKE
);
};
const
OnItemDragEnd
=
function
(
this
):
void
{
...
...
universo-frontend/src/apps/kanbans/Const.ts
Просмотр файла @
0d9b44ec
// Color
export
const
COLOR_LIGHT
=
0x7b5e57
;
export
const
COLOR_PRIMARY
=
0x4e342e
;
export
const
COLOR_DARK
=
0x260e04
;
export
const
COLOR_LIGHT
=
0x7b
_5e_57
;
export
const
COLOR_PRIMARY
=
0x4e
_34_2e
;
export
const
COLOR_DARK
=
0x26
_0e_04
;
export
const
COLOR_DRAG_STROKE
=
0xff0000
;
export
const
COLOR_BLACK
=
0x000000
;
export
const
COLOR_WHITE
=
0xffffff
;
// Depth
export
const
DragObjectDepth
=
1000
;
...
...
universo-frontend/src/apps/kanbans/CreateColumnPanel.ts
Просмотр файла @
0d9b44ec
...
...
@@ -5,6 +5,7 @@ import {
COLOR_DARK
,
FONT_SMALL
,
FONT_LARGE
,
COLOR_DRAG_STROKE
,
}
from
'
./Const
'
;
import
{
DefaultDepth
,
DragObjectDepth
}
from
'
./Const
'
;
import
CreateItemsBox
from
'
../cards/CreateItemsBox
'
;
...
...
@@ -168,7 +169,7 @@ const SetDraggable = (panel: any) => {
const
OnPanelDragStart
=
function
(
this
:
any
)
{
this
.
setDepth
(
DragObjectDepth
);
this
.
getElement
(
'
background
'
).
setStrokeStyle
(
3
,
0xff0000
);
this
.
getElement
(
'
background
'
).
setStrokeStyle
(
3
,
COLOR_DRAG_STROKE
);
};
const
OnPanelDragEnd
=
function
(
this
:
any
)
{
...
...
universo-frontend/src/apps/kanbans/CreateModalLabel.ts
Просмотр файла @
0d9b44ec
import
{
EndlessCanvas
}
from
'
../spaces-2d/EndlessCanvas
'
;
import
{
FONT_SMALL
}
from
'
./Const
'
;
import
{
COLOR_BLACK
,
FONT_SMALL
}
from
'
./Const
'
;
const
CreateModalLabel
=
(
scene
:
EndlessCanvas
,
text
:
string
)
=>
{
const
normalBackground
=
scene
.
rexUI
.
add
.
roundRectangle
(
...
...
@@ -8,10 +8,10 @@ const CreateModalLabel = (scene: EndlessCanvas, text: string) => {
0
,
0
,
10
,
0xffffff
,
COLOR_BLACK
,
0.0
,
);
normalBackground
.
setStrokeStyle
(
2
,
0x000000
);
// Чёрная обводка
normalBackground
.
setStrokeStyle
(
2
,
COLOR_BLACK
);
// Чёрная обводка
const
hoverBackground
=
scene
.
rexUI
.
add
.
roundRectangle
(
0
,
...
...
@@ -19,17 +19,17 @@ const CreateModalLabel = (scene: EndlessCanvas, text: string) => {
0
,
0
,
10
,
0xffffff
,
COLOR_BLACK
,
0.0
,
);
hoverBackground
.
setStrokeStyle
(
2
,
0x000000
);
// Чёрная обводка
hoverBackground
.
setStrokeStyle
(
2
,
COLOR_BLACK
);
// Чёрная обводка
const
label
=
scene
.
rexUI
.
add
.
label
({
background
:
normalBackground
,
text
:
scene
.
add
.
text
(
0
,
0
,
text
,
{
fontSize
:
FONT_SMALL
,
color
:
'
#000000
'
,
// Чёрный текст
color
:
COLOR_BLACK
.
toString
()
,
// Чёрный текст
}),
align
:
'
center
'
,
space
:
{
...
...
universo-frontend/src/apps/kanbans/CreateRequestModal.ts
Просмотр файла @
0d9b44ec
import
{
EndlessCanvas
}
from
'
../spaces-2d/EndlessCanvas
'
;
import
{
COLOR_BLACK
,
COLOR_WHITE
}
from
'
./Const
'
;
import
{
COLOR_LIGHT
,
COLOR_PRIMARY
,
...
...
@@ -35,7 +36,7 @@ const CreateRequestModal = (
text
:
{
background
:
{
stroke
:
'
black
'
,
stroke
:
COLOR_BLACK
,
},
style
:
{
...
...
@@ -44,10 +45,10 @@ const CreateRequestModal = (
backgroundBottomY
:
1
,
backgroundHeight
:
20
,
cursor
:
{
color
:
'
black
'
,
backgroundColor
:
'
white
'
,
color
:
COLOR_BLACK
,
backgroundColor
:
COLOR_WHITE
,
},
color
:
'
#ffffff
'
,
color
:
COLOR_WHITE
,
},
},
...
...
@@ -95,13 +96,13 @@ const CreateRequestModal = (
const
dialog
=
scene
.
rexUI
.
add
.
dialog
({
background
:
scene
.
rexUI
.
add
.
roundRectangle
(
0
,
0
,
0
,
0
,
20
,
0xffffff
)
.
setStrokeStyle
(
2
,
0x00
_00_00
),
.
roundRectangle
(
0
,
0
,
0
,
0
,
20
,
COLOR_WHITE
)
.
setStrokeStyle
(
2
,
COLOR_BLACK
),
title
:
scene
.
rexUI
.
add
.
label
({
text
:
scene
.
add
.
text
(
0
,
0
,
titleText
,
{
fontSize
:
FONT_LARGE
,
color
:
'
#000000
'
,
color
:
COLOR_BLACK
.
toString
()
,
}),
space
:
{
left
:
20
,
// Увеличены отступы
...
...
@@ -135,7 +136,7 @@ const CreateRequestModal = (
},
})
.
on
(
'
button.over
'
,
function
(
button
,
groupName
,
index
,
pointer
,
event
)
{
button
.
getElement
(
'
background
'
).
setStrokeStyle
(
1
,
0xffffff
);
button
.
getElement
(
'
background
'
).
setStrokeStyle
(
1
,
COLOR_BLACK
);
})
.
on
(
'
button.out
'
,
function
(
button
,
groupName
,
index
,
pointer
,
event
)
{
button
.
getElement
(
'
background
'
).
setStrokeStyle
();
...
...
universo-frontend/src/apps/spaces-2d/createGrid.ts
Просмотр файла @
0d9b44ec
import
{
COLOR_BLACK
,
COLOR_WHITE
}
from
'
../kanbans/Const
'
;
import
{
EndlessCanvas
}
from
'
./EndlessCanvas
'
;
export
default
(
scene
:
EndlessCanvas
)
=>
{
...
...
@@ -7,9 +8,9 @@ export default (scene: EndlessCanvas) => {
const
height
=
scene
.
cameras
.
main
.
displayHeight
*
10
;
const
cellWidth
=
100
;
const
cellHeight
=
100
;
const
fillColor
=
0x000000
;
const
fillColor
=
COLOR_BLACK
;
const
fillAlpha
=
0.1
;
const
outlineFillColor
=
0x000000
;
const
outlineFillColor
=
COLOR_BLACK
;
const
outlineFillAlpha
=
0.1
;
const
grid
=
scene
.
add
.
grid
(
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать