Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make resizable-mode work #10

Closed
RobinWeymans opened this issue Apr 10, 2017 · 3 comments
Closed

Make resizable-mode work #10

RobinWeymans opened this issue Apr 10, 2017 · 3 comments
Labels

Comments

@RobinWeymans
Copy link
Contributor

RobinWeymans commented Apr 10, 2017

If you put the client in resizable mode and change the size of the screen, the ClientPanel does not change size. This is because the ClientPanel is not anchorred to the ClientUI's borders because it uses a FlowLayout.

I tried changing the code to:

                container = new JPanel();
                container.setLayout(new BorderLayout(0, 0));

//		container.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));

		panel = new ClientPanel();
		container.add(panel, BorderLayout.LINE_START);

		navigationPanel = new NavigationPanel();
		container.add(navigationPanel, BorderLayout.LINE_END);

		add(container);

If you change the height of the client now, when its in resizable mode, the client actually gets bigger. The NavigationPanel should have a max width, because with this solution, if you change the width, only the NavigationPanel gets wider. Im not sure yet how to solve that, but i'll post my answer when i find out.

@KronosDesign
Copy link
Contributor

KronosDesign commented Apr 11, 2017

I found a temporary fix to this, but it breaks the side bar menu's content

Just change the ClientPanel layout to use BorderLayout.CENTER

container = new JPanel();
container.setLayout(new BorderLayout(0, 0));

panel = new ClientPanel();
container.add(panel, BorderLayout.CENTER);

navigationPanel = new NavigationPanel();
container.add(navigationPanel, BorderLayout.EAST);

Also in ClientPanel.java youll need to set the rs applet position on resize

@Override
public void componentResized(ComponentEvent e)
{
	rs.setLocation(0, 0);
	rs.setSize(this.getSize());
	this.setPreferredSize(this.getSize());
	rs.setPreferredSize(this.getPreferredSize());
}

@KronosDesign
Copy link
Contributor

I've made a pull request with some small UI changes that will fix this issue.
In addition to the code above the only thing left was to add the NavigationPanel and PluginsPanel to their own navContainer that was set to BorderLayout.EAST

@Adam-
Copy link
Member

Adam- commented Apr 12, 2017

Should work now, see #16.

@Adam- Adam- closed this as completed Apr 12, 2017
@deathbeam deathbeam added the bug label Mar 25, 2018
FrostyFridge added a commit to FrostyFridge/runelite that referenced this issue Jan 19, 2019
Lucwousin referenced this issue in Lucwousin/runelite Apr 23, 2019
* Transform objects now use an interface

* Plugins can now accept colors (not my code)

* mixins: renderWidgetLayer: skip hidden widgets

* World Map: Identify Both Shield of Arrav Quest Start Points (#8442)

Closes #8437

* widgetitem: associate Widget with WidgetItem

* widgetitem overlay: allow configuring which interfaces to overlay

Update overlays to behave consistent with how they behaved before
removal of query api, with the exception of adding the rune pouch
overlay to the bank.

* Update .gitignore

* Revert "Adding external plugin support (open-osrs#4)"

This reverts commit bfe1482

* Update QuestStartLocation.java

* Revert "Plugins update (open-osrs#7)"

This reverts commit 216f7d9

* Adding external plugin support (open-osrs#4)

* Adding archetype

* Update RuneLiteConfig.java

* Update Plugin.java

* Update PluginManager.java

* Adding pluginwatcher & classloader

* Update RuneLite.java

* Update pom.xml

* Update settings.xml

* Update pom.xml

* Update pom.xml

* Removing old example plugin

* Fixing the fix of the fix for plugin archetype.

(cherry picked from commit bfe1482)

* Plugins can now accept colors (not my code)

(cherry picked from commit 8e094f7)

* Update MenuEntrySwapperConfig.java
Jacoblairm pushed a commit to Jacoblairm/runelite that referenced this issue Jun 2, 2019
…er-packs-in-vial-calc

Do not include wrong healer packs in vial calc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants