Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 844 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Messagebox on a panel #413029
12/06/12 16:45
12/06/12 16:45
Joined: Apr 2011
Posts: 75
Malta
E
Ercoles Offline OP
Junior Member
Ercoles  Offline OP
Junior Member
E

Joined: Apr 2011
Posts: 75
Malta
I have a panel with a bitmap on which I want to display a multiline message. What is the easiest way to do this?

Do I have to split the string in several parts with code and then display it line under line or is there an easy way to have it done automatically like the MsgBox command of vb6

Re: Messagebox on a panel [Re: Ercoles] #413032
12/06/12 17:10
12/06/12 17:10
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline
Member
HellThunder  Offline
Member

Joined: Nov 2005
Posts: 204
Bavaria
Try this.

Code:
BMAP* dialog_B = "textBox.png";
STRING* final = "";

///Textbox on the bottom of the screen///
PANEL* dialog_Box =
{
	pos_x = 0;
	pos_y = 0;
	layer = 10;
	bmap = dialog_B;
	flags = OVERLAY;
}

///Text wich uses the string "final"///
TEXT* dialog = 
{
	pos_x = 170;
	pos_y = 580;
	font = "Arial#33b";
	string(final);
	flags = SHOW;
	layer = 13;
}

	
////Show Text and Messagebox////
void dialog_On (STRING* npc){
		str_cpy(final,npc);
		set(dialog_Box, SHOW);
		set(dialog, SHOW | OUTLINE);	
}


////Text and Messagebox off////
void dialog_Off(){
		reset(dialog, SHOW | OUTLINE);	
		reset(dialog_Box, SHOW);
}


////Use this to show text and panel/////
dialog_On("This is just a Teststring.");

////Use this to hide text and panel/////
dialog_Off();


Last edited by HellThunder; 12/06/12 17:11.

Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: Messagebox on a panel [Re: HellThunder] #413034
12/06/12 18:04
12/06/12 18:04
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can also use simple message boxes with the printf or error function.

http://www.conitec.net/beta/printf.htm
http://www.conitec.net/beta/aerror.htm

In addition to that you can use the whole windows API and create any message box you like.


Always learn from history, to be sure you make the same mistakes again...

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1