|
|
|
@ -11,6 +11,9 @@ const MeritProfileScene = preload("res://addons/majority_judgment/nodes/Majority
|
|
|
|
|
export(Resource) var poll setget set_poll, get_poll
|
|
|
|
|
|
|
|
|
|
export(int) var vertical_gap := 4 # pixels
|
|
|
|
|
export(int) var candidates_labels_width := 200 # pixels
|
|
|
|
|
|
|
|
|
|
onready var ProfilesContainer = find_node("ProfilesContainer", true)
|
|
|
|
|
|
|
|
|
|
var provider:MajorityJudgmentAbstractJudgmentsProvider
|
|
|
|
|
|
|
|
|
@ -43,7 +46,7 @@ func craft_nodes():
|
|
|
|
|
var height = profile.compute_height()
|
|
|
|
|
profile.rect_min_size = Vector2(400, height)
|
|
|
|
|
|
|
|
|
|
var container = $CenterContainer/ProfilesContainer
|
|
|
|
|
var container = self.ProfilesContainer
|
|
|
|
|
|
|
|
|
|
var wrapper = HBoxContainer.new()
|
|
|
|
|
wrapper.name = "Candidate%sLine" % char(candidate_index+65)
|
|
|
|
@ -62,7 +65,10 @@ func craft_nodes():
|
|
|
|
|
candidate_label.text = candidate.get_name()
|
|
|
|
|
candidate_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
|
|
|
|
# candidate_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
|
|
|
|
candidate_label.rect_min_size = Vector2(70, height)
|
|
|
|
|
candidate_label.rect_min_size = Vector2(candidates_labels_width, height)
|
|
|
|
|
candidate_label.rect_size = Vector2(candidates_labels_width, height)
|
|
|
|
|
candidate_label.clip_text = true
|
|
|
|
|
candidate_label.autowrap = true
|
|
|
|
|
candidate_label.valign = Label.VALIGN_CENTER
|
|
|
|
|
candidate_label.align = Label.ALIGN_RIGHT
|
|
|
|
|
wrapper.add_child(candidate_label)
|
|
|
|
|