Author Topic: DragonFireSDK Undocumented Function: AlertShow()  (Read 11369 times)

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
DragonFireSDK Undocumented Function: AlertShow()
« on: May 08, 2012, 01:11:26 pm »
If you ever need to show an alert message to your user (the translucent dialog box that has a message and an OK button) you can add the following code to your App.cpp file and add this functionality yourself.

Code: [Select]
#ifdef __APPLE__
int AlertShow(char *title, char *message);
#else
#include "Windows.h"
int AlertShow(char *title, char *message)
{
    MessageBox(NULL,message,title,MB_OK);
    return(1);
}
#endif
Tim Sommers
DragonFireSDK Team

Tom

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #1 on: May 09, 2012, 05:25:55 am »
Very interesting, I'm sure I'll use this for debugging!

xabaras

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #2 on: May 09, 2012, 12:25:11 pm »
yep! very useful... will there be also something like PromptShow() and ConfirmShow() in the future?

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #3 on: May 09, 2012, 01:31:56 pm »
yep! very useful... will there be also something like PromptShow() and ConfirmShow() in the future?

It's possible.  What are you thinking that those functions would do?
Tim Sommers
DragonFireSDK Team

Tom

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #4 on: May 09, 2012, 01:52:38 pm »
Also, maybe a call back for pressing "Ok" or "Cancel".

xabaras

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #5 on: May 09, 2012, 03:45:13 pm »
yep! very useful... will there be also something like PromptShow() and ConfirmShow() in the future?

It's possible.  What are you thinking that those functions would do?

As Tom said, a "ConfirmShow" could show some text and some buttons below (eg. Ok/Cancel, or Yes/No...) with their callbacks... and a PromptShow could create a dynamic input field to write something "on the fly" and handle it in some way...

Scott

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #6 on: June 05, 2012, 11:27:04 am »
This would be very helpful for debugging on a device and could also be used within a game. A callback with which button the user pressed would also be handy.

xabaras

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #7 on: August 12, 2012, 02:56:02 pm »
Uhm, i'm working on a new app... i have 3 pages, and a tabbar with a button linked to each page... in the first page should happen something that shows a popup with two buttons(e.g. Page2, Page3), so that the user can choose to go to the second or third page... is there some other native function to achieve this? or is there any chance to have it on a next version of DFSDK?

thanks

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #8 on: August 13, 2012, 09:12:24 am »
Scott and xabaras,

E-mail me at tim@zimusoft.com and I will hook you up...

Cheers,
Tim Sommers
DragonFireSDK Team

Djjammin

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #9 on: September 01, 2012, 07:43:21 am »
I take it this won't compile on IOS due to windows.h? is there anyway to actually make this work on an app release....

stuckerj

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #10 on: September 02, 2012, 09:07:22 pm »
It works on both, that's what the conditional compile is for.

Djjammin

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #11 on: September 13, 2012, 01:25:33 pm »
It works on both, that's what the conditional compile is for.

conditional compile, what does this mean? i'm a n00b when it comes to C++

stuckerj

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #12 on: September 13, 2012, 08:57:10 pm »
It works on both, that's what the conditional compile is for.

conditional compile, what does this mean? i'm a n00b when it comes to C++

See http://www.bing.com/search?q=conditional+compile+ifdef

Djjammin

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #13 on: September 14, 2012, 12:09:19 pm »
It works on both, that's what the conditional compile is for.

conditional compile, what does this mean? i'm a n00b when it comes to C++

See http://www.bing.com/search?q=conditional+compile+ifdef

I get it now... I re-read the original post and its now clear... Also Bing is gay. Changed my iPhone default search.

Nico91

  • Guest
Re: DragonFireSDK Undocumented Function: AlertShow()
« Reply #14 on: October 29, 2012, 04:46:34 am »
this works also on the real device?