misc cleanup
This commit is contained in:
parent
7293ce4f9b
commit
ccd36d0d59
|
|
@ -6,6 +6,12 @@ script/source = "extends Button
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
TranslationServer.set_locale(\"en\")
|
||||
$\"../Button2\".text = \"crafted Mask\"
|
||||
|
||||
|
||||
|
||||
func _on_pressed() -> void:
|
||||
TranslationServer.set_locale(\"de\")
|
||||
"
|
||||
|
||||
|
|
@ -43,7 +49,7 @@ offset_left = 662.0
|
|||
offset_top = 198.0
|
||||
offset_right = 915.0
|
||||
offset_bottom = 399.0
|
||||
text = "big boi"
|
||||
text = "crafted Mask"
|
||||
|
||||
[node name="OptionButton" type="MenuButton" parent="."]
|
||||
layout_mode = 0
|
||||
|
|
@ -85,3 +91,5 @@ But at least I could fucking talk to teachers and they had stuff to say. Mr Thom
|
|||
He said I was gifted. He said I just didn't need homework for good grades. And he also made sure to always include extra credits. So my silly slip-ups wouldn’t get me a B."
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
|
||||
[connection signal="pressed" from="Button" to="Button" method="_on_pressed"]
|
||||
|
|
|
|||
|
|
@ -151,9 +151,9 @@ func reclaim_lost_focus():
|
|||
grab_focus()
|
||||
|
||||
#func _process(delta):
|
||||
# # drops dragged area when Mouse is no longer pressed.
|
||||
# if has_stage and !Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) and current_context == DRAGGING:
|
||||
# currently_active_node.is_dragged = false
|
||||
# # drops dragged area when Mouse is no longer pressed.
|
||||
# if has_stage and !Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) and current_context == DRAG:
|
||||
# currently_active_node.is_dragged = false
|
||||
|
||||
# Will be used later to spawn Cards and Post-Its and remember them in the dictionary
|
||||
func populate_board(card_names: Array[StringName]):
|
||||
|
|
@ -210,6 +210,7 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
|
|||
to_handle.attached_to = self
|
||||
current_context = DRAG
|
||||
|
||||
|
||||
# when Drag stops ...
|
||||
if input.button_index == MOUSE_BUTTON_MASK_LEFT and not input.pressed:
|
||||
to_handle.is_dragged = false
|
||||
|
|
@ -332,21 +333,20 @@ func insert_area(parent: Control, node: Area2D):
|
|||
# Takes the inputs for control inputs
|
||||
func _input(event):
|
||||
|
||||
# Return, if the input is a mouse event (mouse events are handled separately)
|
||||
if not has_stage or not is_instance_valid(currently_active_node): return
|
||||
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
State.leave_stage(self)
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
if event is InputEventMouse:
|
||||
# makes sure to pass release events so notes do not get attached to the mouse while the cursor leaves the area.
|
||||
if event is InputEventMouseButton and current_context == DRAG:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT and not event.pressed:
|
||||
handle_mouse_button(event)
|
||||
get_viewport().set_input_as_handled()
|
||||
else:
|
||||
return
|
||||
if event is InputEventMouse:
|
||||
# makes sure to pass release events so notes do not get attached to the mouse while the cursor leaves the area.
|
||||
if event is InputEventMouseButton and current_context == DRAG:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT and not event.pressed:
|
||||
handle_mouse_button(event)
|
||||
get_viewport().set_input_as_handled()
|
||||
else:
|
||||
return
|
||||
|
||||
if current_context != DRAG:
|
||||
if event.is_action_pressed("ui_up"):
|
||||
|
|
|
|||
|
|
@ -208,9 +208,11 @@ func _move_sticky_note():
|
|||
content.position = (closest.to_global(closest.sticky_note_position) - global_position) * hover_pos_shift
|
||||
|
||||
func is_sticky_note_attached() -> bool:
|
||||
# FIXME: this breaks if attatched to is previousely freed because GODOT IS FUCKING STUPID
|
||||
return attached_to is Card
|
||||
|
||||
func is_sticky_note_in_panel() -> bool:
|
||||
## fixme ~> see above
|
||||
return attached_to is StickyNotePanel
|
||||
|
||||
func tween_transform_to(target: Transform2D):
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ func _validate_property(property: Dictionary) -> void:
|
|||
|
||||
func _ready() -> void:
|
||||
var dir = DirAccess.open(State.user_saves_path)
|
||||
print(DirAccess.get_open_error())
|
||||
if DirAccess.get_open_error() != OK:
|
||||
printerr("Error while opening User Save Directory: %s" % error_string(DirAccess.get_open_error()))
|
||||
# Invalid Error being raised when Directory does not exist.
|
||||
if DirAccess.get_open_error() == ERR_INVALID_PARAMETER:
|
||||
dir = DirAccess.open("user://")
|
||||
|
|
@ -33,7 +34,6 @@ func _ready() -> void:
|
|||
load_games()
|
||||
for i in range(save_buttons.size()):
|
||||
save_buttons[i].pressed.connect(func(): picked.emit(saves[i]))
|
||||
print("connect ", i)
|
||||
|
||||
func load_games():
|
||||
saves = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue