Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by MonsterX. 12/05/25 02:43
ZorroFix. ini /data and /log path
by Martin_HH. 12/02/25 11:42
Parameter selection
by jcl. 12/01/25 12:28
ZorroGPT
by TipmyPip. 11/29/25 09:38
webGL
by Ezzett. 11/27/25 23:22
Chart viewer
by clint000. 11/27/25 21:21
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 22,095 guests, and 22 spiders.
Key: Admin, Global Mod, Mod
Newest Members
agasior, mosfet, MonsterX, KF_Investments, Luuk
19186 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 | 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