53
edits
Changes
From Final Fantasy Inside
no edit summary
// Adjust window position if too close to an edge
const MIN_WINDOW_DISTANCE = 8 // Looks about right
if (x < MIN_WINDOW_DISTANCE) { dialog.x = MIN_WINDOW_DISTANCE } if (y < MIN_WINDOW_DISTANCE) { dialog.y = MIN_WINDOW_DISTANCE } if (x + w + MIN_WINDOW_DISTANCE > GAME_WIDTH) { dialog.x = GAME_WIDTH - w - MIN_WINDOW_DISTANCE } if (y + h + MIN_WINDOW_DISTANCE > GAME_HEIGHT) { dialog.y = GAME_HEIGHT - h - MIN_WINDOW_DISTANCE }