Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 2:39 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Feb 16, 2013 10:47 pm 
Offline

Joined: Sat Feb 16, 2013 10:25 pm
Posts: 1
I have 2 issues and I created a small testcase where I could reproduce what is happening.
Attachment:
buttonsizetest.zip [22.12 KiB]
Downloaded 11 times

In the testcase, I'm trying to add a button that is too big for the scrollpane.

The first issue is:
If I do not add a Resizableframe, the button will have its size adjusted to smallest possible.
If the titleAreaBottom param is exactly 4(as in resizableframe theme), the button will also be adjusted.

The second one is, assuming we apply resizableframeTEST and the button has the correct size (200x50):
When I'm hovering the button, and move the mouse outside the scrollpane on the RIGHT side(where the button is cut off), the button does not change hover-state. As soon as I enter the scrollpane again, the button will receive its MOUSE_EXITED event and toggle state.
As far as I've seen, the widget will not receive MOUSE_EXITED on any of the sides if the scrollpane is not scrolled to the far edge of where the mouse is exiting.

Code:
public ButtonSizeTest() {
    frame = new ResizableFrame();
//    frame.setTheme("resizableframe");
    frame.setTheme("resizableframeTEST");

    add(frame);

    button = new Button("Button");
    scrollPane = new ScrollPane(button);
    add(scrollPane);
}

@Override
protected void layout() {
    button.setSize(200, 50);

    scrollPane.setSize(100, 100);
    scrollPane.setPosition(10, 50);
}

Code:
<theme name="resizableframe" ref="resizableframe-title" allowWildcard="true">
    <param name="background"><image>-borderA</image></param>
    <param name="border"><border>background.border</border></param>
    <param name="hasCloseButton"><bool>false</bool></param>
    <param name="titleAreaBottom"><int>4</int></param>
</theme>

<theme name="resizableframeTEST" ref="resizableframe-title">
    <param name="titleAreaBottom"><int>3</int></param>
</theme>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group