mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Added some changes.
This commit is contained in:
parent
3a4ca5fdcd
commit
ab2d1a8840
@ -1,12 +1,19 @@
|
||||
extends Control
|
||||
|
||||
|
||||
# https://stackoverflow.com/a/65774028
|
||||
# Be Sure to make these Vars as OnReadys; you can read up on it here.
|
||||
|
||||
# Items to Fill the dropdown Lists
|
||||
onready var keyboardContents = ["Qwerty", "Dvorak", "Alphabetical"]
|
||||
|
||||
onready var themeContents = ["White and Black", "Black and White"]
|
||||
onready var themeContents = ["White on Black", "Black on White"]
|
||||
|
||||
|
||||
onready var saveObject = get_node('/root/GlobalSaveInstance')
|
||||
|
||||
|
||||
# Vars For UI Widgets
|
||||
onready var NameVar = get_node('Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/DisplayNameLineEdit')
|
||||
|
||||
onready var NRiskVar = get_node('Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/VBoxRiskFactor/RiskSlider')
|
||||
@ -32,9 +39,9 @@ onready var themeChoiceList = get_node('Panel/HBoxContainer/RootVboxVisualContro
|
||||
|
||||
# Imports related to error handling and popups for said errors
|
||||
|
||||
#onready var errorPopup = get_node("Panel/HBoxErrorSignRow/Popup")
|
||||
#
|
||||
#onready var errorLabel = get_node("Panel/HBoxErrorSignRow/Popup/ErrorLabel")
|
||||
onready var errorPopup = get_node("Panel/HBoxErrorRow/CenterContainer/ErrorPopup")
|
||||
|
||||
onready var errorLabel = get_node("Panel/HBoxErrorRow/CenterContainer/ErrorPopup/ErrorLabel")
|
||||
|
||||
var iniFile = ConfigFile.new()
|
||||
|
||||
@ -88,9 +95,11 @@ func _process(delta):
|
||||
if saveButton.pressed == true:
|
||||
if NameVar.text == "":
|
||||
print("Please input a name")
|
||||
#errorLabel.text = "Please input a name!"
|
||||
#errorPopup.popup()
|
||||
else:
|
||||
errorLabel.text = str("Please Input A Name")
|
||||
errorPopup.popup()
|
||||
|
||||
|
||||
if NameVar.text != "":
|
||||
# Save to the template instance
|
||||
saveToInstance()
|
||||
|
||||
@ -100,11 +109,14 @@ func _process(delta):
|
||||
func _ready():
|
||||
theme=load("res://assets/ui_controlNode_light_theme.tres")
|
||||
|
||||
# Init Keyboard Layout List
|
||||
for i in range(3):
|
||||
keyboardLayoutList.add_item(keyboardContents[i],null,true)
|
||||
|
||||
keyboardLayoutList.select(0,true)
|
||||
|
||||
# Init Theme Choice List
|
||||
|
||||
for i in range(2):
|
||||
themeChoiceList.add_item(themeContents[i],null,true)
|
||||
|
||||
|
@ -280,24 +280,33 @@ anchor_right = 0.5
|
||||
margin_left = -48.5
|
||||
margin_top = 200.0
|
||||
margin_right = 48.5
|
||||
margin_bottom = 25.0
|
||||
margin_bottom = 225.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="SaveButton" type="Button" parent="Panel/HBoxBottomRow"]
|
||||
margin_right = 97.0
|
||||
margin_bottom = 25.0
|
||||
text = "Save Settings"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxErrorRow" type="HBoxContainer" parent="Panel"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -20.0
|
||||
margin_top = -100.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = -100.0
|
||||
alignment = 1
|
||||
|
||||
[node name="ErrorPopup" type="Popup" parent="Panel/HBoxErrorRow"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Panel/HBoxErrorRow"]
|
||||
margin_left = 20.0
|
||||
margin_right = 20.0
|
||||
|
||||
[node name="ErrorLabel" type="Label" parent="Panel/HBoxErrorRow/ErrorPopup"]
|
||||
[node name="ErrorPopup" type="Popup" parent="Panel/HBoxErrorRow/CenterContainer"]
|
||||
|
||||
[node name="ErrorLabel" type="Label" parent="Panel/HBoxErrorRow/CenterContainer/ErrorPopup"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 19.0
|
||||
|
@ -0,0 +1,4 @@
|
||||
[gd_resource type="StyleBoxFlat" format=2]
|
||||
|
||||
[resource]
|
||||
bg_color = Color( 1, 1, 1, 0.0705882 )
|
@ -0,0 +1,4 @@
|
||||
[gd_resource type="StyleBoxFlat" format=2]
|
||||
|
||||
[resource]
|
||||
bg_color = Color( 0, 0, 0, 0 )
|
@ -1,7 +1,7 @@
|
||||
[gd_resource type="StyleBoxFlat" format=2]
|
||||
|
||||
[resource]
|
||||
bg_color = Color( 0, 0, 0, 1 )
|
||||
bg_color = Color( 0, 0, 0, 0.901961 )
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,22 +1,30 @@
|
||||
[gd_resource type="Theme" load_steps=5 format=2]
|
||||
[gd_resource type="Theme" load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://assets/sbf_white.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://assets/liberation_serif_20pt.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://assets/liberation_serif.tres" type="DynamicFont" id=4]
|
||||
[ext_resource path="res://assets/darktheme_opacity.tres" type="StyleBox" id=5]
|
||||
[ext_resource path="res://assets/lighttheme_opacity.tres" type="StyleBox" id=6]
|
||||
|
||||
[resource]
|
||||
Button/colors/font_color = Color( 0, 0, 0, 1 )
|
||||
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
|
||||
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
|
||||
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
|
||||
Button/colors/font_color_focus = Color( 0, 0, 0, 0.666667 )
|
||||
Button/colors/font_color_hover = Color( 0, 0, 0, 0.666667 )
|
||||
Button/colors/font_color_pressed = Color( 0, 0, 0, 0.666667 )
|
||||
Button/constants/hseparation = 2
|
||||
Button/fonts/font = ExtResource( 2 )
|
||||
Button/styles/disabled = null
|
||||
Button/styles/disabled = ExtResource( 6 )
|
||||
Button/styles/focus = null
|
||||
Button/styles/hover = null
|
||||
Button/styles/normal = ExtResource( 1 )
|
||||
Button/styles/pressed = ExtResource( 1 )
|
||||
Button/styles/normal = ExtResource( 6 )
|
||||
Button/styles/pressed = ExtResource( 6 )
|
||||
CheckBox/styles/disabled = ExtResource( 5 )
|
||||
CheckBox/styles/normal = ExtResource( 5 )
|
||||
HSlider/styles/grabber_area = ExtResource( 6 )
|
||||
HSlider/styles/grabber_area_highlight = ExtResource( 6 )
|
||||
HSlider/styles/slider = ExtResource( 6 )
|
||||
ItemList/colors/font_color = Color( 0, 0, 0, 1 )
|
||||
ItemList/colors/font_color_selected = Color( 0.227451, 0.227451, 0.227451, 1 )
|
||||
ItemList/colors/guide_color = Color( 0.235294, 0.231373, 0.231373, 0.847059 )
|
||||
@ -25,7 +33,7 @@ ItemList/constants/icon_margin = 4
|
||||
ItemList/constants/line_separation = 2
|
||||
ItemList/constants/vseparation = 2
|
||||
ItemList/fonts/font = null
|
||||
ItemList/styles/bg = ExtResource( 1 )
|
||||
ItemList/styles/bg = ExtResource( 5 )
|
||||
ItemList/styles/bg_focus = ExtResource( 1 )
|
||||
ItemList/styles/cursor = ExtResource( 1 )
|
||||
ItemList/styles/cursor_unfocused = ExtResource( 1 )
|
||||
|
Loading…
Reference in New Issue
Block a user