|
114 | 114 | font-weight: bold; |
115 | 115 | mix-blend-mode: difference; |
116 | 116 | } |
117 | | - /* Chat styles */ |
118 | | - .chat-container { |
119 | | - position: fixed; |
120 | | - top: 20px; |
121 | | - right: 20px; |
122 | | - width: 350px; |
123 | | - max-height: 500px; |
124 | | - background-color: white; |
125 | | - border-radius: 10px; |
126 | | - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); |
127 | | - display: flex; |
128 | | - flex-direction: column-reverse; |
129 | | - overflow: hidden; |
130 | | - font-family: Arial, sans-serif; |
131 | | - z-index: 3000; |
132 | | - pointer-events: auto; |
133 | | - } |
134 | | - |
135 | | - .chat-header { |
136 | | - background-color: #007bff; |
137 | | - color: white; |
138 | | - padding: 10px; |
139 | | - text-align: center; |
140 | | - font-weight: bold; |
141 | | - cursor: pointer; |
142 | | - } |
143 | | - |
144 | | - .chat-messages { |
145 | | - flex: 1; |
146 | | - padding: 10px; |
147 | | - overflow-y: auto; |
148 | | - border-top: 1px solid #ddd; |
149 | | - border-bottom: 1px solid #ddd; |
150 | | - background-color: #f9f9f9; |
151 | | - } |
152 | | - |
153 | | - .chat-input { |
154 | | - display: flex; |
155 | | - border-top: 1px solid #ddd; |
156 | | - } |
157 | | - |
158 | | - .chat-input input { |
159 | | - flex: 1; |
160 | | - padding: 10px; |
161 | | - border: 1px solid #ccc; |
162 | | - border-radius: 5px; |
163 | | - outline: none; |
164 | | - font-size: 14px; |
165 | | - margin-right: 5px; |
166 | | - box-sizing: border-box; |
167 | | - background-color: #fff; |
168 | | - color: #333; |
169 | | - z-index: 4000; |
170 | | - } |
171 | | - |
172 | | - .chat-input input:focus { |
173 | | - border-color: #007bff; |
174 | | - } |
175 | | - |
176 | | - .chat-input button { |
177 | | - padding: 10px; |
178 | | - background-color: #007bff; |
179 | | - color: white; |
180 | | - border: none; |
181 | | - border-radius: 5px; |
182 | | - cursor: pointer; |
183 | | - font-size: 14px; |
184 | | - transition: background-color 0.3s ease; |
185 | | - } |
186 | | - |
187 | | - .chat-input button:hover { |
188 | | - background-color: #0056b3; |
189 | | - } |
190 | | - |
191 | 117 | /* Estilo para o botão de skybox */ |
192 | 118 | .skybox-button { |
193 | 119 | position: fixed; |
|
800 | 726 |
|
801 | 727 | // Evento para detectar pressionamentos da barra de espaço |
802 | 728 | document.addEventListener('keydown', function(event) { |
803 | | - const chatInput = document.getElementById('chat-input'); |
804 | | - if (event.code === 'Space' && document.activeElement !== chatInput) { |
| 729 | + if (event.code === 'Space') { |
805 | 730 | event.preventDefault(); // Prevenir o scroll da página |
806 | 731 |
|
807 | 732 | // Incrementar o contador de pressionamentos da barra de espaço |
|
842 | 767 | } |
843 | 768 | spacePressCount = 0; // Resetar o contador |
844 | 769 | } |
845 | | - |
846 | | - chatInput.focus(); |
847 | | - } |
848 | | - if (event.code === 'Enter' && document.activeElement === chatInput) { |
849 | | - sendMessage(); |
850 | 770 | } |
851 | 771 | }); |
852 | 772 |
|
|
0 commit comments