Skip to content

Commit

Permalink
resource文件格式测试
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwings committed Jun 28, 2023
1 parent 19d5a85 commit 9e55380
Show file tree
Hide file tree
Showing 1,905 changed files with 388,179 additions and 24,836 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.import/
.godot/
*.import
*.cfg
*.cache
11 changes: 0 additions & 11 deletions AnimTest.gd

This file was deleted.

11 changes: 0 additions & 11 deletions AnimTest.tscn

This file was deleted.

4 changes: 4 additions & 0 deletions BagPanel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends WinPanel

@onready var grid_container = %GridContainer

1 change: 1 addition & 0 deletions CharPanel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extends WinPanel
1 change: 1 addition & 0 deletions GridContainer.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extends GridContainer
33 changes: 33 additions & 0 deletions GridPanel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
extends Control

@onready var panel = $Panel
@onready var grid = $Panel/GridContainer

var panel_width
var grid_width
var column_count

func _ready():
panel_width = panel
panel_width = panel.size.x
grid_width = grid.size.x
column_count = grid.columns

func _input_event(viewport, event, shape_idx):
if event is InputEventMouseButton and event.button_index == event.BUTTON_LEFT:
var drag_start = event.position
var drag_end
var drag_vec
var new_width
var new_column_count

if event.pressed:
drag_start = event.position

else:
drag_end = event.position
drag_vec = drag_end - drag_start
new_width = drag_vec.x + panel_width
new_column_count = int(new_width / grid_width)
panel.rect_size.x = new_width
grid.columns = new_column_count
40 changes: 40 additions & 0 deletions ItemPanel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
extends WinPanel

@export var item : Item
@onready var alias = %"Alias"
@onready var texture = %"Texture"
@onready var desc = %"Desc"
@onready var type = %"Type"
@onready var atts = %"Atts"
@onready var spe = %"Spe"
@onready var skill = %"Skill"
@onready var Req = %"Req"
@onready var lv = %"Lv"


func _ready():
# alias.text = item.alias
# alias.self_modulate = item.color
# texture.texture = item.texture
# desc.append_text(item.desc)
# type.text = item.type
# _read_atts(item.atts)
# _read_spe(item.spe)
# _read_skill(item.skill)
# _read_req(item.req)
pass

func _read_atts(_atts:Dictionary):
pass

func _read_spe(spe:Dictionary):
pass

func _read_skill(skill:Dictionary):
pass

func _read_req(req:Dictionary):
pass

func _read_lv(_lv:int):
pass
3 changes: 3 additions & 0 deletions LocationMessagePanel.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends WinPanel

@export var location:Location
5 changes: 0 additions & 5 deletions Main.gd

This file was deleted.

Loading

0 comments on commit 9e55380

Please sign in to comment.