Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
nath54 committed Oct 30, 2022
1 parent 543e460 commit cada742
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pages/sheets/Sheet_Element_Row_Ref.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ var text2: String = "";

# Called when the node enters the scene tree for the first time.
func _ready():
$C1/RenderText.set_text(text1);
$C2/RenderText2.set_text(text2);
pass

func aff():
if not Global.active_object["multi_active"]:
$C1/RenderText.set_text(text1);
$C2/RenderText2.set_text(text2);
else:
pass


func set_val(t1: String, t2: String):
# print("SET VAL : ", t1, " ", t2);
Expand Down
14 changes: 14 additions & 0 deletions pages/sheets/create_sheet.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ func _ready():
Global.active_object["dim_active"] = false;
Global.active_object["dim_last"] = tdarr;
Global.active_object["dim_vit"] = 0.25;
if not "multi_active" in Global.active_object.keys():
Global.active_object["multi_active"] = false;
save_dt();
#
$VBoxContainer/Cb_diminution/Cb_diminution.pressed = Global.active_object["dim_active"];
$VBoxContainer/DIMINUTION.visible = Global.active_object["dim_active"];
$VBoxContainer/DIMINUTION/LineEdit.text = String(Global.active_object["dim_vit"]);
#
$VBoxContainer/Cb_multi_pos/CheckBox.pressed = Global.active_object["multi_active"];
$VBoxContainer/SepChar.visible = Global.active_object["multi_active"];
$VBoxContainer/Titre/Title.text = Global.active_object["titre"];
$VBoxContainer/SepChar/SepChars.text = Global.active_object["sep_chars"];
$VBoxContainer/Cols/Col1/col1.text = Global.active_object["col1"];
Expand Down Expand Up @@ -54,6 +58,7 @@ func delete_row_elt(elt, roelt):
save_dt();

func _on_Bt_back_pressed():
# Diminution
if $VBoxContainer/Cb_diminution/Cb_diminution.pressed:
var today: Dictionary = OS.get_time();
var tdarr: Array = [today["year"], today["month"], today["day"]];
Expand All @@ -62,6 +67,15 @@ func _on_Bt_back_pressed():
Global.active_object["dim_vit"] = 0.25;
if Global.is_str_float($VBoxContainer/DIMINUTION/LineEdit.text):
Global.active_object["dim_vit"] = float($VBoxContainer/DIMINUTION/LineEdit.text);
else:
Global.active_object["dim_active"] = false;
#
if $VBoxContainer/Cb_multi_pos/CheckBox.pressed:
Global.active_object["multi_active"] = true;
Global.active_object["sep_chars"] = $VBoxContainer/SepChar/SepChars.text;
else:
Global.active_object["multi_active"] = false;
#
save_dt();
Global.go_to_page("res://pages/sheets/page_dossiers_sheets.tscn", false);

Expand Down
2 changes: 2 additions & 0 deletions pages/sheets/sheet_elt_list_mode2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func _on_Bt_back_pressed():
Global.active_object["dim_vit"] = 0.25;
if Global.is_str_float($VBoxContainer/DIMINUTION/LineEdit.text):
Global.active_object["dim_vit"] = float($VBoxContainer/DIMINUTION/LineEdit.text);
else:
Global.active_object["dim_active"] = false;
save_dt();
Global.go_to_page("res://pages/sheets/page_dossiers_sheets.tscn", false);

Expand Down

0 comments on commit cada742

Please sign in to comment.