Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Visible Area of a panel #284147
08/11/09 22:30
08/11/09 22:30
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Hi, I have the problem that I scroll buttons inside a panel but when they are outside the panel you can always see them... ugly!
How can that be changed? I don't find anything about that in the manual


Edit: The same question but explained better, i hope grin

In my interface I have a panel and in this panel are a few buttons and a slider. the slider changes the y-positions of all the buttons inside the panel. I want that you can't see the buttons when they are out of the panel.

Last edited by Toryno; 08/11/09 23:41.

Thanks for reading, thinking, answering wink
Re: Visible Area of a panel [Re: Toryno] #284156
08/11/09 23:29
08/11/09 23:29
Joined: Aug 2005
Posts: 512
Bayern
Schmerzmittel Offline
User
Schmerzmittel  Offline
User

Joined: Aug 2005
Posts: 512
Bayern
I dont realy understand that question...


A7 Com V7.80
Re: Visible Area of a panel [Re: Schmerzmittel] #284160
08/11/09 23:43
08/11/09 23:43
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Originally Posted By: Schmerzmittel
I dont realy understand that question...


Is it understandable now?


Thanks for reading, thinking, answering wink
Re: Visible Area of a panel [Re: Toryno] #284174
08/12/09 02:53
08/12/09 02:53
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Place the buttons in a separate panel and make that
panel invisible

panel.flags &= ~SHOW;


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Visible Area of a panel [Re: Ottawa] #284175
08/12/09 03:03
08/12/09 03:03
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
or set(panel,SHOW).. dont know why you complicate panel.flags &= ~SHOW;

btw, but the button wont be cliped? because i dont know any function to clip buttons. did this actually worked?

Re: Visible Area of a panel [Re: MMike] #284345
08/12/09 22:01
08/12/09 22:01
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Ok, so you would make every button in an extra panel and when one of this button-panels is out of the menue-panel the button-panel becomes hidden... Is that right?
If yes, then its not exactly what I want because I want the button half visible when it is half out of the menue-panel. You know what I mean?


Thanks for reading, thinking, answering wink
Re: Visible Area of a panel [Re: Toryno] #284759
08/14/09 21:52
08/14/09 21:52
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Anyone understands me? frown


Thanks for reading, thinking, answering wink
Re: Visible Area of a panel [Re: Toryno] #284820
08/15/09 10:52
08/15/09 10:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i don't think it's possible by actually using button(), but possible by using window() and then determining the mouse position on the panel dependant upon the sliders positon, though it'll be a pain to toggle button images if you want that done also frown

Re: Visible Area of a panel [Re: MrGuest] #284824
08/15/09 11:23
08/15/09 11:23
Joined: Aug 2008
Posts: 133
Sweden, Stockholm
E
Enduriel Offline
Member
Enduriel  Offline
Member
E

Joined: Aug 2008
Posts: 133
Sweden, Stockholm
I believe he needs to make his own button function for this to work.

for example let's say you have a bitmap with the sizes 50x100. and it is positioned at x = 100 and y = 100.

You could check in a loop if the mouse pointer is inside the bitmap (your button) with something like:

If mouse position x is bigger than the bitmap position x but less than its position x+size x, same for the y component, then it's inside the button.

if( (mouse_pos.x > bitmap.x) && (mouse_pos.x < bitmap.x + bitmap.size_x) &&
(mouse_pos.y > bitmap.y) && (mouse_pos.y < bitmap.y + bitmap.size_y) )
{
if(mouse_left) button_clicked(); //a way to make it clickable
}

with the given dimensions above the code, 50, 100 and position 100, 100, the if would look like this:

if mouse_pos.x > 100 but less than 100+50 and if mouse_pos.y > 100 but less than 100+100, then it's inside the panel/bitmap.

I believe something like this would work in your case. Basicly make your own button function, atleast you have full control over it and your button can now also call functions with parameters laugh

Last edited by Enduriel; 08/15/09 11:32.
Re: Visible Area of a panel [Re: Enduriel] #284923
08/15/09 23:20
08/15/09 23:20
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Thank you I think it could work with some method like this... but I can't really believe that gamestudio make it so hard do a simple scrolling function for a menue, because in many menues is a scroll bar... when anyone knows an easier way to do that please tell. wink
I just wanna explain once more what I mean:


Here you see how my menue looks actually.
The slider works as a well known windows slider, it moves all the green buttons.


And here you can see how it should look(this isn't make with code but I changed the image with paint). But notice: arround this menue you can see the rest of the game.

I think anyone had done this before me and can tell it. laugh


Thanks for reading, thinking, answering wink
Page 1 of 2 1 2

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