View Full Version : ModalBox Concept
infinityscape
02-25-2010, 03:28 PM
hey guys, i thought id share this with you. it basically allows you to create modalboxes in ams, this could be useful for getting your customers focused on one particular thing in the application, the content in the background becomes dimmed out and the modal box is shown, when the box is closed the app will restore itself to its default state. if people are interested enough in this concept it will be made into a plugin for AMS the fate of this concept lays in your hands people.
Here Are Some Its Features:
Fast And Stable
Hides Plugins That Have A Primary State (Always Shown At The Top)
Has Two Themes For Dark And Light Backgrounds
Show Dialog Boxes When Dimmed
Open To Requests To Enhance ModalBox
Please Note: This Is A Concept And Was Made For Demonstation Purposes Only And Still May Contain Bugs
Hope You Like ModalBox And Let Me Know Your Views And Suggestions
Nathaniel Blackburn
LunaStudios Software Inc.
mystica
02-25-2010, 04:04 PM
This looks really cool. Any chance of getting an authorization code? And are you releasing the .apz to this, publicly?
infinityscape
02-25-2010, 04:14 PM
no need for a auth code just yet, this is simply a concept i made in just under 5 mins, and this will be a plugin and will be released for free, if you have any ideas to add to this project please let me know
mystica
02-25-2010, 04:20 PM
Oh, okay ... yeah i see you mentioned that before, lol. Look forward to seeing it added.
infinityscape
02-26-2010, 05:32 PM
ok, i am happy with releasing the beta now, its fully functioning and in a very stable state, if anyones interested please let me know :)
T3STY
02-26-2010, 08:07 PM
I am! Where can I download it ?
p.s. lunastudios.co.uk is actually down, 404 error.
JDog37
02-26-2010, 10:18 PM
I am!! Where do i go?
mystica
02-27-2010, 01:19 AM
yep, would love to see this latest. :yes
Server is down again when i worked with him i know there was a problem with the company he hosted with. seems they have messed up again.
nico210
02-27-2010, 03:32 AM
Awesome GREAT IDEA;.. I am waiting for a release
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
http://www.indigorose.com/forums/images/icons/icon10.gif
mystica
02-27-2010, 03:54 AM
Server is down again when i worked with him i know there was a problem with the company he hosted with. seems they have messed up again.
Thanks for the heads-up, sim. No problem ... these things happen.
Take your time infinityscape. Release your stuff, according to your own schedule, dude.
There ain't no rush. :cool
H3ll, Centauri for example, has recently become an immortal ... he's got all the time in the universe! :D
Sakuya
02-27-2010, 05:29 AM
infinityscape, If you need any file mirroring feel free to ask me on MSN.
Ya me also i can offer mirroring on 3 servers at lest i do have access to 4 but i don't own the 4th and i am a good girl :p
infinityscape
02-27-2010, 01:21 PM
hey sorry about the website its gone because my server failed me yet again, im really glad so many people are interested in the idea, it means so much to me guys, thanks for all the support, its nothing short of amazing and i have attached the plugin, let me know if i can help with anything or if you want me to sponsor you or anything like that, ill be more than glad to help you and ill try and get the site back online asap but means i have to start from scratch as i have lost everything.
Nathaniel Blackburn
LunaStudios Software Inc.
Sakuya
02-27-2010, 01:43 PM
hey sorry about the website its gone because my server failed me yet again, im really glad so many people are interested in the idea, it means so much to me guys, thanks for all the support, its nothing short of amazing and i have attached the plugin, let me know if i can help with anything or if you want me to sponsor you or anything like that, ill be more than glad to help you and ill try and get the site back online asap but means i have to start from scratch as i have lost everything.
Nathaniel Blackburn
LunaStudios Software Inc.
This is great. I just tried it and it all works fine, I can see myself using it in literally every project I release! Keep up the good work.
BTW: This goes great with WinApi.SetWindowTrans.
infinityscape
02-27-2010, 01:46 PM
thanks Sakuya, im really glad you like it
Great work you are doing here bud keep it up :yes
infinityscape
02-27-2010, 02:21 PM
thanks sim, you da man
infinityscape
02-27-2010, 02:55 PM
Minor Update ModalBox 1.1.0.0
fixed some bugs found in the code, nasty bugs
Input Boxes Showing Primary Status Over Modalbox
Added Dialog State Return
Added Some More Primary State Plugins To The Code
Special Thanks Goes To Shadiku For Reporting The Input Box Bug
Nathaniel Blackburn
LunaStudios Software Inc.
T3STY
02-27-2010, 03:03 PM
Beautiful!
Suggestion: Instead of hiding the whole window with a transparency effect, you may add an open/close window effect. I mean, a windows wich sizes from center (When you see photos in this forum you see a window opening; what I mean is like that). Can you add this ?
Sakuya
02-27-2010, 04:18 PM
Minor Update ModalBox 1.1.0.0
fixed some bugs found in the code, nasty bugs
Nathaniel Blackburn
LunaStudios Software Inc.
Nice, I haven't tried it yet but there's quite a lot of objects that share the same behavior as the Input (as in the z-index is higher than others.) ListBox and Web for example.
Centauri Soldier
02-27-2010, 05:12 PM
Is the word "type" used to store a variable in this plugin? I am getting errors when using it with plugins that implement the IRLua Help Functions. Any global plugin variables should be in THIS_FORMAT to prevent confusion or ambiguity with most lua or user functions.
On Right-Click line:37. Attempt to call global 'type' (a number value)
infinityscape
02-27-2010, 05:26 PM
ok Centauri Soldier, i have changed the plugins functions to block capitals now in the format you suggested, thanks for the tip :yes
Centauri Soldier
02-27-2010, 05:28 PM
No problem.
I would highly recommend using these as well. Once you get to know how to use them (which takes about two minutes) I'm sure you'll find them invaluable for your plugin projects.
--################################################## ################################################## #####
-- IRLUA PLUGIN HELPER FUNCTIONS By MicroByte (Revised by Centauri Soldier)
--################################################## ################################################## #####
_ShowErrorEventContext=true-- set this to false to disable 'EventContext' display
--################################################## ################################################## #####
-- Sets a Global error message in the runtime engine.
IRLUA_PLUGIN_SetGlobalErrorMessage = function(nCode, sMessage)
if _tblErrorMessages[nCode] then
if _ShowErrorEventContext then
local sEventContext=Debug.GetEventContext()
error("Error code "..nCode.." already in use, please use another.\r\n\r\nEventContext: "..sEventContext,2)
else
error("Error code "..nCode.." already in use, please use another.",2)
end
else
_tblErrorMessages[nCode]=sMessage
end
end
--################################################## ################################################## #####
-- Checks the number of arguments in the table nd throws a syntax error If there are Not enough.
-- This is useful For checking the number of arguments available To your aciton.
local IRLUA_PLUGIN_CheckNumArgs = function(tbArgs,nArgs)
local nCount=table.getn(tbArgs)
if nCount < nArgs then
if _ShowErrorEventContext then
local sEventContext=Debug.GetEventContext()
error(nArgs.." Arguments expected, "..nCount.." Arguments passed.\r\n\r\nEventContext: "..sEventContext,3)
else
error(nArgs.." Arguments expected, "..nCount.." Arguments passed.",3)
end
end
end
--################################################## ################################################## #####
-- Checks the value at a given argument table position To see if it is any of the specified types.
-- If Not it throws a syntax error.
--Possible variable types[ boolean, function, nil, number, string, table, thread, userdata]
local IRLUA_PLUGIN_CheckTypes = function(tbArgs,nArg,tTypes)
local sType = type(tbArgs[nArg]);
local nTotalTypes = Table.Count(tTypes);
local nStrikes = 0;
local sAllowedTypes = "";
for nIndex, sAllowedType in tTypes do
if nIndex < (nTotalTypes - 1) then
sAllowedTypes = sAllowedTypes.." "..sAllowedType..",";
elseif nIndex == nTotalTypes - 1 then
sAllowedTypes = sAllowedTypes.." "..sAllowedType;
elseif nIndex == nTotalTypes then
if nTotalTypes == 1 then
sAllowedTypes = " "..sAllowedType;
else
sAllowedTypes = sAllowedTypes.." or "..sAllowedType;
end
end
if sType ~= String.Lower(sAllowedType) then
nStrikes = nStrikes + 1;
end
end
if nStrikes == nTotalTypes then
if _ShowErrorEventContext then
local sEventContext=Debug.GetEventContext()
error("bad argument #" .. nArg .. ", must be a"..sAllowedTypes..", you passed a "..sType..".\r\n\r\nEventContext: "..sEventContext,3)
else
error("bad argument #" .. nArg .. ", must be a"..sAllowedTypes..", you passed a "..sType..".",3)
end
else
return tbArgs[nArg]
end
end
--################################################## ################################################## #####
--ERROR PLUGIN DETAILS
local ERROR_PLUGIN_NAME = "Text";
--################################################## ################################################## #####
--Displays a custom error message using the plugin and function name and lists the event context as well.
local ERROR = function(sFunctionName,sMessage,nEmbedLevel)
if not nEmbedLevel then
nEmbedLevel = 0;
elseif type(nEmbedLevel) ~= "number" then
nEmbedLevel = 0;
end
if type(sFunctionName) ~= "string" then
sFunctionName = "";
end
local sFunctionNameCode = "";
if String.Replace(sFunctionName, " ", "", false) ~= "" then
sFunctionNameCode = ", function \""..sFunctionName.."()\"";
end
error("\r\nError in \""..ERROR_PLUGIN_NAME.."\" plugin"..sFunctionNameCode.."\r\n\r\n"..sMessage.."\r\n\r\nEventContext: "..Debug.GetEventContext(),3 + nEmbedLevel);
end
--################################################## ################################################## #####
-- END IRLUA PLUGIN HELPER FUNCTIONS
--################################################## ################################################## #####
--[[
--Example Usage
function TEST(...)
-- this function requires 3 arguments of differenet types.
-- check the number of arguments
IRLUA_PLUGIN_CheckNumArgs(arg,3);
local junk1 = IRLUA_PLUGIN_CheckTypes(arg,1,{"string", "table"});
local junk2 = IRLUA_PLUGIN_CheckTypes(arg,2,{"number", "table"});
local junk3 = IRLUA_PLUGIN_CheckTypes(arg,3,{"nil", "number"});
Dialog.Message("Test", "Run Through");
end
NOTES ON ERROR FUNCTION
add the following to each function...
local sCallingFunction = "MyFunction";
..where "MyFunction" is the name of the calling function.
NOTE: the sCallingFunction variable can be called whatever you like. It is argument number one for the ERROR function
EXAMPLE: ERROR(sCallingFunction, "The world cannot be saved by a plugin");
If the error is inside an embedded function (a function within a function) then use a number for the third agument.
The number is the depth of the ERROR message call (o for being inside one function, 1 for being inside a function within another function and so on).
If you are not calling the ERROR function from within an ebedded function then you do not need the third argument, it can be nil.
]]
--[[
NOTES ON ERROR CODE IMPLEMENTATION
--EDIT: I forgot to mention, also make heavy use of Application.SetLastError in your actions, try and use predefined error codes but if you need to add error codes use IRLUA_PLUGIN_SetGlobalErrorMessage with a unique number range
--example ( if you run the below script the message will read "Some error message"
--Code:
IRLUA_PLUGIN_SetGlobalErrorMessage(0023114, "Some error message")
IRLUA_PLUGIN_SetGlobalErrorMessage(0023113, "Some other error message")
Application.SetLastError(0023114)
-- Test for error
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
]]
infinityscape
02-28-2010, 07:39 AM
ModalBox 1.2.0.0
Corrected Function Bug
Added More Primary State Plugins
Nathaniel Blackburn
LunaStudios Software Inc.
Sakuya
02-28-2010, 08:08 AM
ModalBox 1.2.0.0
Nathaniel Blackburn
LunaStudios Software Inc.
I've updated and now the only problematic control is the RadioButton.
http://img.loldepot.com/4294116c585c5921f3fe.png
mystica
02-28-2010, 12:11 PM
You been hard at work while I've been away, there Nathaniel? Looks like the mice really do play while the cat's away.
Great stuff, mate! Good for you, dude. :yes
reteset
03-01-2010, 02:08 PM
looks good :yes
infinityscape
03-02-2010, 03:11 AM
thanks reteset, thats really nice of you to say so :)
infinityscape
03-02-2010, 03:20 AM
ModalBox 1.3.0.0
Added More Primary State Plugins
Tidied Code
Optimized Plugin Speed
i think i have pretty much covered every plugin in this release if i have managed missed any please let me know, thanks again for your continued support and wow i really wasnt expecting reteset to comment, i am honored :yes
Nathaniel Blackburn
LunaStudios Software Inc.
infinityscape
03-02-2010, 07:26 AM
hey everyone, i have made the brave decision to make this project opensource i have set up a account with sourceforge and uploaded modalbox and its source for all to see, you can visit here: https://sourceforge.net/projects/modalbox to check it out, thanks for the support its been astonishing.
Nathaniel Blackburn
LunaStudios Software Inc.
Imagine Programming
03-02-2010, 09:35 AM
Looking great, a nice job nathanial! :yes
T3STY
03-02-2010, 04:11 PM
Great work, as expected.
Thanks for source :)
infinityscape
03-04-2010, 07:03 AM
thanks guys, i guess its time to start work on my next creation :D
Sakuya
03-04-2010, 07:17 AM
thanks guys, i guess its time to start work on my next creation :D
I'll be updating as soon as I get outta this DARN hospital.
Imagine Programming
03-04-2010, 08:20 AM
I'll be updating as soon as I get outta this DARN hospital.
What happend? Are you ok? :)
Sakuya
03-04-2010, 08:36 AM
What happend? Are you ok? :)
Everything but my patience is fine, I was in there for 5 hours and the operation only took 7 minutes.
JDog37
03-04-2010, 10:01 AM
That is bull... You go in for a 7 min procedure and they have you there for 5 hrs.. Now that is a total wast of money.. I hope you had coverage or you will be broke! Lol..
I hope all goes well for ya!! :yes ;)
Joe
Centauri Soldier
03-04-2010, 01:47 PM
Sorry to hear that, Sakuya, I hope all is well.
Imagine Programming
03-04-2010, 04:07 PM
Everything but my patience is fine, I was in there for 5 hours and the operation only took 7 minutes.
Oh dam, well, at least everthing (but your patience) is fine, I understand that your patience isn't though, 5 freaking hours for a 7 minute operation...
mystica
03-06-2010, 05:14 AM
Oh dam, well, at least everthing (but your patience) is fine, I understand that your patience isn't though, 5 freaking hours for a 7 minute operation...
Hahaha ... you ought to try the public-hospital system here! Years back, I had to wait 3 days for emergency micro-surgery on a digital-nerve that required attention within 4 hours of injury or else permanent nerve-damage. And no, the nerve never recovered. :rolleyes
PS.
Hope you're feeling better, Sakuya. :yes
@infintyscape
Thanks for the version-update, man. This was a terrifically creative idea. I love it.
I forsee a young prodigy in the making, yeh?
Imagine Programming
03-06-2010, 11:39 AM
Hahaha ... you ought to try the public-hospital system here! Years back, I had to wait 3 days for emergency micro-surgery on a digital-nerve that required attention within 4 hours of injury or else permanent nerve-damage. And no, the nerve never recovered. :rolleyes
Thank god for the hospitals in the Netherlands, for example we have 2 nearby,
one in Zwolle and one in Deventer, you always get instant help in either one of them :yes Although, the docters wait awefully long before they send you to the hospital for a problem. One of my friends nearly died because his docter didn't take him seriously 3 times, so his appendix bursted into pieces because it was infected... On the 4th day, another docter thought it was rather strange he had such pain, so he sent him to the hospital... and guess what, they even pulled pieces of appendix from behind his loungs XD They were just on time..
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.