Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Draging a panel? #294367
10/18/09 18:49
10/18/09 18:49
Joined: Aug 2009
Posts: 46
gfxExp Offline OP
Newbie
gfxExp  Offline OP
Newbie

Joined: Aug 2009
Posts: 46
Hi,

I experimented a bit with no results. How do I drag a panel with mouse?

Re: Draging a panel? [Re: gfxExp] #294399
10/18/09 22:02
10/18/09 22:02
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
By using the most recent version of A7 wink


Your friendly mod is at your service.
Re: Draging a panel? [Re: MichaelGale] #294402
10/18/09 22:15
10/18/09 22:15
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
very easy with the newest version... grin

Re: Draging a panel? [Re: Widi] #294422
10/19/09 04:55
10/19/09 04:55
Joined: Aug 2009
Posts: 46
gfxExp Offline OP
Newbie
gfxExp  Offline OP
Newbie

Joined: Aug 2009
Posts: 46
Ok understood, but when someone asks how to draw a cat - the answer is definitely not "use a latest and sharpest pencil...." my question still persists. laugh

How do I make it so that I can drag PANEL* some_pan. I can move it's pos_x and pos_y with mouse_force.x and mouse_force.y - but it doesn't work as expected. And since I can't seem to use events on panel I can't make sure how to execute it when clicked and dragged within the panel.

I tried using a button to detect mouse click within the panel. But the panel isn't moving as intended like you would drag around a windows window.

Ok I'll rephrase the question, how do I make it so that I can drag a panel in the latest version?

Re: Draging a panel? [Re: gfxExp] #294428
10/19/09 05:28
10/19/09 05:28
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline
Junior Member
GorNaKosh  Offline
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
To detect a mouseclick you can use the event property of a panel. Then you have to start a while-loop assuming the mouseposition to the panel...
Code:
void dragPanel(PANEL *clickedPan) {
   while(mouse_left == 1) {   //dragging the panel while holding the mousebutton
      clickedPan.pos_x = mouse_pos.x
      clickedPan.pos_y = mouse_pos.y
      wait(1);
   }
}

PANEL *some_pan = {
   pos_x = 0;
   pos_y = 0;
   bmap = XYZ;
   flags = SHOW;
   event = dragPanel;
}



Hope it helps wink
Gor Na Kosh

Re: Draging a panel? [Re: GorNaKosh] #294449
10/19/09 08:21
10/19/09 08:21
Joined: Aug 2009
Posts: 46
gfxExp Offline OP
Newbie
gfxExp  Offline OP
Newbie

Joined: Aug 2009
Posts: 46
ah, so I don't have to use emask etc. on panel to set an event. Thanks I'll give it a try. laugh

edit
----

I tried and it works, but how would I make it so that the the mouse is in the clicked part of the panel? right now the panel moves exactly at mouse_pos.

Practically like dragging a window, the window doesn't snap to mouse position in windows os etc.

Anyway thank you very much for the help so far. laugh

Last edited by gfxExp; 10/19/09 08:34.
Re: Draging a panel? [Re: gfxExp] #294455
10/19/09 09:14
10/19/09 09:14
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
@GorNaKosh: don`t support Warez Kiddie !!!!!

Re: Draging a panel? [Re: Widi] #294456
10/19/09 09:20
10/19/09 09:20
Joined: Aug 2009
Posts: 46
gfxExp Offline OP
Newbie
gfxExp  Offline OP
Newbie

Joined: Aug 2009
Posts: 46
Warez as in illegal software? I don't understand why I have Warez Kiddie title while I use a trial version. Does anyone know why? I thought it meant something else but it does mean "that" warez afterall.

Is using trail version illegal now?

Originally Posted By: Widi
@GorNaKosh: don`t support Warez Kiddie !!!!!


Last edited by gfxExp; 10/19/09 09:22.
Re: Draging a panel? [Re: gfxExp] #294541
10/19/09 18:46
10/19/09 18:46
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You have the trial? But i think the trial is valid for 30 days and you have registred at 29.8.2009 --> 51 Days!!!!

Re: Draging a panel? [Re: Widi] #294545
10/19/09 19:02
10/19/09 19:02
Joined: Aug 2009
Posts: 46
gfxExp Offline OP
Newbie
gfxExp  Offline OP
Newbie

Joined: Aug 2009
Posts: 46
At first I was honestly using an old trail that i got from someone before (there was no cracks or anything with it, just an installation file saving me time downloading), and then when someone here said it was a beta trail version and that I needed the latest version to continue learning. So I uninstalled it and installed the latest version from the official website itself.

Regardless, I'm using Lite C now. Honestly, why do I even need to explain myself? Just because a moderator wanted me to label me a warez kiddie even after knowing I was using a trail version?

Is this how potential customers are driven away? If i cant learn this, nor get any proper help learning it.. then there is no way I would want to buy it. Maybe I should reconsider switching to C4 engine... it is much more value for the money as well. Not that I can't afford a7.

Last edited by gfxExp; 10/19/09 19:05.
Page 1 of 3 1 2 3

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