poprawki w nazewnictwie
This commit is contained in:
parent
f86feb424a
commit
c3c9bc3e3b
3 changed files with 54 additions and 47 deletions
5
README.md
Normal file
5
README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Adventure in Warsaw
|
||||
|
||||
Przygodówka napisana w silniku Godot. Dużą inspiracją do stworzenia tej gry
|
||||
przyczynił się [Snatcher](https://en.wikipedia.org/wiki/Snatcher_(video_game)
|
||||
autorstwa Hideo Kojimy.
|
||||
|
|
@ -4,77 +4,79 @@ extends Control
|
|||
@onready var MONITOR_CENTER = $BG/MarginContainer/ROWS/MONITOR/CENTER/TextureRect
|
||||
@onready var MENU = $BG/MarginContainer/ROWS/HBoxContainer/MENU_LIST
|
||||
|
||||
var B_MOVE: Button = Button.new()
|
||||
var B_LOOK: Button = Button.new()
|
||||
var B_ASK: Button = Button.new()
|
||||
var B_TALK: Button = Button.new()
|
||||
var B_INVESTIGATE: Button = Button.new()
|
||||
var b_move: Button = Button.new()
|
||||
var b_look: Button = Button.new()
|
||||
var b_ask: Button = Button.new()
|
||||
var b_talk: Button = Button.new()
|
||||
var b_investigate: Button = Button.new()
|
||||
|
||||
var SBF_Normal: StyleBoxFlat = StyleBoxFlat.new()
|
||||
var SBF_Focus: StyleBoxFlat = StyleBoxFlat.new()
|
||||
var sbf_Normal: StyleBoxFlat = StyleBoxFlat.new()
|
||||
var sbf_Focus: StyleBoxFlat = StyleBoxFlat.new()
|
||||
|
||||
var f_modeseven = load("res://media/fonts/modeseven.ttf")
|
||||
|
||||
const C_NORMAL: Color = Color(0.0, 0.0, 0.0)
|
||||
const C_FOCUS: Color = Color(0.12, 0.191, 0.201)
|
||||
|
||||
var menu_list: Array[Button] = [B_MOVE, B_LOOK, B_ASK, B_TALK, B_INVESTIGATE]
|
||||
var menu_list: Array[Button] = [b_move, b_look, b_ask, b_talk, b_investigate]
|
||||
|
||||
func _ready() -> void:
|
||||
button_init()
|
||||
B_MOVE.grab_focus()
|
||||
b_move.grab_focus()
|
||||
b_move.pressed.connect(_b_move_pressed)
|
||||
|
||||
func _on_move_pressed() -> void:
|
||||
var imported_test = load("res://media/img/test.png")
|
||||
MONITOR_CENTER.texture = imported_test
|
||||
|
||||
|
||||
func _b_move_pressed() -> void:
|
||||
var image = load("res://media/img/test.png")
|
||||
MONITOR_CENTER.texture = image
|
||||
|
||||
|
||||
func button_init() -> void:
|
||||
# BUTTON COLORS
|
||||
# # NORMAL
|
||||
SBF_Normal.set_content_margin_all(2)
|
||||
SBF_Normal.bg_color = C_NORMAL
|
||||
sbf_Normal.set_content_margin_all(2)
|
||||
sbf_Normal.bg_color = C_NORMAL
|
||||
|
||||
# # FOCUS
|
||||
SBF_Focus.set_content_margin_all(2)
|
||||
SBF_Focus.bg_color = C_FOCUS
|
||||
sbf_Focus.set_content_margin_all(2)
|
||||
sbf_Focus.bg_color = C_FOCUS
|
||||
|
||||
# Button properties
|
||||
# # B_MOVE
|
||||
B_MOVE.text = "MOVE"
|
||||
B_MOVE.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
B_MOVE.add_theme_font_override("font", f_modeseven)
|
||||
B_MOVE.add_theme_stylebox_override("normal", SBF_Normal)
|
||||
B_MOVE.add_theme_stylebox_override("focus", SBF_Focus)
|
||||
# # b_move
|
||||
b_move.text = "MOVE"
|
||||
b_move.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
b_move.add_theme_font_override("font", f_modeseven)
|
||||
b_move.add_theme_stylebox_override("normal", sbf_Normal)
|
||||
b_move.add_theme_stylebox_override("focus", sbf_Focus)
|
||||
|
||||
# # B_LOOK
|
||||
B_LOOK.text = "LOOK"
|
||||
B_LOOK.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
B_LOOK.add_theme_font_override("font", f_modeseven)
|
||||
B_LOOK.add_theme_stylebox_override("normal", SBF_Normal)
|
||||
B_LOOK.add_theme_stylebox_override("focus", SBF_Focus)
|
||||
# # b_look
|
||||
b_look.text = "LOOK"
|
||||
b_look.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
b_look.add_theme_font_override("font", f_modeseven)
|
||||
b_look.add_theme_stylebox_override("normal", sbf_Normal)
|
||||
b_look.add_theme_stylebox_override("focus", sbf_Focus)
|
||||
|
||||
# # B_ASK
|
||||
B_ASK.text = "ASK"
|
||||
B_ASK.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
B_ASK.add_theme_font_override("font", f_modeseven)
|
||||
B_ASK.add_theme_stylebox_override("normal", SBF_Normal)
|
||||
B_ASK.add_theme_stylebox_override("focus", SBF_Focus)
|
||||
# # b_ask
|
||||
b_ask.text = "ASK"
|
||||
b_ask.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
b_ask.add_theme_font_override("font", f_modeseven)
|
||||
b_ask.add_theme_stylebox_override("normal", sbf_Normal)
|
||||
b_ask.add_theme_stylebox_override("focus", sbf_Focus)
|
||||
|
||||
# # B_TALK
|
||||
B_TALK.text = "TALK"
|
||||
B_TALK.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
B_TALK.add_theme_font_override("font", f_modeseven)
|
||||
B_TALK.add_theme_stylebox_override("normal", SBF_Normal)
|
||||
B_TALK.add_theme_stylebox_override("focus", SBF_Focus)
|
||||
# # b_talk
|
||||
b_talk.text = "TALK"
|
||||
b_talk.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
b_talk.add_theme_font_override("font", f_modeseven)
|
||||
b_talk.add_theme_stylebox_override("normal", sbf_Normal)
|
||||
b_talk.add_theme_stylebox_override("focus", sbf_Focus)
|
||||
|
||||
|
||||
# # B_INVESTIGATE
|
||||
B_INVESTIGATE.text = "INVESTIGATE"
|
||||
B_INVESTIGATE.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
B_INVESTIGATE.add_theme_font_override("font", f_modeseven)
|
||||
B_INVESTIGATE.add_theme_stylebox_override("normal", SBF_Normal)
|
||||
B_INVESTIGATE.add_theme_stylebox_override("focus", SBF_Focus)
|
||||
# # b_investigate
|
||||
b_investigate.text = "INVESTIGATE"
|
||||
b_investigate.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
b_investigate.add_theme_font_override("font", f_modeseven)
|
||||
b_investigate.add_theme_stylebox_override("normal", sbf_Normal)
|
||||
b_investigate.add_theme_stylebox_override("focus", sbf_Focus)
|
||||
|
||||
for entry in menu_list:
|
||||
MENU.add_child(entry)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue