From 2fe83aded9d2c777f370cb8dd7fee9a53c865cdf Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 8 Oct 2010 22:47:42 +0000
Subject: [PATCH] Inventory/equipment/store dialogs will hav a minimun size of
 800x600

git-svn-id: http://svn.net-core.org/repos/t-engine4@1484 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/engines/default/engine/dialogs/ShowEquipInven.lua  | 2 +-
 game/engines/default/engine/dialogs/ShowEquipment.lua   | 2 +-
 game/engines/default/engine/dialogs/ShowInventory.lua   | 2 +-
 game/engines/default/engine/dialogs/ShowPickupFloor.lua | 2 +-
 game/engines/default/engine/dialogs/ShowStore.lua       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/game/engines/default/engine/dialogs/ShowEquipInven.lua b/game/engines/default/engine/dialogs/ShowEquipInven.lua
index 1cd6ad3d3e..64f8374b6c 100644
--- a/game/engines/default/engine/dialogs/ShowEquipInven.lua
+++ b/game/engines/default/engine/dialogs/ShowEquipInven.lua
@@ -31,7 +31,7 @@ function _M:init(title, actor, filter, action)
 	self.filter = filter
 	self.actor = actor
 
-	Dialog.init(self, title or "Inventory", game.w * 0.8, game.h * 0.8)
+	Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8))
 
 	self:maxH()
 
diff --git a/game/engines/default/engine/dialogs/ShowEquipment.lua b/game/engines/default/engine/dialogs/ShowEquipment.lua
index 56bd4d28da..cbea8ed08f 100644
--- a/game/engines/default/engine/dialogs/ShowEquipment.lua
+++ b/game/engines/default/engine/dialogs/ShowEquipment.lua
@@ -30,7 +30,7 @@ function _M:init(title, actor, filter, action)
 	self.actor = actor
 	self.filter = filter
 	self.action = action
-	Dialog.init(self, title or "Equipment", game.w * 0.8, game.h * 0.8)
+	Dialog.init(self, title or "Equipment", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8))
 
 	self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih, no_color_bleed=true}
 
diff --git a/game/engines/default/engine/dialogs/ShowInventory.lua b/game/engines/default/engine/dialogs/ShowInventory.lua
index 88180a54ac..972e397b29 100644
--- a/game/engines/default/engine/dialogs/ShowInventory.lua
+++ b/game/engines/default/engine/dialogs/ShowInventory.lua
@@ -31,7 +31,7 @@ function _M:init(title, inven, filter, action, actor)
 	self.filter = filter
 	self.action = action
 	self.actor = actor
-	Dialog.init(self, title or "Inventory", game.w * 0.8, game.h * 0.8)
+	Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8))
 
 	self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih, no_color_bleed=true}
 
diff --git a/game/engines/default/engine/dialogs/ShowPickupFloor.lua b/game/engines/default/engine/dialogs/ShowPickupFloor.lua
index af3739df79..426447929f 100644
--- a/game/engines/default/engine/dialogs/ShowPickupFloor.lua
+++ b/game/engines/default/engine/dialogs/ShowPickupFloor.lua
@@ -31,7 +31,7 @@ function _M:init(title, x, y, filter, action)
 	self.x, self.y = x, y
 	self.filter = filter
 	self.action = action
-	Dialog.init(self, title or "Pickup", game.w * 0.8, game.h * 0.8)
+	Dialog.init(self, title or "Pickup", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8))
 
 	local takeall = Button.new{text="(*) Take all", width=self.iw - 40, fct=function() self:takeAll() end}
 
diff --git a/game/engines/default/engine/dialogs/ShowStore.lua b/game/engines/default/engine/dialogs/ShowStore.lua
index 4a3188c650..ff6839f628 100644
--- a/game/engines/default/engine/dialogs/ShowStore.lua
+++ b/game/engines/default/engine/dialogs/ShowStore.lua
@@ -34,7 +34,7 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac
 	self.actor_inven = actor_inven
 	self.store_filter = store_filter
 	self.actor_filter = actor_filter
-	Dialog.init(self, title or "Store", game.w * 0.8, game.h * 0.8)
+	Dialog.init(self, title or "Store", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8))
 
 	self:maxH()
 
-- 
GitLab