corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader
This commit is contained in:
@@ -64,9 +64,9 @@ void Title::checkEvents() {
|
||||
globalEvents::check(event);
|
||||
|
||||
// Solo se comprueban estas teclas si no está activo el menu de logros
|
||||
if (event.type == SDL_KEYDOWN) {
|
||||
if (event.type == SDL_EVENT_KEY_DOWN) {
|
||||
if (!show_cheevos_) {
|
||||
switch (event.key.keysym.scancode) {
|
||||
switch (event.key.key) {
|
||||
case SDL_SCANCODE_1:
|
||||
options.section.section = Section::GAME;
|
||||
options.section.subsection = Subsection::NONE;
|
||||
@@ -242,8 +242,8 @@ void Title::moveCheevosList(int direction) {
|
||||
cheevos_surface_view_.y = direction == 0 ? cheevos_surface_view_.y - SPEED : cheevos_surface_view_.y + SPEED;
|
||||
|
||||
// Ajusta los limites
|
||||
const int BOTTOM = cheevos_surface_->getHeight() - cheevos_surface_view_.h;
|
||||
cheevos_surface_view_.y = std::clamp(cheevos_surface_view_.y, 0, BOTTOM);
|
||||
const float BOTTOM = cheevos_surface_->getHeight() - cheevos_surface_view_.h;
|
||||
cheevos_surface_view_.y = std::clamp(cheevos_surface_view_.y, 0.0F, BOTTOM);
|
||||
|
||||
cheevos_sprite_->setClip(cheevos_surface_view_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user