Small fix for icon not updating on selection

This commit is contained in:
Lachrymogenic 2022-09-19 13:10:04 +01:00
parent 717f3b2550
commit 1ff58dcf74
2 changed files with 19 additions and 3 deletions

13
README.md Normal file
View File

@ -0,0 +1,13 @@
# NovetusFE
A frontend application for Novetus, by https://bitl.itch.io
# Features / planned
- Multiplayer Server List
- Workshop (one click installer for mods, places, etc)
- Customization
- Different language options (perhaps)
- Realtime Character Customization
- All the usual stuff
# Installation
Place the NovetusFE binary inside of your Novetus Install Directory

View File

@ -318,7 +318,7 @@ func imageadd(path):
t.texture_normal = pathtoimage(path,[56,56])
$Main/AddServerWindow/ScrollContainer/HBoxContainer.add_child(t)
NewServerTexture = t.texture_normal
t.connect("pressed",self,"icon_pressed",[t.texture_normal,t])
t.connect("pressed",self,"icon_pressed",[t.texture_normal,t,path])
func pathtoimage(path,resize=null):
var img = Image.new()
@ -332,13 +332,16 @@ func pathtoimage(path,resize=null):
img_tex.create_from_image(img)
return img_tex
func icon_pressed(icon,node):
NewServerTexture = icon
func icon_pressed(icon,node,path):
for i in $Main/AddServerWindow/ScrollContainer/HBoxContainer.get_children():
if i is TextureButton:
i.modulate = Color("707070")
node.modulate = Color("ffffff")
NewServerTexture = icon
NewServerTexturePath = path
print("pressed")
print(NewServerTexture)
print(icon)
func AddServer_Close_pressed():
$Main/AddServerWindow.visible = false