Add click overlay
This commit is contained in:
parent
7d01a8fd13
commit
65a7f5ca8e
1 changed files with 16 additions and 2 deletions
|
@ -24,6 +24,7 @@ var sms: CoreBaseModule
|
|||
|
||||
# Presencode infrastructure
|
||||
var presenloader: Node
|
||||
var clickoverlay: Button = Button.new()
|
||||
|
||||
# Presentation data
|
||||
var entrypoint: PresencodeEntrypoint
|
||||
|
@ -31,16 +32,29 @@ var manifest: Dictionary
|
|||
var current_slide: int = 0
|
||||
var slide_switch_in_progress: bool = false
|
||||
|
||||
# +++ initialization +++
|
||||
# +++ initialization and processing +++
|
||||
func _init(core_new: Core, presenloader_new: Node) -> void:
|
||||
name = "Communication"
|
||||
|
||||
core = core_new
|
||||
logger = core.logger.get_instance("src/classes/communication.gd", self)
|
||||
sms = core.sms
|
||||
|
||||
presenloader = presenloader_new
|
||||
clickoverlay.name = "Click Overlay"
|
||||
clickoverlay.size = Vector2(100000.0, 100000.0)
|
||||
clickoverlay.position = -Vector2(50000.5, 50000.5)
|
||||
clickoverlay.modulate = Color(1, 1, 1, 0)
|
||||
clickoverlay.connect("pressed", func() -> void:
|
||||
logger.diag("Navigating to next slide")
|
||||
switch_slide(current_slide + 1)
|
||||
)
|
||||
|
||||
func _ready() -> void:
|
||||
# Add click overlay to 'debug' scene collection
|
||||
sms.add_scene("clickoverlay", clickoverlay, CoreTypes.SceneType.DEBUG)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
|
||||
# Check for inputs
|
||||
if Input.is_action_just_pressed("fullscreen"):
|
||||
logger.diag("Toggling fullscreen mode")
|
||||
|
|
Loading…
Reference in a new issue