mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-11 19:04:50 +01:00
Fix a few problems for the "git replace" demo, scale up sandbox UI
This commit is contained in:
parent
d69c832aba
commit
ff590165d5
5 changed files with 16 additions and 12 deletions
|
@ -18,7 +18,6 @@ var mouse_inside = false
|
|||
var _simplified_view = false
|
||||
|
||||
func _ready():
|
||||
nodes.rect_pivot_offset = nodes.rect_size / 2
|
||||
file_browser.shell = shell
|
||||
|
||||
# Trigger these again because nodes were not ready before.
|
||||
|
@ -26,6 +25,7 @@ func _ready():
|
|||
set_file_browser_active(file_browser_active)
|
||||
|
||||
func _process(_delta):
|
||||
nodes.rect_pivot_offset = nodes.rect_size / 2
|
||||
if path:
|
||||
apply_forces()
|
||||
|
||||
|
@ -48,7 +48,10 @@ func update_everything():
|
|||
update_objects()
|
||||
remove_gone_stuff()
|
||||
else:
|
||||
index.text = ""
|
||||
index.text = ""
|
||||
for o in objects:
|
||||
objects[o].queue_free()
|
||||
objects = {}
|
||||
|
||||
|
||||
func set_path(new_path):
|
||||
|
@ -159,7 +162,7 @@ func find_position(n):
|
|||
return n.position
|
||||
|
||||
func git(args, splitlines = false):
|
||||
var o = shell.run("git " + args)
|
||||
var o = shell.run("git --no-replace-objects " + args)
|
||||
|
||||
if splitlines:
|
||||
o = o.split("\n")
|
||||
|
|
|
@ -18,11 +18,12 @@ __meta__ = {
|
|||
[node name="VSplitContainer" type="VSplitContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="RepoVis" type="Control" parent="VSplitContainer"]
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 894.0
|
||||
rect_clip_content = true
|
||||
mouse_filter = 1
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -2,3 +2,5 @@ extends Control
|
|||
|
||||
func _ready():
|
||||
$HSplitContainer/Repository.path = "/tmp/active"
|
||||
|
||||
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, Vector2(1920, 1080), 1.5)
|
||||
|
|
13
sandbox.tscn
13
sandbox.tscn
|
@ -8,9 +8,6 @@
|
|||
[node name="Sandbox" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = -960.0
|
||||
margin_bottom = -540.0
|
||||
rect_scale = Vector2( 2, 2 )
|
||||
theme = ExtResource( 3 )
|
||||
script = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
|
@ -40,16 +37,16 @@ __meta__ = {
|
|||
[node name="Repository" parent="HSplitContainer" instance=ExtResource( 2 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 469.0
|
||||
margin_bottom = 530.0
|
||||
margin_right = 949.0
|
||||
margin_bottom = 1070.0
|
||||
size_flags_horizontal = 3
|
||||
file_browser_active = false
|
||||
|
||||
[node name="Terminal" parent="HSplitContainer" instance=ExtResource( 1 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 481.0
|
||||
margin_right = 950.0
|
||||
margin_bottom = 530.0
|
||||
margin_left = 961.0
|
||||
margin_right = 1910.0
|
||||
margin_bottom = 1070.0
|
||||
size_flags_horizontal = 3
|
||||
repository_path = NodePath("../Repository")
|
||||
|
|
|
@ -26,6 +26,7 @@ func _ready():
|
|||
command_dropdown.get_popup().connect("id_pressed", self, "load_command")
|
||||
|
||||
$TextEditor.connect("hide", self, "editor_closed")
|
||||
input.grab_focus()
|
||||
|
||||
func _input(event):
|
||||
if history.size() > 0:
|
||||
|
|
Loading…
Reference in a new issue