Skip to content

Commit

Permalink
Update UI in Designer
Browse files Browse the repository at this point in the history
  • Loading branch information
Demindiro committed Oct 2, 2020
1 parent 337cffd commit d8ec3df
Show file tree
Hide file tree
Showing 12 changed files with 359 additions and 254 deletions.
4 changes: 4 additions & 0 deletions design/ui/feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Feedback on UI

- Too large (on small screens?)
- Unit Info has a lot of empty space below, shrink perhaps?
26 changes: 17 additions & 9 deletions design/ui/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions designer/designer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ func _process(_delta):
func set_enabled(var p_enabled):
enabled = p_enabled
if p_enabled:
$HUD/Menu.visible = false
$HUD/Inventory.visible = false
$HUD/SaveVehicle.visible = false
$HUD/LoadVehicle.visible = false
$HUD/Tint.visible = not enabled
$GUI/Menu.visible = false
$GUI/Inventory.visible = false
$GUI/SaveVehicle.visible = false
$GUI/LoadVehicle.visible = false
#$GUI/Tint.visible = not enabled
$Camera.enabled = enabled
set_process(enabled)
set_process_input(enabled)
Expand All @@ -59,10 +59,10 @@ func set_enabled(var p_enabled):
func process_actions():
if Input.is_action_just_pressed("ui_cancel"):
set_enabled(false)
$HUD/Menu.visible = true
$GUI/Menu.visible = true
elif Input.is_action_pressed("designer_open_inventory"):
set_enabled(false)
$HUD/Inventory.visible = true
$GUI/Inventory.visible = true
elif Input.is_action_just_pressed("designer_place_block"):
if ray_voxel_valid:
var coordinate = _v2a(_a2v(ray.voxel) + _a2v(ray.get_normal()))
Expand Down
Loading

0 comments on commit d8ec3df

Please sign in to comment.