From 71c17ed385c57f3594f65d00049ffb769f685182 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 1 Jun 2020 13:09:11 +0200 Subject: [PATCH] Fixed dialogue options --- gamemode/engine/derma/menus/menu_dialogue.lua | 3 +++ gamemode/settings/sh_dialogues.lua | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gamemode/engine/derma/menus/menu_dialogue.lua b/gamemode/engine/derma/menus/menu_dialogue.lua index 0521313..a56c8e2 100644 --- a/gamemode/engine/derma/menus/menu_dialogue.lua +++ b/gamemode/engine/derma/menus/menu_dialogue.lua @@ -100,6 +100,9 @@ function menu.open( dt ) f.dialogue.cont.options[i] = log.createOptionButton( f.dialogue.contScroll, i, option.text, btnFont ) f.dialogue.cont.options[i]:UpdateSize(padding_s) end + -- add the goodbye button + f.dialogue.cont.options.bye = log.createOptionButton( f.dialogue.contScroll, #f.dialogue.cont.options + 1, dialogue.bye, btnFont ) + f.dialogue.cont.options.bye:UpdateSize(padding_s) f.dialogue.cont:SetPos( f.w/2 - f.dialogue.cont.w/2, f.h - f.dialogue.cont.h - padding ) f.dialogue.cont.x, f.dialogue.cont.y = f.dialogue.cont:GetPos() diff --git a/gamemode/settings/sh_dialogues.lua b/gamemode/settings/sh_dialogues.lua index 453de02..9480c6b 100644 --- a/gamemode/settings/sh_dialogues.lua +++ b/gamemode/settings/sh_dialogues.lua @@ -18,11 +18,6 @@ Quantum.Dialogue.Create( "npc_generalvendor" ) print("You pressed this response!") end }, 1 ) - - Quantum.Dialogue.AddResponse( "npc_generalvendor", "init", { - text = "To take all of your money! Aaaaa aaaa a aa a a a aa aa a aa a a a aa aa a a a a aaaaaaaaaaaaaaaaa a a a a aa a a a a aa a aa a aa a a a aaaa a a aa a aa aa aa!" - - }, 2 ) Quantum.Dialogue.AddQuestion( "npc_generalvendor", "sellorbuy", "What do you have in mind?" )