Skip to content

Commit d7a50ce

Browse files
Add files via upload
MiniWeather V0.1.6 *Update : Small updates. Added a numerical indicator to the Weather Alerts page, and some small formatting changes.
1 parent 6d04839 commit d7a50ce

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

Main.gd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ var AlertCount
2727
func _ready():
2828
print("Program Starting")
2929
$GUI/AlertDisplay.visible = false
30+
$GUI/Forecasts.visible = true
31+
$GUI/Forecasts/Window/NowCast/Alert.visible = false
3032
findLocation()
3133

3234
func findLocation():
@@ -117,6 +119,9 @@ func _on_AlertRequest_request_completed(result, response_code, headers, body):
117119
AlertHandler()
118120

119121
func AlertHandler():
122+
var AlertNumberUpdate
123+
var WA = " Weather Alerts"
124+
var WAS = " Weather Alert"
120125
print("Alerts:")
121126
if Alerts == []:
122127
print("No Alerts")
@@ -125,9 +130,14 @@ func AlertHandler():
125130
$GUI/Forecasts/Window/NowCast/Alert.visible = true
126131
print("ALERT!")
127132
AlertCount = Alerts.size()
128-
#AlertCount = 3 #Testing.
133+
#AlertCount = 1 #Testing.
129134
print("Alert Count:")
130135
print(AlertCount)
136+
AlertNumberUpdate = get_tree().get_root().get_node("Main/GUI/AlertDisplay/Body/Header")
137+
if AlertCount == 1:
138+
AlertNumberUpdate.text = str(AlertCount,WAS)
139+
else:
140+
AlertNumberUpdate.text = str(AlertCount,WA)
131141
alertProcessing()
132142

133143
func alertProcessing():

Main.tscn

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ autowrap = true
133133
visible = false
134134
margin_top = 128.0
135135
margin_right = 200.0
136-
margin_bottom = 148.0
136+
margin_bottom = 178.0
137+
rect_min_size = Vector2( 0, 50 )
137138
text = "Weather Alert"
138139

139140
[node name="HSeparator2" type="HSeparator" parent="GUI/Forecasts/Window"]
@@ -1208,7 +1209,7 @@ margin_bottom = 36.0
12081209
[node name="AlertScroll" type="ScrollContainer" parent="GUI/AlertDisplay/Body"]
12091210
margin_top = 40.0
12101211
margin_right = 722.0
1211-
margin_bottom = 960.0
1212+
margin_bottom = 966.0
12121213
rect_min_size = Vector2( 0, 920 )
12131214
size_flags_vertical = 3
12141215
scroll_horizontal_enabled = false
@@ -1221,10 +1222,10 @@ size_flags_horizontal = 3
12211222
size_flags_vertical = 3
12221223

12231224
[node name="ForecastReturn" type="Button" parent="GUI/AlertDisplay/Body"]
1224-
margin_top = 964.0
1225+
margin_top = 970.0
12251226
margin_right = 722.0
1226-
margin_bottom = 998.0
1227-
rect_min_size = Vector2( 0, 20 )
1227+
margin_bottom = 1020.0
1228+
rect_min_size = Vector2( 0, 50 )
12281229
custom_fonts/font = ExtResource( 2 )
12291230
text = "Close"
12301231

export_presets.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ custom_features=""
77
export_filter="all_resources"
88
include_filter=""
99
exclude_filter=""
10-
export_path="../../DevTools/Exports/Android/MiniWeather/MiniWeatherV0.1.5.apk"
10+
export_path="../../DevTools/Exports/Android/MiniWeather/MiniWeatherV0.1.6.apk"
1111
script_export_mode=1
1212
script_encryption_key=""
1313

0 commit comments

Comments
 (0)