Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Creating GUI elements in Slick2d  (Read 1579 times)
0 Members and 1 Guest are viewing this topic.
Offline Reck

Senior Newbie





« Posted 2012-12-06 12:11:01 »

I want to create a small menu that pops out when someone rightclicks a player. It should pop out from the players character.
Should i use a GUI Library for this? If yes, which GUI would be better for this task? (Using BasicGame).
If not, how would i be able to achieve this? (It should be rendered in the render method)
Offline Phased
« Reply #1 - Posted 2012-12-06 12:19:38 »

Im sure you could just create your own, from what I believe, you could just create multiple boxes added together to create the menu when right clicked.

I think it would be almost easier to create it yourself then learning a GUI library for LWJGL.

And I agree with the guy who said to make one thread instead of 500.
Offline Reck

Senior Newbie





« Reply #2 - Posted 2012-12-06 12:24:50 »

Im sure you could just create your own, from what I believe, you could just create multiple boxes added together to create the menu when right clicked.

I think it would be almost easier to create it yourself then learning a GUI library for LWJGL.

I don't see how i'd be able to easily create the menu and register click on the items.

Quote
And I agree with the guy who said to make one thread instead of 500.

I'll tell you exactly the same as i told him - I've created a topic for each question to keep the forums searchable. This is definitely optimizing the asking of already asked- and answered questions.

Besides, half of your answers is just lacky ideas which does not lead anywhere, and the remaining half is just useless posts which i assume is to boost your postcounter.

Have a nice day, and keep in mind, you don't have to reply to my threads. :-)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Phased
« Reply #3 - Posted 2012-12-06 12:47:06 »

I have told you what you should do to achieve it.

Few of your questions have been very basic without any thought gone into it.

Your image height question?

You didn't even bother to explore the methods, and went straight to JGO to solve your problems that would take 1 min.

You have created multiple threads to solve one question. This kinda contradicts your point of "making it searchable" makes it even harder to have to search through 2 or 3 posts to fix one problem.

(edit:)
Quote
This is definitely optimizing the asking of already asked- and answered questions.
definitely not optimized to create multiple version of the same question.
(/edit)

You created 2 topics for one subject. this could easy fit in your "Small menu element in Slick2d"

Quote
Besides, half of your answers is just lacky ideas which does not lead anywhere, and the remaining half is just useless posts which i assume is to boost your postcounter

Lacky idea's? I have told you how I would approach the problem.
If you don't want idea's upload your complete source, and ask for us to code you a game.

Post counter, check my posts, I mostly browse and reply when I believe I can be helpful.

Very first topic I tried to solve from you, I approached it good, I read the error report, which if you read you probably wouldn't of had to create that post, I told you what I did to solve the same problem I had.

Its super easy to create a button in Java. I have recreated a button class multiple times instead of copying and pasting my own code.

Get your mouse x and y co-ords, and check in a rectangle/square around your image.

1  
2  
if(input.mouseX > x && input.mouseY > y && input.mouseX < x + image.getWidth()
&& input.mouseY < y + image.getHeight())


Tell me how thats hard to check for input over a button?

+ you asked how you could achieve this. you could create multiple boxes lined under each other when right clicked, giving multiple options, you can then use that if statement to check if the cursor is inside the rectangle.

for your chatbox, I told you exactly how I created my chatbox, I do not use Slick2D other then for image loading and fonts at the moment.

In one of your other topics, you got told theirs a button class inside of Slick, why cant you use that to create the buttons for your menu? 
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #4 - Posted 2012-12-06 20:39:17 »

Besides, half of your answers is just lacky ideas which does not lead anywhere, and the remaining half is just useless posts which i assume is to boost your postcounter.

Have a nice day, and keep in mind, you don't have to reply to my threads. :-)
FWIW, I don't reply to your threads because you make too many. Also, you PMed me instead of using the proper channels to get help using my OSS. The first sentence of my documentation says how to get help and to please not contact me directly.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (32 views)
2014-04-15 18:08:23

BurntPizza (29 views)
2014-04-15 03:46:01

UprightPath (44 views)
2014-04-14 17:39:50

UprightPath (27 views)
2014-04-14 17:35:47

Porlus (44 views)
2014-04-14 15:48:38

tom_mai78101 (65 views)
2014-04-10 04:04:31

BurntPizza (125 views)
2014-04-08 23:06:04

tom_mai78101 (225 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!