Skip to content

Commit

Permalink
switch all to RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Jul 23, 2021
1 parent 7b3a7a3 commit efa8395
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.13 (Ongoing)

## Tweaks

* Right click in the Card Viewer filter buttons, will not press that button and unpress all the others
* Can now filter also on properties not mention in CardConfig
* Added button which presses all filter buttons.

## 1.12

### Important for Upgrades
Expand All @@ -11,12 +19,12 @@

### New Features

* Added support for Rich Text Labels on card fronts and info panels
* **Created a Card Library framework**. Refactored Deckbuilder to inherit from new class `CardViewer`. new CardLibrary inherits from the same class.
* **Added support for Rich Text Labels** on card fronts and info panels
* Made CardContainers capable of being aligned using control nodes. To do so, you need to set their placement as "CONTROL" and then place them in a dedicated control node which you can make a part of your table layout.
* If piles are scaled, cards will now appear to scale up/down as they move into/out of them.
* Sample board using a Control-node based layout can be seen in `CGFBoardControlLayout.tscn`
* Added way to see the contents of a pile sorted. And new demo button for it labeled "VS"
* Created the Card Library framework. Refactored Deckbuilder to inherit from new class CardViewer. CardLibrary inherits from the same class.

## 1.11

Expand Down
11 changes: 8 additions & 3 deletions src/core/CardViewer/CardLibrary/CardLibrary.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ func populate_available_cards() -> void:
# and the SCENE_PROPERTY is preset
if not property.begins_with('_')\
and property != CardConfig.SCENE_PROPERTY:
var new_label := Label.new()
new_label.name = property
new_label.text = property
var new_label := RichTextLabel.new()
if property_width_exceptions.has(property):
new_label.rect_min_size.x = property_width_exceptions[property]
else:
new_label.rect_min_size.x = default_property_width
new_label.rect_min_size.y = 20
new_label.name = property
new_label.bbcode_text = property
new_label.bbcode_enabled = true
new_label.scroll_active = false
new_label.fit_content_height = false

_card_headers.add_child(new_label)
16 changes: 8 additions & 8 deletions src/core/CardViewer/CardViewer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,29 @@ expand_icon = true
[node name="CardListHeaders" type="HBoxContainer" parent="VBC/HBC/MC/AvailableCards"]
margin_top = 62.0
margin_right = 1270.0
margin_bottom = 76.0
margin_bottom = 62.0

[node name="Name" type="Label" parent="VBC/HBC/MC/AvailableCards/CardListHeaders"]
[node name="Name" type="RichTextLabel" parent="VBC/HBC/MC/AvailableCards/CardListHeaders"]
margin_right = 1166.0
margin_bottom = 14.0
size_flags_horizontal = 3
text = "Name"
scroll_active = false

[node name="Type" type="Label" parent="VBC/HBC/MC/AvailableCards/CardListHeaders"]
[node name="Type" type="RichTextLabel" parent="VBC/HBC/MC/AvailableCards/CardListHeaders"]
margin_left = 1170.0
margin_right = 1270.0
margin_bottom = 14.0
rect_min_size = Vector2( 100, 0 )
text = "Type"
scroll_active = false

[node name="LineSeparator" type="Panel" parent="VBC/HBC/MC/AvailableCards"]
margin_top = 80.0
margin_top = 66.0
margin_right = 1270.0
margin_bottom = 80.0
margin_bottom = 66.0
custom_styles/panel = SubResource( 2 )

[node name="ScrollContainer" type="ScrollContainer" parent="VBC/HBC/MC/AvailableCards"]
margin_top = 84.0
margin_top = 70.0
margin_right = 1270.0
margin_bottom = 653.0
size_flags_horizontal = 3
Expand Down
2 changes: 1 addition & 1 deletion src/custom/CGFDeckbuilder/CGFCardLibrary.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends CardLibrary

onready var back_button := $VBC/HBC/MC/AvailableCards/Settings/Back
var abilities_header : Label
var abilities_header : RichTextLabel

func _ready() -> void:
# warning-ignore:return_value_discarded
Expand Down
4 changes: 2 additions & 2 deletions src/custom/CGFDeckbuilder/CGFCardLibrary.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
script = ExtResource( 2 )
info_panel_scene = ExtResource( 3 )
list_card_object_scene = ExtResource( 4 )
default_property_width = 100
default_property_width = 120
property_width_exceptions = {
"Cost": 30,
"Power": 50
"Power": 30
}

[node name="MC" parent="VBC/HBC" index="0"]
Expand Down

0 comments on commit efa8395

Please sign in to comment.