From 33d3f11ef2e513b93c9790b4942b4a3a14a053d9 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Tue, 5 May 2020 11:46:45 -0400 Subject: [PATCH] Add discord invite as text box for easy copy paste. --- example-config.lua | 3 ++- lib/game_opts.lua | 3 +++ lib/oarc_gui_tabs.lua | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/example-config.lua b/example-config.lua index 613fb96..f505c01 100644 --- a/example-config.lua +++ b/example-config.lua @@ -22,7 +22,8 @@ SCENARIO_INFO_MSG = "Latest updates in this scenario version:\n".. "You can be on the main team or your own. All teams are friendly.\n".. "If you leave in the first 15 minutes, your base and character will be deleted!" -CONTACT_MSG = "Contact: SteamID:Oarc | oarcinae@gmail.com | discord.gg/trnpcen" +CONTACT_MSG = "Contact: SteamID:Oarc | oarcinae@gmail.com | Discord:Oarc#8695" +DISCORD_INV = "discord.gg/trnpcen" -------------------------------------------------------------------------------- -- Module Enables diff --git a/lib/game_opts.lua b/lib/game_opts.lua index 0d4b270..86645bf 100644 --- a/lib/game_opts.lua +++ b/lib/game_opts.lua @@ -52,6 +52,9 @@ function CreateGameOptionsTab(tab_container, player) AddLabel(tab_container, "info_1", global.ocfg.welcome_msg, my_longer_label_style) AddLabel(tab_container, "info_2", global.ocfg.server_rules, my_longer_label_style) AddLabel(tab_container, "info_3", global.ocfg.server_contact, my_longer_label_style) + tab_container.add{type="textfield", + tooltip="Come join the discord (copy this invite)!", + text=DISCORD_INV} AddSpacerLine(tab_container) -- Enemy Settings: diff --git a/lib/oarc_gui_tabs.lua b/lib/oarc_gui_tabs.lua index 31dc880..65d5b1d 100644 --- a/lib/oarc_gui_tabs.lua +++ b/lib/oarc_gui_tabs.lua @@ -191,8 +191,7 @@ end -- Function creates a new tab. -- It adds whatever it wants to the provided scroll-pane. --- content_function takes a content holder GUI and player -function AddOarcGuiTab(player, tab_name, content_function) +function AddOarcGuiTab(player, tab_name) if (not DoesOarcGuiExist(player)) then CreateOarcGuiTabsPane(player) end