Small fix for icon not updating on selection
This commit is contained in:
parent
717f3b2550
commit
1ff58dcf74
|
|
@ -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
|
||||||
|
|
@ -318,7 +318,7 @@ func imageadd(path):
|
||||||
t.texture_normal = pathtoimage(path,[56,56])
|
t.texture_normal = pathtoimage(path,[56,56])
|
||||||
$Main/AddServerWindow/ScrollContainer/HBoxContainer.add_child(t)
|
$Main/AddServerWindow/ScrollContainer/HBoxContainer.add_child(t)
|
||||||
NewServerTexture = t.texture_normal
|
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):
|
func pathtoimage(path,resize=null):
|
||||||
var img = Image.new()
|
var img = Image.new()
|
||||||
|
|
@ -332,13 +332,16 @@ func pathtoimage(path,resize=null):
|
||||||
img_tex.create_from_image(img)
|
img_tex.create_from_image(img)
|
||||||
return img_tex
|
return img_tex
|
||||||
|
|
||||||
func icon_pressed(icon,node):
|
func icon_pressed(icon,node,path):
|
||||||
NewServerTexture = icon
|
|
||||||
for i in $Main/AddServerWindow/ScrollContainer/HBoxContainer.get_children():
|
for i in $Main/AddServerWindow/ScrollContainer/HBoxContainer.get_children():
|
||||||
if i is TextureButton:
|
if i is TextureButton:
|
||||||
i.modulate = Color("707070")
|
i.modulate = Color("707070")
|
||||||
node.modulate = Color("ffffff")
|
node.modulate = Color("ffffff")
|
||||||
|
NewServerTexture = icon
|
||||||
|
NewServerTexturePath = path
|
||||||
print("pressed")
|
print("pressed")
|
||||||
|
print(NewServerTexture)
|
||||||
|
print(icon)
|
||||||
|
|
||||||
func AddServer_Close_pressed():
|
func AddServer_Close_pressed():
|
||||||
$Main/AddServerWindow.visible = false
|
$Main/AddServerWindow.visible = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue