MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / SmilePicker

Method SmilePicker

src/main/java/Client/SmilePicker.java:77–103  ·  view source on GitHub ↗

Creates a new instance of SmilePicker @param caretPos @param me

(int caretPos, MessageEdit me)

Source from the content-addressed store, hash-verified

75 * @param me
76 */
77 public SmilePicker(int caretPos, MessageEdit me) {
78 super(SR.MS_SELECT);
79 this.caretPos=caretPos;
80
81 this.me = me;
82
83 il = SmilesIcons.getInstance();
84//#ifdef SMILES
85 smileTable=MessageParser.getInstance().getSmileTable();
86//#endif
87
88 imgCnt=smileTable.size();
89
90 realWidth=VirtualCanvas.getInstance().getWidth()-scrollbar.getScrollWidth();
91
92 imgWidth=Math.max(il.getWidth()+(CURSOR_HOFFSET*2), cf.minItemHeight);
93 lineHeight = il.getHeight()+(CURSOR_VOFFSET*2);
94
95 xCnt= realWidth / imgWidth;
96
97 lines=imgCnt/xCnt;
98 xLastCnt=imgCnt-lines*xCnt;
99 if (xLastCnt>0) lines++; else xLastCnt=xCnt;
100
101 xBorder=(realWidth-(xCnt*imgWidth))/2;
102 enableListWrapping(true);
103 }
104
105 int lineIndex;
106

Callers

nothing calls this directly

Calls 9

getInstanceMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
getSmileTableMethod · 0.80
getScrollWidthMethod · 0.80
enableListWrappingMethod · 0.80
getWidthMethod · 0.65
getHeightMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected