MixinGuiTextField.java
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
* This file is part of LiteLoader.
* Copyright (C) 2012-16 Adam Mummery-Smith
* All Rights Reserved.
*/
package com.mumfrey.liteloader.client.mixin;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import com.mumfrey.liteloader.client.overlays.IGuiTextField;
import net.minecraft.client.gui.GuiTextField;
@Mixin(GuiTextField.class)
public abstract class MixinGuiTextField implements IGuiTextField
{
@Shadow @Final @Mutable private int width;
@Shadow @Final @Mutable private int height;
@Shadow public int xPosition;
@Shadow public int yPosition;
@Shadow private int lineScrollOffset;
@Shadow private int enabledColor;
@Shadow private int disabledColor;
@Shadow private boolean isEnabled;
@Override
public int getXPosition()
{
return this.xPosition;
}
@Override
public void setXPosition(int xPosition)
{
this.xPosition = xPosition;
}
@Override
public int getYPosition()
{
return this.yPosition;
}
@Override
public void setYPosition(int yPosition)
{
this.yPosition = yPosition;
}
@Override
public int getInternalWidth()
{
return this.width;
}
@Override
public void setInternalWidth(int width)
{
this.width = width;
}
@Override
public int getHeight()
{
return this.height;
}
@Override
public void setHeight(int height)
{
this.height = height;
}
@Override
public boolean isEnabled()
{
return this.isEnabled;
}
@Override
public int getLineScrollOffset()
{
return this.lineScrollOffset;
}
@Override
public int getTextColor()
{
return this.enabledColor;
}
@Override
public int getDisabledTextColour()
{
return this.disabledColor;
}
}