Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PurificatiMagicae
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PearX Team
PurificatiMagicae
Commits
0bde2132
Commit
0bde2132
authored
Feb 11, 2018
by
mrAppleXZ
💾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IF Tablet entries' connections rework.
parent
52632a33
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
18 deletions
+29
-18
src/main/java/ru/pearx/purmag/client/gui/if_tablet/GuiIfTabletSEEntry.java
...pearx/purmag/client/gui/if_tablet/GuiIfTabletSEEntry.java
+13
-2
src/main/java/ru/pearx/purmag/common/infofield/IfRegistry.java
...ain/java/ru/pearx/purmag/common/infofield/IfRegistry.java
+3
-3
src/main/java/ru/pearx/purmag/common/infofield/IfTier.java
src/main/java/ru/pearx/purmag/common/infofield/IfTier.java
+13
-13
No files found.
src/main/java/ru/pearx/purmag/client/gui/if_tablet/GuiIfTabletSEEntry.java
View file @
0bde2132
...
...
@@ -19,7 +19,7 @@ import ru.pearx.purmag.common.infofield.IfEntry;
public
class
GuiIfTabletSEEntry
extends
Control
{
public
IfEntry
entry
;
Point
[]
childs
;
public
Point
[]
childs
;
public
GuiIfTabletSEEntry
(
IfEntry
entry
)
{
...
...
@@ -33,7 +33,18 @@ public class GuiIfTabletSEEntry extends Control
{
for
(
Point
p
:
childs
)
{
DrawingTools
.
drawLine
(
getWidth
()
/
2
,
getHeight
()
/
2
,
p
.
getX
(),
p
.
getY
(),
3
,
getEntries
().
getTabletScreen
().
getTablet
().
data
.
getLineColorStart
(),
getEntries
().
getTabletScreen
().
getTablet
().
data
.
getLineColorEnd
());
int
x0
=
getWidth
()
/
2
;
int
y0
=
getHeight
()
/
2
;
int
x1
=
p
.
getX
();
int
y1
=
p
.
getY
();
DrawingTools
.
drawBezier
(
0.1f
,
3
,
x0
,
y0
,
x0
,
y1
,
x1
,
y1
,
(
pts
,
pt
,
i
)
->
{
int
curr
=
(
int
)(
System
.
currentTimeMillis
()
/
50
%
pts
.
length
);
int
currRange
=
1
;
boolean
b
=
i
>=
curr
-
currRange
&&
i
<=
curr
+
currRange
;
return
b
?
getEntries
().
getTabletScreen
().
getTablet
().
data
.
getLineColorActive
()
:
getEntries
().
getTabletScreen
().
getTablet
().
data
.
getLineColor
();
});
}
if
((
getX
()
+
getWidth
())
<=
0
||
(
getY
()
+
getHeight
())
<=
0
||
getX
()
>=
getEntries
().
getWidth
()
||
getY
()
>=
getEntries
().
getHeight
())
return
;
...
...
src/main/java/ru/pearx/purmag/common/infofield/IfRegistry.java
View file @
0bde2132
...
...
@@ -170,7 +170,7 @@ public class IfRegistry
@SideOnly
(
Side
.
CLIENT
)
public
void
setupIfTiersClient
()
{
registerTierClient
(
0
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
paperEntry
,
false
,
Utils
.
gRL
(
"textures/gui/if_tablet/0.png"
),
Colors
.
WHITE
,
Colors
.
BLACK
)
registerTierClient
(
0
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
paperEntry
,
false
,
Utils
.
gRL
(
"textures/gui/if_tablet/0.png"
),
Colors
.
GREY_100
,
Colors
.
GREY_700
)
{
IGuiDrawable
done
=
GuiDrawableRegistry
.
paperEntryCompleted
;
@Override
...
...
@@ -183,8 +183,8 @@ public class IfRegistry
return
done
;
}
},
Utils
.
gRL
(
"models/wall_if_tablet/0"
),
Utils
.
gRL
(
"if_tablet/0"
));
registerTierClient
(
1
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
runes
,
true
,
Utils
.
gRL
(
"textures/gui/if_tablet/1.png"
),
Colors
.
LIGHTGREEN_
100
,
Colors
.
GREEN_9
00
),
Utils
.
gRL
(
"models/wall_if_tablet/1"
),
Utils
.
gRL
(
"if_tablet/1"
));
registerTierClient
(
2
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
runes
,
true
,
Utils
.
gRL
(
"textures/gui/if_tablet/2.png"
),
Colors
.
LIGHTGREEN_
1
00
,
Colors
.
GREEN_900
),
Utils
.
gRL
(
"models/wall_if_tablet/2"
),
Utils
.
gRL
(
"if_tablet/2"
));
registerTierClient
(
1
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
runes
,
true
,
Utils
.
gRL
(
"textures/gui/if_tablet/1.png"
),
Colors
.
LIGHTGREEN_
200
,
Colors
.
GREEN_8
00
),
Utils
.
gRL
(
"models/wall_if_tablet/1"
),
Utils
.
gRL
(
"if_tablet/1"
));
registerTierClient
(
2
,
new
IfTier
.
TabletData
(
GuiDrawableRegistry
.
runes
,
true
,
Utils
.
gRL
(
"textures/gui/if_tablet/2.png"
),
Colors
.
LIGHTGREEN_
2
00
,
Colors
.
GREEN_900
),
Utils
.
gRL
(
"models/wall_if_tablet/2"
),
Utils
.
gRL
(
"if_tablet/2"
));
}
public
void
setup
()
...
...
src/main/java/ru/pearx/purmag/common/infofield/IfTier.java
View file @
0bde2132
...
...
@@ -88,16 +88,16 @@ public class IfTier
private
IGuiDrawable
entryBackground
;
private
boolean
shouldGlow
;
private
ResourceLocation
texture
;
private
Color
lineColor
Start
;
private
Color
lineColor
End
;
private
Color
lineColor
;
private
Color
lineColor
Active
;
public
TabletData
(
IGuiDrawable
entryBackground
,
boolean
shouldGlow
,
ResourceLocation
texture
,
Color
lineColor
Start
,
Color
lineColorEnd
)
public
TabletData
(
IGuiDrawable
entryBackground
,
boolean
shouldGlow
,
ResourceLocation
texture
,
Color
lineColor
,
Color
lineColorActive
)
{
this
.
entryBackground
=
entryBackground
;
this
.
shouldGlow
=
shouldGlow
;
this
.
texture
=
texture
;
this
.
lineColor
Start
=
lineColorStart
;
this
.
lineColor
End
=
lineColorEnd
;
this
.
lineColor
=
lineColor
;
this
.
lineColor
Active
=
lineColorActive
;
}
public
IGuiDrawable
getEntryBackground
(
IfEntry
entry
,
int
currentSteps
)
...
...
@@ -130,24 +130,24 @@ public class IfTier
this
.
texture
=
texture
;
}
public
Color
getLineColor
Start
()
public
Color
getLineColor
()
{
return
lineColor
Start
;
return
lineColor
;
}
public
void
setLineColor
Start
(
Color
lineColorStart
)
public
void
setLineColor
(
Color
lineColor
)
{
this
.
lineColor
Start
=
lineColorStart
;
this
.
lineColor
=
lineColor
;
}
public
Color
getLineColor
End
()
public
Color
getLineColor
Active
()
{
return
lineColor
End
;
return
lineColor
Active
;
}
public
void
setLineColor
End
(
Color
lineColorEnd
)
public
void
setLineColor
Active
(
Color
lineColorActive
)
{
this
.
lineColor
End
=
lineColorEnd
;
this
.
lineColor
Active
=
lineColorActive
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment