Skip to content

Commit

Permalink
hide_border_on_maximize and font bugfix
Browse files Browse the repository at this point in the history
- new flag hide_border_on_maximize to make maximized window on the ending sequence looks (when turning of fullscreen ending) nearly identical with an actual fullscreen. This is for showcasing purpose since the switch between orbiting keys and the ending sequence may freeze recording software
- replaced most of the font with selawik
  • Loading branch information
etherealxx committed Apr 17, 2024
1 parent 0f67b2d commit d869e8f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- `transparent_background`, when turned off, the keys' window will no longer be transparent. Improves performance on lower end devices
- `music_volume`, adjust the volume. Default is 20. Decreasing it will decrease the volume by 1 dB each.
- `no_ending_screen`, when turned on, the bluescreen sequence won't happen, instead after clicking on the key, it'll just say if the key you choose is correct or wrong. For quick play.
- `fullscreen_ending`, when turned off, the ending sequence will play on maximized borderless window. This can fix some recording software can't properly record the ending sequence transition.
- The rest are useful for debugging, and information about each variable can be read on the main root node's [script](https://github.com/etherealxx/limbo-godot/blob/master/scripts/main.gd).
- Pressing `Esc` during the bluescreen ending will make you instantly quit the game, instead of needing to wait for 7 seconds

Expand All @@ -34,6 +35,8 @@
- You can run the executable again to launch another game while the game is still running.
- The game will look a bit weird on device with monitor resolution/display height smaller than +-900px
- The song will desync when running the game on low-end device
- The transition between choosing the key and the ending scene may freeze screen recorder (the recording will still going but the recorded video will looks weird). <br/>This can be mitigated by setting `fullscreen_ending` to `off` and `hide_title_on_maximize` to `on`.
- The blue pattern background on the ending scene may look cutted on certain device with higher resolution

---

Expand Down
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="Keygen"
config/description="focus"
config/version="1.1.1"
config/version="1.1.2"
run/main_scene="res://scenes/main.tscn"
config/use_custom_user_dir=true
config/custom_user_dir_name="limbo-godot"
Expand Down
2 changes: 1 addition & 1 deletion scenes/settings_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://y4e85mkvnmmp"]

[ext_resource type="Script" path="res://scripts/settings_menu.gd" id="1_i16qh"]
[ext_resource type="FontFile" uid="uid://8gxideu8ajla" path="res://fonts/segoeui.ttf" id="2_pe1n0"]
[ext_resource type="FontFile" uid="uid://cav7vtx0re00h" path="res://fonts/selawk.ttf" id="2_pe1n0"]

[sub_resource type="LabelSettings" id="LabelSettings_k4q36"]
font = ExtResource("2_pe1n0")
Expand Down
1 change: 1 addition & 0 deletions scripts/autoloads/variablekeeper.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var fullscreen_ending := true
var winning_wait_time := 3.0
var bluescreen_wait_time := 7.0
var transparent_background := true
var hide_border_on_maximize := true

var main_saved_values

Expand Down
2 changes: 2 additions & 0 deletions scripts/limbobackground.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func _ready():
currentwindow.set_flag(Window.FLAG_NO_FOCUS, false)
currentwindow.set_flag(Window.FLAG_TRANSPARENT, false) # idk if this do anything
get_viewport().set_transparent_background(false) # fixing windows 10 bug
if VariableKeeper.hide_border_on_maximize and !VariableKeeper.fullscreen_ending:
currentwindow.set_flag(Window.FLAG_BORDERLESS, true)
currentwindow.set_mode(modenumber())
currentwindow.move_to_foreground()
currentwindow.grab_focus()
Expand Down
7 changes: 5 additions & 2 deletions scripts/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ extends Node
@export var sixteen_by_nine_reso := false
## If this was false, the end scene will be a maximized window instead of full screen.
@export var fullscreen_ending := true
## If fullscreen_ending is off, this hides the border on the maximized window, so it will look similiar to an actual fullscreen
## Turning this off will show border, like how usually softwares looks when maximized with the maximize button.
@export var hide_border_on_maximize := true
## Don't move the key automatically
@export var debugdontmove := false
## Make a window appear that could control the movement of the key. Combine it with debugdon'tmove
Expand Down Expand Up @@ -35,7 +38,7 @@ var saved_values = [
"sixteen_by_nine_reso", "fullscreen_ending", "debugdontmove",
"debug_key_mover_window", "instant_finish", "transparent_background",
"winning_wait_time", "bluescreen_wait_time", "no_ending_screen",
"music_volume", "load_save"
"music_volume", "hide_border_on_maximize", "load_save"
]

const windowsize := 150
Expand Down Expand Up @@ -163,7 +166,7 @@ func _ready():

initialize_global_variables(
["sixteen_by_nine_reso", "fullscreen_ending", "winning_wait_time",
"bluescreen_wait_time", "transparent_background"]
"bluescreen_wait_time", "transparent_background", "hide_border_on_maximize"]
)

if debug_key_mover_window:
Expand Down

0 comments on commit d869e8f

Please sign in to comment.