Jump to content




[CC 1.33 | MC 1.2.5] CCPDA [1.0.1] - make a GUI for everithing

peripheral media wireless

24 replies to this topic

#1 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 05 April 2012 - 10:11 PM

Description

​An add-on that allows you to create GUIs.

Download

v 1.0.1 [CC 1.33 | MC 1.2.5] (mediafire)
v 1.0.1 [CC 1.33 | MC 1.2.4] (mediafire)

v 1.0.0 [CC 1.31 | MC 1.2.3] (mediafire)
v 1.0.0 [CC 1.32 | MC 1.2.4] (mediafire)
v 1.0.0 [CC 1.33 | MC 1.2.5] (mediafire)

Requirements
  • ComputerCraft
  • ModLoader (also needed by CC)
Installation

Unzip the file to the mods folder.

Screenshots

Posted Image

more here: imgur

Crafting

Posted Image
PDA Controller

Posted Image
PDA

How to use

The PDA Controller can be attached to any side of a Computer except for the bottom

The peripheral has plenty of functions and events.

Get a full list of them here

Colors

Some functions need a color parameter here you have to pass in an integer.

The easiest way to calculate this number from a hexadecimal A-R-G-B value (two hexadecimal digits for the Alpha-, Red-, Green-, Blue-value) (Alpha of FF => fully visible)
is to use this website.
You will have to input your 8digit Hex-number to the HEX input filed a the top. Now press the enter key.
You now pick the value in the field (decimal-column and 3rd row from bottom).
Now you simply multiply this value by -1. This is what you have to pass into the function.

Examples
  • A GUI accessible by using (right-click) the PDA, that allows to set Redstone Outputs of the computer. (pastebin)
Planed features

view

Changelog

v 1.0.1:
  • Fixed a serious bug that was causing the Iron Shovel to be replaced by the PDA
v 1.0.0:
  • first official release
If you like it, a comment is highly appreciated. :)/>

#2 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 05 April 2012 - 10:18 PM

found a bug: You didnt state what version of Minecraft this supports.

#3 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 05 April 2012 - 10:21 PM

Thanks I've added it.

#4 coolblockj

  • Members
  • 84 posts

Posted 06 April 2012 - 01:37 AM

You should add some sort of channel switch, because so far it can only use one thing.

#5 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 06 April 2012 - 03:21 AM

As well as it needs more functions.

#6 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 06 April 2012 - 10:18 AM

View Postcoolblockj, on 06 April 2012 - 01:37 AM, said:

You should add some sort of channel switch, because so far it can only use one thing.
Great idea. Still thinking how to realize this. I could add a selection when you use the PDA. But opening the GUI by the Computer could get difficult maybe there will something like a popup message that could be sent by a computer like "NEW update chicken-farm" or so and when you then use the PDA you can switch between all Channels.

#7 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 06 April 2012 - 10:21 AM

View PostFuzzyPurp, on 06 April 2012 - 03:21 AM, said:

As well as it needs more functions.

In the next update I'll definitely add the ability to add, delete and modify Buttons without having the GUI open. I think I have to take a closer look at the GUI API maybe.

#8 kamnxt

  • New Members
  • 80 posts

Posted 08 April 2012 - 10:57 AM

I get an error:
Spoiler

EDIT: Oops, i have minecraft 1.2.4... Can you make a 1.2.4 version?
EDIT 2: And i'm using CC 1.32... I must read the title first :P/>

#9 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 08 April 2012 - 05:20 PM

View Postkamnxt, on 08 April 2012 - 10:57 AM, said:

EDIT: Oops, i have minecraft 1.2.4... Can you make a 1.2.4 version?

I've just updated the add-on for MC 1.2.4

#10 kamnxt

  • New Members
  • 80 posts

Posted 09 April 2012 - 05:05 PM

Thanks for updating! :P/>



Don't try this code:
side = "top"
pda = peripheral.wrap(side)
pda.registerAsEventListener()
pda.createGui()
while true do
os.pullEvent()
pda.displayGui()
end
It makes it impossible to close the PDA GUI...

#11 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 09 April 2012 - 05:46 PM

You can do this even more easy:

side = "top"
pda = peripheral.wrap(side)
pda.setOption("closeOnEscape", false)
pda.createGui()
pda.displayGui

WARNING: DO NOT TRY!

You would have to quit the game in order to close the GUI

#12 djblocksaway

    Epic Coderz

  • New Members
  • 397 posts
  • LocationAustralia

Posted 10 April 2012 - 02:10 PM

woah nice but as mentiond needs more functions :P/>

#13 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 11 April 2012 - 10:38 AM

Yes, I know that it would be great if you can easily put checkboxes, edit fields and process bars on the GUI.
And I'll definitely add this but for now it's already possible:

For a text field you could draw a black rectangle with a gray border made out of lines. You save a lua variable whether the field is selected. When the mouse get's pressed you compare the coordinates and if the click was performed inside the field you select it otherwise you deselect it. When a key get's pressed you add the char to a variable and add the text to the GUI right above the rectangle. You would just have to limit the length of the value .

So as you can see you could do it. But of course it's not easy and it's slow. That's why I'll definitely add this.

I only what to give a way of how you can do it until the mod get's updated.

#14 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 12 April 2012 - 09:46 PM

What I would love to see is SMP Support and another thing: You can mark the port to 1.2.4 as done on your to do list

#15 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 13 April 2012 - 09:17 AM

Well there will not be SMP support or at least not in the near future because I have no experience in SMP mods yet.
If someone is interested in making this mod a SPM mod send me a PM and I'll serve you the source code.

PS: updated the to do list.

#16 WiolfCat7

  • New Members
  • 10 posts

Posted 28 April 2012 - 11:17 PM

FAIL I CANT EVEN CREATE A GUI NO MATTER WHAT I TYPE IT SAYS ATTEMPT TO CALL NIL AND YES I PUT THE THING NEXT TO THE COMPUTER

#17 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 30 April 2012 - 04:03 PM

Well have you wraped the Peripheral?
Also you can only place it next to a side or the top!
You then have to create the GUI and after that you can add stuff to it and then you can display it but make sure you have a PDA in hotbar!

#18 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 04 June 2012 - 05:47 PM

Sorry guys I totally missed the update. But as I found out the 1.2.4 version works just fine on 1.2.5

#19 Yurameki

  • Members
  • 25 posts

Posted 30 June 2012 - 05:38 AM

great in concept, more flexibility and SMP support are a must!

#20 Soundlogic

  • New Members
  • 3 posts

Posted 20 July 2012 - 04:19 AM

I am trying to use this, and it seems to work fine, except that the PDA keeps going to id 256 and stealing my iron shovel. I am using id resolver, but both id resolver and your config file are set to things besides 256. I'm not quite sure what to do.
Thank you,
Sound Logic





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users